Skip to content

Kafka Topic name change #149

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Aug 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 42 additions & 42 deletions connect/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,60 +16,60 @@ module.exports = {
BUS_API_EVENT: {
CONNECT: {
POST: {
UPDATED: 'notifications.connect.project.post.edited',
CREATED: 'notifications.connect.project.post.created',
DELETED: 'notifications.connect.project.post.deleted',
MENTION: 'notifications.connect.project.post.mention',
UPDATED: 'connect.notification.project.post.edited',
CREATED: 'connect.notification.project.post.created',
DELETED: 'connect.notification.project.post.deleted',
MENTION: 'connect.notification.project.post.mention',
},
MEMBER: {
JOINED: 'notifications.connect.project.member.joined',
LEFT: 'notifications.connect.project.member.left',
REMOVED: 'notifications.connect.project.member.removed',
MANAGER_JOINED: 'notifications.connect.project.member.managerJoined',
COPILOT_JOINED: 'notifications.connect.project.member.copilotJoined',
ASSIGNED_AS_OWNER: 'notifications.connect.project.member.assignedAsOwner',
INVITE_CREATED: 'notifications.connect.project.member.invite.created',
INVITE_UPDATED: 'notifications.connect.project.member.invite.updated',
INVITE_REQUESTED: 'notifications.connect.project.member.invite.requested',
INVITE_APPROVED: 'notifications.connect.project.member.invite.approved',
INVITE_REJECTED: 'notifications.connect.project.member.invite.rejected',
JOINED: 'connect.notification.project.member.joined',
LEFT: 'connect.notification.project.member.left',
REMOVED: 'connect.notification.project.member.removed',
MANAGER_JOINED: 'connect.notification.project.member.managerJoined',
COPILOT_JOINED: 'connect.notification.project.member.copilotJoined',
ASSIGNED_AS_OWNER: 'connect.notification.project.member.assignedAsOwner',
INVITE_CREATED: 'connect.notification.project.member.invite.created',
INVITE_UPDATED: 'connect.notification.project.member.invite.updated',
INVITE_REQUESTED: 'connect.notification.project.member.invite.requested',
INVITE_APPROVED: 'connect.notification.project.member.invite.approved',
INVITE_REJECTED: 'connect.notification.project.member.invite.rejected',
},
PROJECT: {
ACTIVE: 'notifications.connect.project.active',
APPROVED: 'notifications.connect.project.approved',
CANCELED: 'notifications.connect.project.canceled',
COMPLETED: 'notifications.connect.project.completed',
CREATED: 'notifications.connect.project.created',
FILE_UPLOADED: 'notifications.connect.project.fileUploaded',
LINK_CREATED: 'notifications.connect.project.linkCreated',
PAUSED: 'notifications.connect.project.paused',
SUBMITTED_FOR_REVIEW: 'notifications.connect.project.submittedForReview',
SPECIFICATION_MODIFIED: 'connect.action.project.updated.spec',
ACTIVE: 'connect.notification.project.active',
APPROVED: 'connect.notification.project.approved',
CANCELED: 'connect.notification.project.canceled',
COMPLETED: 'connect.notification.project.completed',
CREATED: 'connect.notification.project.created',
FILE_UPLOADED: 'connect.notification.project.fileUploaded',
LINK_CREATED: 'connect.notification.project.linkCreated',
PAUSED: 'connect.notification.project.paused',
SUBMITTED_FOR_REVIEW: 'connect.notification.project.submittedForReview',
SPECIFICATION_MODIFIED: 'connect.notification.project.updated.spec',
},
PROJECT_PLAN: {
READY: 'connect.action.project.plan.ready',
MODIFIED: 'connect.action.project.plan.updated',
PROGRESS_UPDATED: 'connect.action.project.updated.progress',
PHASE_ACTIVATED: 'notifications.connect.project.phase.transition.active',
PHASE_COMPLETED: 'notifications.connect.project.phase.transition.completed',
PHASE_PAYMENT_UPDATED: 'notifications.connect.project.phase.update.payment',
PHASE_PROGRESS_UPDATED: 'notifications.connect.project.phase.update.progress',
PHASE_SCOPE_UPDATED: 'notifications.connect.project.phase.update.scope',
PHASE_PRODUCT_SPEC_UPDATED: 'connect.action.project.product.update.spec',
MILESTONE_ACTIVATED: 'connect.action.timeline.milestone.transition.active',
MILESTONE_COMPLETED: 'connect.action.timeline.milestone.transition.completed',
WAITING_FOR_CUSTOMER_INPUT: 'connect.action.timeline.milestone.waiting.customer',
TIMELINE_ADJUSTED: 'connect.action.timeline.adjusted',
READY: 'connect.notification.project.plan.ready',
MODIFIED: 'connect.notification.project.plan.updated',
PROGRESS_UPDATED: 'connect.notification.project.updated.progress',
PHASE_ACTIVATED: 'connect.notification.project.phase.transition.active',
PHASE_COMPLETED: 'connect.notification.project.phase.transition.completed',
PHASE_PAYMENT_UPDATED: 'connect.notification.project.phase.update.payment',
PHASE_PROGRESS_UPDATED: 'connect.notification.project.phase.update.progress',
PHASE_SCOPE_UPDATED: 'connect.notification.project.phase.update.scope',
PHASE_PRODUCT_SPEC_UPDATED: 'connect.notification.project.product.update.spec',
MILESTONE_ACTIVATED: 'connect.notification.project.timeline.milestone.transition.active',
MILESTONE_COMPLETED: 'connect.notification.project.timeline.milestone.transition.completed',
WAITING_FOR_CUSTOMER_INPUT: 'connect.notification.project.timeline.milestone.waiting.customer',
TIMELINE_ADJUSTED: 'connect.notification.project.timeline.adjusted',
},
TOPIC: {
CREATED: 'notifications.connect.project.topic.created',
DELETED: 'notifications.connect.project.topic.deleted',
CREATED: 'connect.notification.project.topic.created',
DELETED: 'connect.notification.project.topic.deleted',
},
},
EMAIL: {
// TODO: after a proper named email topic is created, this is being used as the email event's topic
GENERAL: 'notifications.action.email.connect.project.notifications.generic',
BUNDLED: 'notifications.action.email.connect.project.notifications.bundled',
GENERAL: 'connect.notification.email.project.notifications.generic',
BUNDLED: 'connect.notification.email.project.notifications.bundled',
},
},
};
2 changes: 1 addition & 1 deletion constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = {

BUS_API_EVENT: {
EMAIL: {
GENERAL: 'notifications.action.email.connect.project.notifications.generic',
GENERAL: 'connect.notification.email.project.notifications.generic',
},
},
};
24 changes: 12 additions & 12 deletions emails/src/partials/project-plan.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,40 +35,40 @@
<tr class="row-child-one" height="20">
<td class="empty-child-one"></td>
<td>
{{#if [connect.action.project.plan.ready]}}
{{#if [connect.notification.project.plan.ready]}}
Project plan is ready for your project
{{/if}}
{{#if [connect.action.project.plan.updated]}}
{{#if [connect.notification.project.plan.updated]}}
Project plan is modified for your project
{{/if}}
{{#if [connect.action.project.updated.progress]}}
{{#if [connect.notification.project.updated.progress]}}
Your project has made some progress
{{/if}}
{{#if [notifications.connect.project.phase.transition.active]}}
{{#if [connect.notification.project.phase.transition.active]}}
Phase <strong>{{updatedPhase.name}}</strong> is activated
{{/if}}
{{#if [notifications.connect.project.phase.transition.completed]}}
{{#if [connect.notification.project.phase.transition.completed]}}
Phase <strong>{{updatedPhase.name}}</strong> is completed
{{/if}}
{{#if [notifications.connect.project.phase.update.payment]}}
{{#if [connect.notification.project.phase.update.payment]}}
Payments updated for phase <strong>{{updatedPhase.name}}</strong>
{{/if}}
{{#if [notifications.connect.project.phase.update.progress]}}
{{#if [connect.notification.project.phase.update.progress]}}
Phase <strong>{{updatedPhase.name}}</strong> has made some progress
{{/if}}
{{#if [notifications.connect.project.phase.update.scope]}}
{{#if [connect.notification.project.phase.update.scope]}}
Scope of the phase <strong>{{updatedPhase.name}}</strong> updated
{{/if}}
{{#if [connect.action.project.product.update.spec]}}
{{#if [connect.notification.project.product.update.spec]}}
Scope of the phase <strong>{{updatedPhase.name}}</strong> updated
{{/if}}
{{#if [connect.action.timeline.milestone.transition.active]}}
{{#if [connect.notification.project.timeline.milestone.transition.active]}}
A milestone is activated in phase <strong>{{updatedPhase.name}}</strong>
{{/if}}
{{#if [connect.action.timeline.milestone.transition.completed]}}
{{#if [connect.notification.project.timeline.milestone.transition.completed]}}
A milestone is completed in phase <strong>{{updatedPhase.name}}</strong>
{{/if}}
{{#if [connect.action.timeline.milestone.waiting.customer]}}
{{#if [connect.notification.project.timeline.milestone.waiting.customer]}}
We are waiting for your input at a milestone in the phase <strong>{{updatedPhase.name}}</strong>
{{/if}}
</td>
Expand Down
14 changes: 7 additions & 7 deletions emails/src/partials/project-status.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,25 +35,25 @@
<tr class="row-child-one" height="20">
<td class="empty-child-one"></td>
<td>
{{#if [notifications.connect.project.active]}}
{{#if [connect.notification.project.active]}}
We reviewed your project and have successfully launched it on our network. Now the copilots would be assigned according to your techincal specification, and they will proceed to building the work specification for the first phase. During this time they might ask you further questions in regards with the details of your system, in order for us to build a really great app.
{{/if}}
{{#if [notifications.connect.project.approved]}}
{{#if [connect.notification.project.approved]}}
Your project is now approved
{{/if}}
{{#if [notifications.connect.project.canceled]}}
{{#if [connect.notification.project.canceled]}}
Your project is now canceled
{{/if}}
{{#if [notifications.connect.project.completed]}}
{{#if [connect.notification.project.completed]}}
Your project is now complete
{{/if}}
{{#if [notifications.connect.project.created]}}
{{#if [connect.notification.project.created]}}
Your project is created
{{/if}}
{{#if [notifications.connect.project.paused]}}
{{#if [connect.notification.project.paused]}}
Your project is now paused
{{/if}}
{{#if [notifications.connect.project.submittedForReview]}}
{{#if [connect.notification.project.submittedForReview]}}
Your project is now submitted for review
{{/if}}
</td>
Expand Down
22 changes: 11 additions & 11 deletions emails/src/partials/project-team.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,46 +35,46 @@
<tr class="row-child-one" height="20">
<td class="empty-child-one"></td>
<td>
{{#if [notifications.connect.project.member.assignedAsOwner]}}
{{#if [connect.notification.project.member.assignedAsOwner]}}
<strong>{{userFullName}}</strong> assigned as project owner
{{/if}}
{{#if [notifications.connect.project.member.copilotJoined]}}
{{#if [connect.notification.project.member.copilotJoined]}}
<strong>{{userFullName}}</strong> joined the project as Copilot
{{/if}}
{{#if [notifications.connect.project.member.managerJoined]}}
{{#if [connect.notification.project.member.managerJoined]}}
<strong>{{userFullName}}</strong> joined the project as Manager
{{/if}}
{{#if [notifications.connect.project.member.removed]}}
{{#if [connect.notification.project.member.removed]}}
{{#if [emailToAffectedUser]}}
You are removed from the project
{{else}}
<strong>{{userFullName}}</strong> left the project
{{/if}}
{{/if}}
{{#if [notifications.connect.project.member.left]}}
{{#if [connect.notification.project.member.left]}}
<strong>{{userFullName}}</strong> left the project
{{/if}}
{{#if [notifications.connect.project.member.joined]}}
{{#if [connect.notification.project.member.joined]}}
<strong>{{userFullName}}</strong> joined the project
{{/if}}
{{#if [notifications.connect.project.member.invite.created]}}
{{#if [connect.notification.project.member.invite.created]}}
{{#if [isSSO]}}
Hi <strong>{{userFullName}}</strong>, you are invited to join the project {{projectName}}. Please use the link below to sign in and join the project.
{{else}}
Hi <strong>{{userFullName}}</strong>, you are invited to join the project {{projectName}}. Please click on the button ("View project on Connect") below to join.
{{/if}}
{{/if}}
{{#if [notifications.connect.project.member.invite.requested]}}
{{#if [connect.notification.project.member.invite.requested]}}
You are requested to add <strong>{{userFullName}}</strong> as a copilot
{{/if}}
{{#if [notifications.connect.project.member.invite.approved]}}
{{#if [connect.notification.project.member.invite.approved]}}
{{#if [originator]}}
Your request to add invite the member was approved
{{else}}
Hi <strong>{{userFullName}}</strong>, you are added as a copilot
{{/if}}
{{/if}}
{{#if [notifications.connect.project.member.invite.rejected]}}
{{#if [connect.notification.project.member.invite.rejected]}}
{{#if [originator]}}
Your request to add the member was refused
{{else}}
Expand Down Expand Up @@ -106,7 +106,7 @@
<tr>
<td class="empty-child-one"></td>
<td class="second-child" align="center">
{{#if notifications.[0].[notifications.connect.project.member.invite.requested]}}
{{#if notifications.[0].[connect.notification.project.member.invite.requested]}}
<a href="{{@root.connectURL}}/projects/{{notifications.[0].projectId}}#manageTopcoderTeam">
Manage project team
</a>
Expand Down
12 changes: 6 additions & 6 deletions emails/src/partials/topics_and_posts.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</tr>

{{#each notifications}}
{{#if [notifications.connect.project.post.created]}}
{{#if [connect.notification.project.post.created]}}
<tr class="post-details">
<td class="main-td">
<table class="main-child">
Expand All @@ -47,7 +47,7 @@
</td>
</tr>
{{/if}}
{{#if [notifications.connect.project.topic.created]}}
{{#if [connect.notification.project.topic.created]}}
<tr class="post-details">
<td class="main-td">
<table class="main-child">
Expand All @@ -69,7 +69,7 @@
</td>
</tr>
{{/if}}
{{#if [notifications.connect.project.topic.deleted]}}
{{#if [connect.notification.project.topic.deleted]}}
<tr class="post-details">
<td class="main-td">
<table class="main-child">
Expand All @@ -91,7 +91,7 @@
</td>
</tr>
{{/if}}
{{#if [notifications.connect.project.post.mention]}}
{{#if [connect.notification.project.post.mention]}}
<tr class="post-details">
<td class="main-td">
<table class="main-child">
Expand All @@ -113,7 +113,7 @@
</td>
</tr>
{{/if}}
{{#if [notifications.connect.project.post.edited]}}
{{#if [connect.notification.project.post.edited]}}
<tr class="post-details">
<td class="main-td">
<table class="main-child">
Expand All @@ -135,7 +135,7 @@
</td>
</tr>
{{/if}}
{{#if [notifications.connect.project.post.deleted]}}
{{#if [connect.notification.project.post.deleted]}}
<tr class="post-details">
<td class="main-td">
<table class="main-child">
Expand Down
10 changes: 10 additions & 0 deletions migrations/v2.0.1.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
-- rename "topic" column to "topicOld"
ALTER TABLE "public"."NotificationSettings"
RENAME COLUMN "topic" TO "topicOld";

ALTER TABLE "public"."NotificationSettings"
ALTER COLUMN "topicOld" DROP NOT NULL;

-- add "topic" column
ALTER TABLE "public"."NotificationSettings"
ADD COLUMN "topic" character varying(255) NOT NULL;
Loading