The Approval notification is not sent when a Service Management Request is waiting for an approval

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Server and Data Center Only - This article only applies to Atlassian products on the server and data center platforms.

Problem

When a Service Management request transitions to an approval status, the approval notification is not sent to the approver(s) although it should.

Expected behaviour

A customer notification of type Approval Required should be sent to all the approvers defined in the request:

Cause

This issue might happen due to either of the reasons below:

  • Root cause 1
    • The customer notification of type Approval Required is disabled
  • Root cause 2:
    • The Approvers field used to list the approvers of the requests does not match the field defined in the approval status of the workflow
  • Root cause 3:
    • The Customer Request Type field was not set before the request transitioned to the status that requires an approval
  • Root cause 4:
    • The Approvers field was not set before the request transitioned to the status that requires an approval
    • This situation can happen:
      • If the Approvers field is set via the UI after the request entered the status that requires approval
      • Or if the Approvers field is set automatically during the transition going to the Approval status (via a post-function coming from a 3rd party add-on, or via some automation)
  • Root cause 5:
    • The request is transitioned a 2nd time to the same status that requires approval (the notification was sent the 1st time, but not the 2nd time)
  • Root cause 6:
    • The post-function Set issue status to the linked status of the destination workflow step is missing from the transition going to the Approval status

Diagnosis

  • Root cause 1
    • Check if the customer notification of type Approval Required is disabled via the page Project Settings > Customer Notifications within the Service Management project configuration.
    • In the screenshot below, it is disabled:
  • Root cause 2:
    • Check how the Status that requires an approval is configured in the workflow via the page Project Settings > Workflows within the Service Management project configuration
    • In the screenshot below, we can see that the field used to see which users should get a notification is called Approvers. We need to make sure that the same field is used to set the approver of the request during its creation:

  • Root cause 3:
    • For the approval notification to be sent, it is required that the Customer Request type field is set before the request enters the Approval status
    • If a request is created via the Create button from Jira UI and not from the Customer Portal, the Customer Request type field will not be automatically set and the approval notification from be sent:
       
  • Root cause 4:
    • For the approval notification to be sent, it is required that the Approvers field is set before the request enters the Approval status
    • Check the history of the ticket to see if the Approvers field was set before the issue transitioned to the Approval status
    • Check the post-functions from the transition that directs to the Approval Status
      • If the Approvers field is set via a 3rd party add-on post-function or script, there is a chance that, due to some race condition, the Approvers field won't be set "on time" (before the request enters the approval status)
      • In such case, you might notice that the approval notification might randomly be sent or not sent
  • Root cause 5:
    • Because of the following bug below, the approval notification is only sent the 1st time the issue transitions to the approval status. If there is a transition configured to re-enter this status, then no approval notification will be sent
    • https://jira.atlassian.com/browse/JSDSERVER-6080
  • Root cause 6:
    • Check the post-functions from the transition that connects to the Approval Status
    •  If you see that the Set issue status to the linked status of the destination workflow step post-function is missing, then it's probably the reason why the approval notification is not sent
    • (warning) Note that this post-function cannot be deleted when using Jira out-of-the box, so this case should be rare. However, it seems that some 3rd party add-ons make it possible to remove it


Resolution

  • Root cause 1:
    • Re-enable the Approval Required type notification:

  • Root cause 2:
    • Make sure that the Approvers field used in the Approval status configuration is the same field used to set the list of approver(s) during the request creation
    • (warning) Note that it is possible that you might have duplicate fields with the same name Approvers. Make sure that it is not the case by looking for this field in ⚙ > Issues > Custom fields, and ensuring that there is only 1 custom field with that name
  • Root cause 3:
    • Make sure that the Customer Request Type field is always set before the request enters the Approval status (by ensuring that the request is created from the portal instead of from the Jira UI)
  • Root cause 4
    • Make sure that the Approvers field is always set before the request enters the Approval status:
      • if the Approvers field is set manually in the UI, make sure that this field is set either at the request creation, or while the request is in a status located before the status with approval
      • if the Approvers field is set via a 3rd party post-function, one way to ensure that this field is set early enough (before the request enters the status with approval) is to:
        • Add an intermediate status in the workflow (let's call it "intermediate" status)
        • Add a transition that connects from the issue creation to the intermediate status, and move the 3rd party add-on post-function there
        • Add a transition that connects from the intermediate status to the approval status
        • (warning) Optional: create a Service Desk automation rule (via Project Settings > Automation) that will automatically transition any ticket from the "intermediate" status to the status with approval
  • Root cause 5
    • There is no workaround for the bug, so make sure that the request can only enters once in the Approval status
  • Root cause 6
    • Add the Set issue status to the linked status of the destination workflow step to the list of post-functions



If the problem persists, or if the query from the diagnosis step did not return any row, please reach out to Atlassian Support via https://support.atlassian.com/.


Last modified on Oct 6, 2021

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.