Skip to content

Copilot workflow changes #89

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 4 commits into from
Feb 21, 2019
Merged

Copilot workflow changes #89

merged 4 commits into from
Feb 21, 2019

Conversation

gondzo
Copy link
Collaborator

@gondzo gondzo commented Feb 19, 2019

Changes as part of appirio-tech/connect-app#2837

Copy link

@vikasrohit vikasrohit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good, just need some event renaming for better logical understanding of the action.

@@ -30,6 +30,9 @@ module.exports = {
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',
COPILOT_ADDED: 'notifications.connect.project.member.copilot.added',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gondzo I would like to rename this event to INVITE_APPROVED : notifications.connect.project.member.invite.approved

@@ -30,6 +30,9 @@ module.exports = {
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',
COPILOT_ADDED: 'notifications.connect.project.member.copilot.added',
COPILOT_REFUSED: 'notifications.connect.project.member.copilot.refused',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to rename this event to INVITE_REJECTED : notifications.connect.project.member.invite.rejected

}, {
type: BUS_API_EVENT.CONNECT.MEMBER.COPILOT_ADDED,
toUserHandle: true,
creator: true

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gondzo Can we have better naming for creator? I mean creator is too generic to relate to any event. My example would be something like originator (not be confused with initiatorId which is the user who is performing the current operation)

{{#if [notifications.connect.project.member.invite.requested]}}
You are requested to add <strong>{{userFullName}}</strong> as a copilot
{{/if}}
{{#if [notifications.connect.project.member.copilot.added]}}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for keep track of, this would be updated as per event rename suggested above.

@@ -307,6 +335,7 @@ const handler = (topic, message, logger, callback) => {
// - check that event has everything required or throw error
getNotificationsForTopicStarter(eventConfig, message.topicId),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gondzo we might reuse the logic of originator, which I mentioned in other comment, here to be generic enough to send notifications to the originator.

@@ -13,6 +13,7 @@ module.exports = {
// These variables are currently being used to retrieve above role members using API V3 `/roles` endpoint.
// As soon as this endpoint is replaced with more suitable one, these variables has to be removed if no need anymore.
CONNECT_MANAGER_ROLE_ID: 8,
CONNECT_COPILOT_MANAGER_ROLE_ID: 113,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gondzo I forgot how do we manage these ids when we test the application in dev env?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We just use what is set in the admin app - role ids should be consistent between dev and prod

Copy link
Contributor

@RishiRajSahu RishiRajSahu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comment to address.

@@ -63,15 +63,15 @@
{{#if [notifications.connect.project.member.invite.requested]}}
You are requested to add <strong>{{userFullName}}</strong> as a copilot
{{/if}}
{{#if [notifications.connect.project.member.copilot.added]}}
{{#if [notifications.connect.project.member.invite.approved]}}
{{#if [creator]}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gondzo I think we need to rename this creator as well, need not we ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is done already @RishiRajSahu

@gondzo
Copy link
Collaborator Author

gondzo commented Feb 21, 2019

@RishiRajSahu merge conflicts resolved

@gondzo gondzo merged commit 8c86aaa into dev Feb 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants