Notifying the reporter of issue creation
Example Scenario
When an email arrives, you want the remote user to receive some kind of acknowledgement.
Option 1: JEMH Profile Driven
This method is a simple check-box made with setting: Profile > Configuration > Notification > Notify Users on Issue creation. This is driven by JEMH rather than JIRA, and will cause the originator of the email to receive an update. The content of this update is by default the ISSUE_CREATED template. Alternative content can be generated by creating a custom Issue Event Template Set for ISSUE_CREATED, see Use Template Sets (custom templates). Make sure to give the template a unique name so it can be easily identified. The Profile then needs to be updated, setting Configuration > Email > Issue Created TemplateSet, which will present all available ISSUE_CREATED TemplateSets, the DEFAULT means the system template.
Advantages | Disadvantages |
---|---|
|
|
Option 2: Use JEMH Event Listener
Note that if using Option 2, Option 1 must not also be used or duplicate notifications will occur.
Rather than the JEMH service that processes the email generate the notification, the JEMH IssueListener can pickup the ISSUE_CREATED event and, for JIRA and non-JIRA users broadcast notifications, almost exactly as JIRA itslef does, but allowing customization of notification content on a per-event basis through Issue Event Template Sets.
When JIRA Users are intended to be notified through the IssueListener, the project should have its Notification Scheme deselected (to disable JIRA's IssueListener for that project), and have this reselected in the JEMH IssueListener Project Mapping (JIRA section), to enable JEMH to take over the notification role.
Interim workaround for ISSUE_CREATED events/IssueListener problem
Unfortunately, there is a historical issue https://thepluginpeople.atlassian.net/browse/JEMH-280 (a big change, to be addressed in the near future) that means ISSUE_CREATE events occur before JEMH has had a chance to update the issue with JIRA watchers, non-JIRA participants etc. This means that notifications to non-JIRA users will not work, and that notifications to anyone other than the reporter (if a JIRA user) will also not work. The interim solution to this problem involves disabling the ISSUE_LISTENER handling of the ISSUE_CREATED event, and enabling notifications for a Custom JIRA event that the JEMH processing chain fires after it has completed all issue field updates.
The implementation of a simple acknowledgement using a Custom Event is documented in Send a simple acknowledgement.
Advantages | Disadvantages |
---|---|
|
|
To make the notifications reflect full ISSUE_CREATED notification content, the TemplateSet referred can generated as follows:
Create a new ISSUE_CREATED Issue Event Template Set
Edit, and:
set the title to 'Custom Issue Created Template'
change the eventType to be the custom event (created in JIRA as part of the tutorial above)
Save
If using JEMH for JIRA user notification
Check that ISSUE_CREATED event is not enabled for either non-JIRA or JIRA users
Check that the JIRA Project notification scheme is not enabled and that it is selected
In the IssueListener Project Mapping, for non-JIRA and JIRA users notification, select this Template set for the Custom Events template.