Skip to content
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

Notification on Canvas created #156

Closed
15 tasks
techsmyth opened this issue Nov 14, 2022 · 2 comments
Closed
15 tasks

Notification on Canvas created #156

techsmyth opened this issue Nov 14, 2022 · 2 comments

Comments

@techsmyth
Copy link
Member

techsmyth commented Nov 14, 2022

Description

As a user I want to be notified when a new canvas is crated

Acceptance criteria

  • New preference to allow users to receive notifications when a canvas is added to a Canvas Callout. Default is true, in both migration to add it and in new user profiles.
  • New notification event to trigger the notification from notification service
  • New notification email template for canvas added on callout
  • Migration for new preference

Additional Context

From previous issue:

  • Notification email for both members and admins when a new canvas is created
  • Following admins receive the notification (same as aspect_created notification)
    • HUB_ADMIN
    • CHALLENGE_ADMIN
    • OPPORTUNITY_ADMIN
  • Following members receive the notification (same as aspect_created notification)
    • HUB_MEMBER
    • CHALLENGE_MEMBER
    • OPPORTUNITY_MEMBER
  • Preference Set - see additional context
  • Text same as aspect (src/templates/aspect.created.admin.js + src/templates/aspect.created.member.js) just change aspect with canvas

Additional Context

      {
        definitionSet: 'user',
        group: 'NotificationCommunityAdmin',
        displayName: '[Admin] New canvas created',
        description:
          'Receive a notification when a canvas is created in a community I am an administrator of',
        valueType: 'boolean',
        type: UserPreferenceType.NOTIFICATION_CANVAS_CREATED_ADMIN,
      },
      {
        definitionSet: 'user',
        group: 'Notification',
        displayName: 'New canvas created',
        description:
          'Receive a notification when a canvas is created in a community I am a member of',
        valueType: 'boolean',
        type: UserPreferenceType.NOTIFICATION_CANVAS_CREATED,
      },
@Comoque1
Copy link
Member

Newly registered user has the new preferences set to false
image.png

SELECT pd.groupName, pd.displayName, pr.value, pd.definitionSet, us.displayName
FROM alkemio.preference_definition as pd
join alkemio.preference as pr on
(pd.id = preferenceDefinitionId)
join alkemio.user as us on	
(us.preferenceSetId = pr.preferenceSetId)
where  pd.displayName in ('New Canvas created', '[Admin] User profile deleted', 'New comment on Discssion')

@techsmyth
Copy link
Member Author

@Comoque1 good catch. Now new users should have the notification for canvas created set to true; the other two remain false.

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

No branches or pull requests

2 participants