SLA will not disappear when value field in JQL filter within its definition is updated.

This page is about Time to SLA for Jira On-Prem.

Problem

This problem occurs in two different scenarios if you have an SLA with an additional JQL filter in its definition.

1. Some issues are in the scope of that JQL filter, so you see the SLA on those issues. When you change the value of any field used in that JQL filter, within a workflow transition, such that the issue goes out of the scope of the filter, you expect the SLA to disappear, but it does not.  

2. Some issues are not in the scope of that JQL filter, so you do not see the SLA on those issues. When you change the value of any field used in that JQL filter such that the issue goes into the scope of the filter, you expect the SLA to appear, but it does not.

SLAs become visible/invisible when you do any updates on the issue or regenerate existing data for that SLA.

Diagnosis

The reason for this problem is the technical limitations within the Jira plugin framework. When the value of the field is changed, Time to SLA tries to evaluate the JQL in SLA definition. But Jira returns incorrect results from JQL because the new values have not yet been indexed.

Solution 1

Asynchronous SLA Calculation (6.40.0+)

Since it is not possible to change the way that Jira works, Time to SLA offers a limited but effective solution – the Asynchronous SLA Calculation method. You can activate the asynchronous SLA calculation for SLAs with this problem. TTS evaluates those SLAs out of issue event cycles so that JQL conditions will return the correct results.

There will be a small delay with Asynchronous SLA evaluations but don't worry, it will take one minute, tops!

Solution 2

Release Re-index Queue Post Function (7.5.0+) 

Another effective solution is the Release Re-index Queue Post Function. You can add the post function to workflow transition where you update the custom field or issue field.

Steps to use the Release Re-index Queue Post Function:

  1. Browse workflow transition.

  2. Change to Post Functions tab.

  3. Add the "Release Re-index Queue" post function.

  4. Make sure the post function that you are using to update the custom field is above the "Re-index", "Release Re-index Queue" and "Fire Issue Event" post functions.