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

Advantages

Disadvantages

  • quick, simple

  • can notify jira, non-jira, or all users

  • does permit customization of content, e.g. 'thanks' type acknowledgements


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

Advantages

Disadvantages

  • More flexibility

  • More features

  • More complex to implement

To make the notifications reflect full ISSUE_CREATED notification content, the TemplateSet referred can generated as follows:

  1. Create a new ISSUE_CREATED Issue Event Template Set

  2. Edit, and:

    1. set the title to 'Custom Issue Created Template'

    2. change the eventType to be the custom event (created in JIRA as part of the tutorial above)

  3. Save

  4. If using JEMH for JIRA user notification

    1. Check that ISSUE_CREATED event is not enabled for either non-JIRA or JIRA users

    2. Check that the JIRA Project notification scheme is not enabled and that it is selected

  5. In the IssueListener Project Mapping, for non-JIRA and JIRA users notification, select this Template set for the Custom Events template.