Transitioning a ticket using the "Issue Closed" workflow post-function intermittently fails to stop the SLA timer

XMLWordPrintable

    • 1
    • Minor

      Issue Summary

      When a ticket transitions using the "Issue Closed" workflow post-function, Jira intermittently fails to publish the status-change event that the microservice needs to stop the SLA timer. This is caused by a transient database error on the Jira side that aborts the event publish.

      Steps to Reproduce

      1. Configure a workflow with the "Issue Closed" post-function that triggers an SLA timer stop
      2. Transition a ticket through the workflow to the closed status
      3. Observe the SLA timer behaviour on the transitioned ticket
      4. Repeat multiple times to reproduce the intermittent failure

      Expected Results

      Upon ticket transition via the "Issue Closed" post-function, Jira publishes the status-change event successfully, and the microservice stops the SLA timer immediately.

      Actual Results

      Jira intermittently fails to publish the status-change event due to a transient database error that aborts the event publish. As a result, the microservice does not receive the event and the SLA timer continues running despite the ticket being closed.

      Workaround

      Create Automation rule with the following details:

      • Trigger: "Work item transitioned" with "To status" set to terminal statuses that should stop SLA calulcation
      • Action: "Send web request" with the following parameters:
        • Web request URL: https://<instance_name>.atlassian.net/rest/servicedesk/1/servicedesk/sla/admin/task/destructive/reconstruct?force=false
        • HTTP method: POST
        • Web request body: Custom data
        • Custom data:
          ["{{issue.key}}"]  

        • Headers:
          • Key: Authorization
          • Value: Basic <auth token>
          • Where auth token is "<username>:<API token>" in base64 encoding
          • Set this header as "Hidden" as it contains sensitive token information

      This action is equivalent to clicking the "Refresh" button on the SLA panel in the work item view.

      More details on auth token:

      • Auth token is "<username>:<API token>" in base64 encoding
        • Example: "john@sample.com:abcdefghijklmnopqrstuvwxyz" <-- base64 encoded to be "am9obkBzYW1wbGUuY29tOmFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6"
      • API token is to be generated from https://id.atlassian.com/manage-profile/security/api-tokens by clicking the "Create API Token" button

              Assignee:
              Unassigned
              Reporter:
              Nabil
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: