SLAs in Jira Service Management are missing or disappear

Still need help?

The Atlassian Community is here for you.

Ask the community

This KB article is for Jira Service Management Cloud. For the Server equivalent, see Missing SLA data in Jira Service Management.


Problem

SLA value incorrect or not updating after issue events

Occasionally issue events that should trigger a change to an SLA value are missed or interpreted incorrectly, resulting in an incorrect SLA value showing in the queues or issue view. Usually SLA calculations will catch up to missed events, and SLA values will eventually right themselves, but if they don’t, you can use the SLA Reconstruction Resource to trigger a recalculation of all open or ongoing SLAs for a list of issues. This only works for SLAs that are currently running.



SLA history incorrect or SLA incorrectly closed

If an SLA has been incorrectly stopped or closed SLA cycles are wrong, it is possible to use the SLA Reconstruction Resource to forcibly recreate the entire SLA value, including completed cycles, from the recorded issue history. In the workaround described below, use force=true as the URL parameter in step 2.b.


This operation destroys all existing SLA data for the specified tickets, and therefore should not be performed unless you are really sure that you want to reconstruct the SLAs. This operation is not reversible and may result in data loss.


Workaround


  1. Optional: Install Postman. It's free and provides a nice User Interface to assist you in sending cURL commands to our API. We'll be using Postman for the next steps, but you can find an example cURL command at the end of the article.

  2. Create a new request with Postman

    1. Choose the type POST.

    2. In the URL box, paste the following URL, replacing mysite.atlassian.net with the link from your site:

      https://mysite.atlassian.net/rest/servicedesk/1/servicedesk/sla/admin/task/destructive/reconstruct?force=true
    3. In the Body tab right below the URL, select raw and JSON.

    4. On the text box, add the affected tickets using the format ["TICKET-001", "TICKET-002", ... , "TICKET-1234"].
  3. Authenticate with your Atlassian account. To do this, create an API token.

    1. Go to https://id.atlassian.com/manage/api-tokens > API Tokens > Create API Token

    2. Add a label and click Create and your token is ready to go.

  4. On Postman again, click on Authorization, select the type Basic Auth.

    1. Type the email you use to log in to your Service Management site.

    2. On Password, paste the token you generated in the previous step.

  5. With everything configured, it's time to correct the SLAs. To do this, just click SEND.

  6. Once you click SEND, if everything worked correctly, it will show the status 200 in the bottom right corner.


The SLA calculation process is technically asynchronous, so it may take a few minutes for updated result to appear in the queues or issue view.

cURL Command

If you prefer, you can use cURL commands on a terminal to recalculate your SLAs. Here's how the command should look like for the same examples used in the steps above:

curl --request POST 'https://mysite.atlassian.net/rest/servicedesk/1/servicedesk/sla/admin/task/destructive/reconstruct?force=true' \
--header 'Content-Type: application/json' \
--user youremail@company.com:yourapitoken \
--data-raw '["IT-420"]'


Required permissions


User must have Jira Administrator permissions and must be an Agent in the target projects.



Last modified on May 25, 2022

Was this helpful?

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