Skip to content

Commit fc37092

Browse files
author
sachin-maheshwari
authored
Merge pull request #149 from topcoder-platform/dev
Kafka Topic name change
2 parents c8009dc + 95c4cd9 commit fc37092

File tree

9 files changed

+161
-79
lines changed

9 files changed

+161
-79
lines changed

connect/constants.js

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -16,60 +16,60 @@ module.exports = {
1616
BUS_API_EVENT: {
1717
CONNECT: {
1818
POST: {
19-
UPDATED: 'notifications.connect.project.post.edited',
20-
CREATED: 'notifications.connect.project.post.created',
21-
DELETED: 'notifications.connect.project.post.deleted',
22-
MENTION: 'notifications.connect.project.post.mention',
19+
UPDATED: 'connect.notification.project.post.edited',
20+
CREATED: 'connect.notification.project.post.created',
21+
DELETED: 'connect.notification.project.post.deleted',
22+
MENTION: 'connect.notification.project.post.mention',
2323
},
2424
MEMBER: {
25-
JOINED: 'notifications.connect.project.member.joined',
26-
LEFT: 'notifications.connect.project.member.left',
27-
REMOVED: 'notifications.connect.project.member.removed',
28-
MANAGER_JOINED: 'notifications.connect.project.member.managerJoined',
29-
COPILOT_JOINED: 'notifications.connect.project.member.copilotJoined',
30-
ASSIGNED_AS_OWNER: 'notifications.connect.project.member.assignedAsOwner',
31-
INVITE_CREATED: 'notifications.connect.project.member.invite.created',
32-
INVITE_UPDATED: 'notifications.connect.project.member.invite.updated',
33-
INVITE_REQUESTED: 'notifications.connect.project.member.invite.requested',
34-
INVITE_APPROVED: 'notifications.connect.project.member.invite.approved',
35-
INVITE_REJECTED: 'notifications.connect.project.member.invite.rejected',
25+
JOINED: 'connect.notification.project.member.joined',
26+
LEFT: 'connect.notification.project.member.left',
27+
REMOVED: 'connect.notification.project.member.removed',
28+
MANAGER_JOINED: 'connect.notification.project.member.managerJoined',
29+
COPILOT_JOINED: 'connect.notification.project.member.copilotJoined',
30+
ASSIGNED_AS_OWNER: 'connect.notification.project.member.assignedAsOwner',
31+
INVITE_CREATED: 'connect.notification.project.member.invite.created',
32+
INVITE_UPDATED: 'connect.notification.project.member.invite.updated',
33+
INVITE_REQUESTED: 'connect.notification.project.member.invite.requested',
34+
INVITE_APPROVED: 'connect.notification.project.member.invite.approved',
35+
INVITE_REJECTED: 'connect.notification.project.member.invite.rejected',
3636
},
3737
PROJECT: {
38-
ACTIVE: 'notifications.connect.project.active',
39-
APPROVED: 'notifications.connect.project.approved',
40-
CANCELED: 'notifications.connect.project.canceled',
41-
COMPLETED: 'notifications.connect.project.completed',
42-
CREATED: 'notifications.connect.project.created',
43-
FILE_UPLOADED: 'notifications.connect.project.fileUploaded',
44-
LINK_CREATED: 'notifications.connect.project.linkCreated',
45-
PAUSED: 'notifications.connect.project.paused',
46-
SUBMITTED_FOR_REVIEW: 'notifications.connect.project.submittedForReview',
47-
SPECIFICATION_MODIFIED: 'connect.action.project.updated.spec',
38+
ACTIVE: 'connect.notification.project.active',
39+
APPROVED: 'connect.notification.project.approved',
40+
CANCELED: 'connect.notification.project.canceled',
41+
COMPLETED: 'connect.notification.project.completed',
42+
CREATED: 'connect.notification.project.created',
43+
FILE_UPLOADED: 'connect.notification.project.fileUploaded',
44+
LINK_CREATED: 'connect.notification.project.linkCreated',
45+
PAUSED: 'connect.notification.project.paused',
46+
SUBMITTED_FOR_REVIEW: 'connect.notification.project.submittedForReview',
47+
SPECIFICATION_MODIFIED: 'connect.notification.project.updated.spec',
4848
},
4949
PROJECT_PLAN: {
50-
READY: 'connect.action.project.plan.ready',
51-
MODIFIED: 'connect.action.project.plan.updated',
52-
PROGRESS_UPDATED: 'connect.action.project.updated.progress',
53-
PHASE_ACTIVATED: 'notifications.connect.project.phase.transition.active',
54-
PHASE_COMPLETED: 'notifications.connect.project.phase.transition.completed',
55-
PHASE_PAYMENT_UPDATED: 'notifications.connect.project.phase.update.payment',
56-
PHASE_PROGRESS_UPDATED: 'notifications.connect.project.phase.update.progress',
57-
PHASE_SCOPE_UPDATED: 'notifications.connect.project.phase.update.scope',
58-
PHASE_PRODUCT_SPEC_UPDATED: 'connect.action.project.product.update.spec',
59-
MILESTONE_ACTIVATED: 'connect.action.timeline.milestone.transition.active',
60-
MILESTONE_COMPLETED: 'connect.action.timeline.milestone.transition.completed',
61-
WAITING_FOR_CUSTOMER_INPUT: 'connect.action.timeline.milestone.waiting.customer',
62-
TIMELINE_ADJUSTED: 'connect.action.timeline.adjusted',
50+
READY: 'connect.notification.project.plan.ready',
51+
MODIFIED: 'connect.notification.project.plan.updated',
52+
PROGRESS_UPDATED: 'connect.notification.project.updated.progress',
53+
PHASE_ACTIVATED: 'connect.notification.project.phase.transition.active',
54+
PHASE_COMPLETED: 'connect.notification.project.phase.transition.completed',
55+
PHASE_PAYMENT_UPDATED: 'connect.notification.project.phase.update.payment',
56+
PHASE_PROGRESS_UPDATED: 'connect.notification.project.phase.update.progress',
57+
PHASE_SCOPE_UPDATED: 'connect.notification.project.phase.update.scope',
58+
PHASE_PRODUCT_SPEC_UPDATED: 'connect.notification.project.product.update.spec',
59+
MILESTONE_ACTIVATED: 'connect.notification.project.timeline.milestone.transition.active',
60+
MILESTONE_COMPLETED: 'connect.notification.project.timeline.milestone.transition.completed',
61+
WAITING_FOR_CUSTOMER_INPUT: 'connect.notification.project.timeline.milestone.waiting.customer',
62+
TIMELINE_ADJUSTED: 'connect.notification.project.timeline.adjusted',
6363
},
6464
TOPIC: {
65-
CREATED: 'notifications.connect.project.topic.created',
66-
DELETED: 'notifications.connect.project.topic.deleted',
65+
CREATED: 'connect.notification.project.topic.created',
66+
DELETED: 'connect.notification.project.topic.deleted',
6767
},
6868
},
6969
EMAIL: {
7070
// TODO: after a proper named email topic is created, this is being used as the email event's topic
71-
GENERAL: 'notifications.action.email.connect.project.notifications.generic',
72-
BUNDLED: 'notifications.action.email.connect.project.notifications.bundled',
71+
GENERAL: 'connect.notification.email.project.notifications.generic',
72+
BUNDLED: 'connect.notification.email.project.notifications.bundled',
7373
},
7474
},
7575
};

