Users will often want to get progress updates on their issues after they have logged them. So, instead of business users having to ask for updates, we will proactively update them through our newly acquired knowledge, that is, JIRA notifications.
In Chapter 5, Field Management, we added a custom field called Direct Manager, which allows users to add the manager of the new employee or leaving employee, so she can be kept in the loop.
The other customization we made in Chapter 7, Workflow and Business Process, is the addition of new transitions in the workflow. We need to make sure that those transitions fire appropriate events and also send out notifications. In summary, we need to do the following:
While you can achieve both using other JIRA features, such as adding users as watchers to the issue and reusing existing JIRA system events, this exercise will explore the options available to you. In later chapters, you will see there are other criteria to consider while deciding on the best approach.
The first step to enable e-mail communication, as you will have guessed, is to register mail servers in JIRA. If you are using the standalone distribution of JIRA, it is recommended that you add your mail server by entering the host information:
After adding your mail server, you can try sending yourself a quick test e-mail to check whether JIRA is able to access your server successfully.
In Chapter 7, Workflow and Business Process, we created a few new workflow transitions. We now need to update these new transitions to make sure they fire appropriate events.
HR: Termination Workflow
.Issue Updated
event rather than the Generic Event
.We are using the Issue Updated event because it reflects the fact that the issue is being updated; also, the event is tied to more appropriate e-mail templates. We can of course, also create new custom event and e-mail templates and make the post function to fire the custom event instead.
Now, you need to have your own notification scheme, so you can start adding notifications to your events. We will base our notification scheme on the default scheme to help us get things set up quickly:
HR Notification Scheme
and click on Update.This will create a new notification scheme with the basic notifications prepopulated. All you need to do now is modify the events and add your own notification needs.
There are two rules you need to follow to add notifications. First, you need to add notifications for your custom events so that e-mails will be sent out when they are fired. Second, you will want users specified in the CC list custom field to also receive e-mails along with the assignee and reporter of the issue:
HR Notification Scheme
.Issue Updated
event type.Direct Manager
from the drop-down list.Nice and easy. With just a few clicks, you have added the Direct Manager custom field to the notification scheme. So now, regardless who is put into the field, the user will receive notifications for issue updates.
The last step, as always, is to associate your scheme with projects for activation:
HR Notification Scheme
we just created.With just a few clicks, you enable JIRA to automatically send out e-mails to update users with their issue's progress. Not only this, but you have tied in the custom fields you created from earlier chapters to manage who, along with the issue assignee and reporter, will also get these notifications. So let's put this to the test!
If you do not receive e-mails from JIRA, check your mail queue and check whether the mail is being generated and follow the steps from the Troubleshooting notifications section in this chapter.