Restore timer and stopwatch by issue history

Data Center This page documents Time in status, Timer, Stopwatch and Calendar fields for Jira Data Center and Server. On Jira Cloud? See Time in Status (Forge) for Jira Cloud.

You can restore or recalculate the value of timers and stopwatches based on the issue history. Timers and stopwatches process events (triggers) in real time and record changes.

A restart found in the history is treated exactly as a live restart is: the cycle built up to that point is archived and a new one opens from zero. See Stopwatch events - START, STOP, PAUSE, RESTART.

This utility analyzes the history of requests and finds a match between the entry in the history and the trigger from the timer or stopwatch configuration. And based on this analysis, it gives the current value of the counter based on the history of the issue. Further, this counter will work as before - process triggers in real time.

screenshot

The administrator specifies the JQL and fields for validation. Then one of three actions is performed:

  • Find tasks whose data does not match the history. The reasons for the differences can be very different: errors, problems with the server, incorrect configuration, etc. As a result, requests with “incorrect” values will be shown and the error will be indicated.
  • Find tasks with an error in the data and immediately replace the current values with new ones.
  • Or, without analysis, simply calculate and set a new value. For example, if there was never a value in the task.

Running in the background

As of 6.6 Recalculate and Recalculate Errors run as a background job by default. You do not have to keep the page open while a large JQL is processed.

Progress

While the job runs, the page shows a progress bar with the counts - processed / total / recalculated / errors - and an estimate of the time left. If you leave the page and come back while the job is still running, you see its progress again.

Cancel

Cancel stops the job between two issues: the issue being processed is finished, the rest are not touched. Issues already recalculated keep their new values.

The result

When the job ends, the page shows a summary and the first errors instead of a table with one row per issue. Each error reads <exception class>: <message>. If any issue failed, the job ends with a warning: N issues were not recalculated (P %). The details of the errors - with the stack trace of the first exception of each class - go to the Jira log (atlassian-jira.log, level WARN); send that excerpt when you open a support case.

One job per instance

Only one recalculation job runs on the instance at a time. A second start - from this page, from another node or from the REST API - is refused, and the refusal names the id of the job that is running.

Re-index once at the end

The job sets the values without re-indexing each issue. That is what makes it fast, and it has one consequence:

  • on the issue the new values are visible at once;
  • search and JQL read the index, so they see the new values only after one full re-index (System → Indexing) when the job has finished. The page reminds you of it.
The backfill in a field's settings - the recalculation that fills a new field for existing issues - runs in the background the same way.

The REST endpoints take the same switch: background: true returns a job id at once, and the job is followed and cancelled through calculateByHistory/jobs. See REST API - Recalculation by history in the background.


JiBrok time in status Time in status | SLA | Timer | Stopwatch
Migration
Release notes
Tutorials
Settings
Troubleshooting
Work calendars
Time in status
Timers and Stopwatches
Stopwatch
Timer
Additional functions
Issue panels
Reports
Field Helpers
Other fields
API
Reference information