Scope Delta: Sprint JQL for Jira

How it counts

The goal is simple: the same rules as Jira's Sprint Report. We compared the functions with the Sprint Report on real sprints on our own Jira Cloud test site, including completed and reopened sprints. This page explains the rules and where they differ from what you might expect.

When a sprint "starts"

The start is the sprint's startDate, the same basis the Sprint Report uses.

  • Jira does not store the moment someone clicked "Start sprint". If the planned start date is in the past, Jira replaces it with the time the start dialog was opened. If you type a different start date, that value is kept.
  • If you set the start date earlier than the real start, issues that you put in between that date and the click are counted as added. The Sprint Report does the same.
  • If you change the start date later, the counts are recalculated from our records.

The three groups

For sprint X:

  • At start: issues in the sprint at its start date.
  • Added: issues that were not there at start and were put in after start, even if they were taken out again later.
  • Removed: issues that were in the sprint at some point after start and are not in it now (or at completion).

An issue added after start and taken out again is in both added and removed, like in the Sprint Report. To get only the added issues still in the sprint, use sprint = X AND issue in addedAfterSprintStart(X). Both lists matched the Sprint Report in our tests.

Removed and put back

  • In the sprint at start, taken out, put back: not added and not removed. It is an "at start" issue that is still there. The Sprint Report does not count it as added either.
  • Added after start, taken out, put back: counted as added. The Sprint Report counts it as added too (checked on the test site).

Completing a sprint

  • Changes after completion are ignored. Counts are fixed at the completion date.
  • When you complete a sprint, Jira moves unfinished issues to the next sprint. That is not a change to the sprint, and it is not counted as added or removed.

Reopening a sprint

  • A reopened sprint is counted as one continuous sprint again.
  • We checked sprints that had issues at start and were completed then reopened. Counts matched the Sprint Report and a full recalculation from the change history.
  • Moves made after reopening are counted as normal.

Issues created in the sprint

An issue created directly inside the sprint after it started counts as added.

How it stays current

Scope Delta listens to Jira's issue and sprint events and records each move in and out of a sprint (issue ID, sprint ID, time). It uses these records instead of re-reading Jira's change history every time. Results update within about 5 minutes after issues move.

For a completed sprint, a check against Jira's change history runs some hours after completion. If it finds a difference, it uses the change history's answer.

The time the app starts watching

  • Sprints that start after installation: fully recorded from their start date.
  • Sprints that started before installation and are still running: the records start at installation. A one-time collection from Jira's history can take a few hours and needs fewer than 3,000 candidate issues. Until it finishes, added and removed return a "still being collected" error.
  • Sprints that ended before installation: added and removed do not work (error).
  • If the license lapses and comes back, recording restarts at the new time. Sprints that were running when it came back, or that began during the gap, are treated like sprints that started before installation. Sprints that ended during the gap are treated like sprints that ended before installation.

What we have not tested

  • Sites we have not tried. We tested on one Jira Cloud test site.
  • Time differences of a few seconds around a sprint's start. We record events when they arrive, usually within a few seconds. An issue added within a second or two of the start can be placed on either side. For completed sprints the later history check corrects this.