Send post function notifications

A workflow post function provided by JEMH can be used to send notifications to specific recipients when an issue workflow transition occurs.

Adding a post function to an issue workflow

  1. Start by editing the target Jira issue workflow. Select Settings > Issues and click Workflows. Click Edit on the relevant workflow.

  2. Select the target workflow transition either in the diagram or text view

  3. Select the Post Functions tab and click Add post function

  4. Select the JEMHCloud post function that you would like to use, and click the Add button

Configuring a post function

Notification contents

The Content tab has settings that allow the contents of the post function notification to be set. An Ad hoc type notification template set can be selected, along with the format (HTML or text), along with custom text content specific to this particular notification.

Please note that the custom text content Message field should be used as an additional plain text message. Follow https://thepluginpeople.atlassian.net/wiki/spaces/JEMHC/pages/49184901 to customize notifications using the provided $issue context

Recipients

The To, CC and BCC tabs allow you to specify exactly who the recipients of the notification are:

Sender Email Address can be defined, this is the address used in the email notification’s From header. Varying it is useful in some situations but your outbound mail server must allow it.

Sender Personal defines the display name of the sender address for the notification (if the configured outbound connection allows this). This should not include quotes, just the text required (for example, setting NotificationBot for this setting could result in the From header looking like NotificationBot <from.address@example.com>

Reply-To Email Address is optional and sets the Reply-To header address of the email notification.

Attachments

Its possible to include attachments in post function notifications

  • All Attachments: which makes sense during 'create', and can be limited to a filename filter.  The Filename Filter is a comma separated list of regular expressions - a type of data used in JEMHC and JEMH a lot.

  • Recent Attachments: can also be used, but due to the issue above, a 'time window' is required to look back from the issue event, to find attachments created within.  This works fine on create, ad fine for simple file uploads with a small comment (e.g. within 30s) but will fail for 'big' comments.

Issue commenting

The settings on the Issue Update tab allow you to choose whether the post function notification is recorded on the related issue as a comment.

Further settings

Here you can select the Message Outbound configuration that describes the outbound mail server.  It isn't possible to know the status of a given Message Outbound in the post function at this time(i.e. it could be offline or a dead-letterbox configuration).

Post function ordering

It is important to make sure that the post function you add to the workflow is positioned correctly in the post function execution order. Initially the added post function will be first in the list - this is not ideal as field changes in the issue transition have not yet been applied. Move the JEMHC post function down until after the Issue has been re-indexed. This will reduce the chance of issues occurring due to missing data.

Before:

After:

Make the workflow active

In order for your workflow changes to persist, you must commit them. To do this, click Publish Draft shown in the Jira warning at the top of the workflow configuration screen.

Frequently Asked Questions

How Many Emails Get Sent?

The behaviour of email-based post functions is that one email is sent that includes every recipient (To, CC, BCC).

What changes have been made due to GDPR

Methods of access to personally identifiable data have been changed to comply with GDPR. Details about these changes can be found in this blog post.