Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 4 Next »

DRAFT

During notification, JEMHCloud renders templates differently depending on the recipient users, for example due to security.  Private/restricted comments should only be sent to users that are allowed to see it, so if the recipient is an email only user, a restricted comment shouldn't rendered/sent.   Similarly, if the recipient is a JIRA user without the required role or doesn't belong to the required group.  Notifications are sent or not according to the information displayed. Some emails could be empty if no comment (e.g restricted) or change is displayed. In this case, the notification is not sent.

This guide will show you how to verify the content of an email depending on the issue's event and the recipient. 

Step-by-step guide

  1. Create a private comment in an issue.  Note that project must have an issue notification mapping associated (Notifications->Notification Mappings->Issue)
  2. Create a Preview Context from the Web-Hook event JIRA generates

    The comment on the event is restricted to administrator as it includes something like:
    {
       "self": "https://dev-thepluginpeople.atlassian.net/rest/api/2/issue/13307/comment/12312",
       "id": "12312",
       "author": {...},
       "body": "This a comment only Admins can see",
       "updateAuthor": {...},
       "created": "2015-04-09T15:50:41.600+0100",
       "updated": "2015-04-09T15:50:41.600+0100",
       "visibility": {
           "type": "role",
           "value": "Administrators"
       }
    }
  3. Go to Notifications -> Preview.  Select the used Issue Updated Template and the preview context you've just created
  4. Leave Recipient blank to test how the email looks like if it is sent to an email only user. Hit Preview.
  5. The error identifies that the generated email is empty and the notification wouldn't be sent.  The Email is empty as the event contains one comment that email-only users are not allowed to read.  If you repeat the test changing the recipient to an administrator, Email content should be displayed:


 

This same strategy (create/update/comment issue, create preview context and preview templates) can be used to troubleshooting multiple email notification problems.

  • No labels