constants.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module.exports = {
77

88
BUS_API_EVENT: {
99
EMAIL: {
10-
GENERAL: 'notifications.action.email.connect.project.notifications.generic',
10+
GENERAL: 'connect.notification.email.project.notifications.generic',
1111
},
1212
},
1313
};

emails/src/partials/project-plan.html

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,40 +35,40 @@
3535
<tr class="row-child-one" height="20">
3636
<td class="empty-child-one"></td>
3737
<td>
38-
{{#if [connect.action.project.plan.ready]}}
38+
{{#if [connect.notification.project.plan.ready]}}
3939
Project plan is ready for your project
4040
{{/if}}
41-
{{#if [connect.action.project.plan.updated]}}
41+
{{#if [connect.notification.project.plan.updated]}}
4242
Project plan is modified for your project
4343
{{/if}}
44-
{{#if [connect.action.project.updated.progress]}}
44+
{{#if [connect.notification.project.updated.progress]}}
4545
Your project has made some progress
4646
{{/if}}
47-
{{#if [notifications.connect.project.phase.transition.active]}}
47+
{{#if [connect.notification.project.phase.transition.active]}}
4848
Phase <strong>{{updatedPhase.name}}</strong> is activated
4949
{{/if}}
50-
{{#if [notifications.connect.project.phase.transition.completed]}}
50+
{{#if [connect.notification.project.phase.transition.completed]}}
5151
Phase <strong>{{updatedPhase.name}}</strong> is completed
5252
{{/if}}
53-
{{#if [notifications.connect.project.phase.update.payment]}}
53+
{{#if [connect.notification.project.phase.update.payment]}}
5454
Payments updated for phase <strong>{{updatedPhase.name}}</strong>
5555
{{/if}}
56-
{{#if [notifications.connect.project.phase.update.progress]}}
56+
{{#if [connect.notification.project.phase.update.progress]}}
5757
Phase <strong>{{updatedPhase.name}}</strong> has made some progress
5858
{{/if}}
59-
{{#if [notifications.connect.project.phase.update.scope]}}
59+
{{#if [connect.notification.project.phase.update.scope]}}
6060
Scope of the phase <strong>{{updatedPhase.name}}</strong> updated
6161
{{/if}}
62-
{{#if [connect.action.project.product.update.spec]}}
62+
{{#if [connect.notification.project.product.update.spec]}}
6363
Scope of the phase <strong>{{updatedPhase.name}}</strong> updated
6464
{{/if}}
65-
{{#if [connect.action.timeline.milestone.transition.active]}}
65+
{{#if [connect.notification.project.timeline.milestone.transition.active]}}
6666
A milestone is activated in phase <strong>{{updatedPhase.name}}</strong>
6767
{{/if}}
68-
{{#if [connect.action.timeline.milestone.transition.completed]}}
68+
{{#if [connect.notification.project.timeline.milestone.transition.completed]}}
6969
A milestone is completed in phase <strong>{{updatedPhase.name}}</strong>
7070
{{/if}}
71-
{{#if [connect.action.timeline.milestone.waiting.customer]}}
71+
{{#if [connect.notification.project.timeline.milestone.waiting.customer]}}
7272
We are waiting for your input at a milestone in the phase <strong>{{updatedPhase.name}}</strong>
7373
{{/if}}
7474
</td>

emails/src/partials/project-status.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,25 +35,25 @@
3535
<tr class="row-child-one" height="20">
3636
<td class="empty-child-one"></td>
3737
<td>
38-
{{#if [notifications.connect.project.active]}}
38+
{{#if [connect.notification.project.active]}}
3939
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.
4040
{{/if}}
41-
{{#if [notifications.connect.project.approved]}}
41+
{{#if [connect.notification.project.approved]}}
4242
Your project is now approved
4343
{{/if}}
44-
{{#if [notifications.connect.project.canceled]}}
44+
{{#if [connect.notification.project.canceled]}}
4545
Your project is now canceled
4646
{{/if}}
47-
{{#if [notifications.connect.project.completed]}}
47+
{{#if [connect.notification.project.completed]}}
4848
Your project is now complete
4949
{{/if}}
50-
{{#if [notifications.connect.project.created]}}
50+
{{#if [connect.notification.project.created]}}
5151
Your project is created
5252
{{/if}}
53-
{{#if [notifications.connect.project.paused]}}
53+
{{#if [connect.notification.project.paused]}}
5454
Your project is now paused
5555
{{/if}}
56-
{{#if [notifications.connect.project.submittedForReview]}}
56+
{{#if [connect.notification.project.submittedForReview]}}
5757
Your project is now submitted for review
5858
{{/if}}
5959
</td>

emails/src/partials/project-team.html

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,46 +35,46 @@
3535
<tr class="row-child-one" height="20">
3636
<td class="empty-child-one"></td>
3737
<td>
38-
{{#if [notifications.connect.project.member.assignedAsOwner]}}
38+
{{#if [connect.notification.project.member.assignedAsOwner]}}
3939
<strong>{{userFullName}}</strong> assigned as project owner
4040
{{/if}}
41-
{{#if [notifications.connect.project.member.copilotJoined]}}
41+
{{#if [connect.notification.project.member.copilotJoined]}}
4242
<strong>{{userFullName}}</strong> joined the project as Copilot
4343
{{/if}}
44-
{{#if [notifications.connect.project.member.managerJoined]}}
44+
{{#if [connect.notification.project.member.managerJoined]}}
4545
<strong>{{userFullName}}</strong> joined the project as Manager
4646
{{/if}}
47-
{{#if [notifications.connect.project.member.removed]}}
47+
{{#if [connect.notification.project.member.removed]}}
4848
{{#if [emailToAffectedUser]}}
4949
You are removed from the project
5050
{{else}}
5151
<strong>{{userFullName}}</strong> left the project
5252
{{/if}}
5353
{{/if}}
54-
{{#if [notifications.connect.project.member.left]}}
54+
{{#if [connect.notification.project.member.left]}}
5555
<strong>{{userFullName}}</strong> left the project
5656
{{/if}}
57-
{{#if [notifications.connect.project.member.joined]}}
57+
{{#if [connect.notification.project.member.joined]}}
5858
<strong>{{userFullName}}</strong> joined the project
5959
{{/if}}
60-
{{#if [notifications.connect.project.member.invite.created]}}
60+
{{#if [connect.notification.project.member.invite.created]}}
6161
{{#if [isSSO]}}
6262
Hi <strong>{{userFullName}}</strong>, you are invited to join the project {{projectName}}. Please use the link below to sign in and join the project.
6363
{{else}}
6464
Hi <strong>{{userFullName}}</strong>, you are invited to join the project {{projectName}}. Please click on the button ("View project on Connect") below to join.
6565
{{/if}}
6666
{{/if}}
67-
{{#if [notifications.connect.project.member.invite.requested]}}
67+
{{#if [connect.notification.project.member.invite.requested]}}
6868
You are requested to add <strong>{{userFullName}}</strong> as a copilot
6969
{{/if}}
70-
{{#if [notifications.connect.project.member.invite.approved]}}
70+
{{#if [connect.notification.project.member.invite.approved]}}
7171
{{#if [originator]}}
7272
Your request to add invite the member was approved
7373
{{else}}
7474
Hi <strong>{{userFullName}}</strong>, you are added as a copilot
7575
{{/if}}
7676
{{/if}}
77-
{{#if [notifications.connect.project.member.invite.rejected]}}
77+
{{#if [connect.notification.project.member.invite.rejected]}}
7878
{{#if [originator]}}
7979
Your request to add the member was refused
8080
{{else}}
@@ -106,7 +106,7 @@
106106
<tr>
107107
<td class="empty-child-one"></td>
108108
<td class="second-child" align="center">
109-
{{#if notifications.[0].[notifications.connect.project.member.invite.requested]}}
109+
{{#if notifications.[0].[connect.notification.project.member.invite.requested]}}
110110
<a href="{{@root.connectURL}}/projects/{{notifications.[0].projectId}}#manageTopcoderTeam">
111111
Manage project team
112112
</a>

emails/src/partials/topics_and_posts.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
</tr>
2626

2727
{{#each notifications}}
28-
{{#if [notifications.connect.project.post.created]}}
28+
{{#if [connect.notification.project.post.created]}}
2929
<tr class="post-details">
3030
<td class="main-td">
3131
<table class="main-child">
@@ -47,7 +47,7 @@
4747
</td>
4848
</tr>
4949
{{/if}}
50-
{{#if [notifications.connect.project.topic.created]}}
50+
{{#if [connect.notification.project.topic.created]}}
5151
<tr class="post-details">
5252
<td class="main-td">
5353
<table class="main-child">
@@ -69,7 +69,7 @@
6969
</td>
7070
</tr>
7171
{{/if}}
72-
{{#if [notifications.connect.project.topic.deleted]}}
72+
{{#if [connect.notification.project.topic.deleted]}}
7373
<tr class="post-details">
7474
<td class="main-td">
7575
<table class="main-child">
@@ -91,7 +91,7 @@
9191
</td>
9292
</tr>
9393
{{/if}}
94-
{{#if [notifications.connect.project.post.mention]}}
94+
{{#if [connect.notification.project.post.mention]}}
9595
<tr class="post-details">
9696
<td class="main-td">
9797
<table class="main-child">
@@ -113,7 +113,7 @@
113113
</td>
114114
</tr>
115115
{{/if}}
116-
{{#if [notifications.connect.project.post.edited]}}
116+
{{#if [connect.notification.project.post.edited]}}
117117
<tr class="post-details">
118118
<td class="main-td">
119119
<table class="main-child">
@@ -135,7 +135,7 @@
135135
</td>
136136
</tr>
137137
{{/if}}
138-
{{#if [notifications.connect.project.post.deleted]}}
138+
{{#if [connect.notification.project.post.deleted]}}
139139
<tr class="post-details">
140140
<td class="main-td">
141141
<table class="main-child">

migrations/v2.0.1.sql

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
-- rename "topic" column to "topicOld"
2+
ALTER TABLE "public"."NotificationSettings"
3+
RENAME COLUMN "topic" TO "topicOld";
4+
5+
ALTER TABLE "public"."NotificationSettings"
6+
ALTER COLUMN "topicOld" DROP NOT NULL;
7+
8+
-- add "topic" column
9+
ALTER TABLE "public"."NotificationSettings"
10+
ADD COLUMN "topic" character varying(255) NOT NULL;

0 commit comments

Comments
 (0)