Data within Time to SLA gadgets is missing or inconsistent

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

Problem

Time to SLA gadgets don’t display any information.
OR
Time to SLA gadgets display incorrect information.

Diagnosis

With Time to SLA version 9.4, all SLA gadgets switched to Lucene-backed indexed calculation mechanisms, which brought serious performance improvements.

Sometimes those indexes get corrupted, and as a result, Time to SLA gadgets might create inconsistent results.

SLA Lucene indexes were introduced in the TTS 9.0 version along with the new slaFunction feature, which also utilizes those indexes. 

Possible Causes

There are two reasons why SLA indices might become inconsistent:

  1. SLA data for some issues are missing:
    This is possible if you have created a new SLA contract but did not execute recalculation for existing issues.

  2. SLA data exists but is somehow not indexed properly:
     If you have not performed a system-wide re-indexing after upgrading TTS 9.0 version then there is a very high chance that you suffer from this.

Solutions

First, you have to understand which one of the possible causes fits your problem. The easiest way to find out is to browse some issues and check any missing SLAs. 

If there are no missing SLAs on issues

That means SLA data is intact, but Lucene indexes are corrupted.
Execute a system-wide or project-wide re-indexing and check the results again. Background indexing is enough for this task.

If there are missing SLAs on issues
Then it means that the problem is rooted in the actual SLA data.
Go to Time to SLA > SLA for existing issues and execute a system-wide SLA regeneration.

This solution also covers the first solution since SLA regeneration also indexes issues, but beware that SLA regeneration takes much longer than simple re-indexing.