Service Management Notifications not sent on Resolved or Reopened Requests
Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.
Problem
When a Service Management request is resolved or reopened, no notifications are being sent out to the Reporter. There are no errors in the logs.
A request is considered as Resolved if a value is set in the Resolution field, e.g. during a transition.
A request is considered as Reopened if the Resolution field is cleared, e.g. via a post function.
Diagnosis
- You have already gone through all the basic troubleshooting steps in Troubleshoot customer notifications in Jira Service Management projects knowledge base article.
- The Reporter is able to receive all other notifications, such as when Request is created, commented on, and participant added.
- You are setting the Resolution of the request as a Workflow Post function, instead of via a screen with the Resolution field in a transition.
Cause
As detailed in Managing Service Management Notifications documentation, notification for resolved/reopened is sent if:
- the request is resolved with a set resolution field
- the request is reopened with a cleared resolution field
What this means is that the Resolution field must be set to a certain value before the transition itself occurs. Taking a look at a typical example set of post functions for a transition:
1. Set issue status to the linked status of the destination workflow step.
2. Add a comment to an issue if one is entered during a transition.
3. Update change history for an issue and store the issue in the database.
4. The Resolution of the issue will be set to Successful.
5. Re-index an issue to keep indexes in sync with the database.
6. Fire a Issue Closed event that can be processed by the listeners.
By referring to steps #1 and #4, here we can see that the issue is being transitioned to the next status in Step #1, but the resolution is only set in Step #4.
This means that the Resolution is being set AFTER the transition, and no notifications will be sent.
Resolution
The post function for setting the Resolution field must occur before the post function for changing the issue status.
1. The Resolution of the issue will be set to Successful.
2. Add a comment to an issue if one is entered during a transition.
3. Update change history for an issue and store the issue in the database.
4. Set issue status to the linked status of the destination workflow step.
5. Re-index an issue to keep indexes in sync with the database.
6. Fire a Issue Closed event that can be processed by the listeners.