Quartz Docs
Docs › Configure › SLA Fields

SLA Fields

SLA Fields copies SLA timer values onto requests in Jira fields, so JQL, boards, queues and Jira Automation can read them.

Who can open it

Jira admins, Full configuration and the Manage SLA fields grant can change SLA fields. View configuration can read them. Creating a new Jira field still needs Jira admin rights. Someone who is not a Jira admin can pick only a Jira field that Quartz created, or one that an SLA field they manage already writes into: any other existing field is a Jira admin's choice. A grant limited to some projects or SLAs can change an SLA field only when every SLA it reads is inside the grant, and it has to pick Chosen SLAs only: Every enabled SLA would also reach SLAs added later.

The SLA Fields page. The lead says 2 SLA fields write into Jira on 420 open requests, from 7 enabled SLAs, beside Quartz's 4 built-in fields. The card SLA deadline writes a Deadline from every enabled SLA into the Jira field SLA deadline, which Quartz created, with the example 17 Sep 2026, 17:32; the card Minutes left writes Time remaining into SLA time remaining (min), with the example 180. Both are written on 420 open requests. The Field updates card: Pause field updates off; Up to date, 882 values are the ones Jira holds; As requests change chosen over Every so often; the last update at 14:05, started by Marcus Rees, wrote 92 values on 46 requests; then Update fields now.
The SLA Fields page: a card for each SLA field, then Field updates with the freshness line and Update fields now.

Three ways to read Quartz from Jira

Setup JQL Jira Automation Where
The four built-in fields None Yes In a rule's JQL search; for a rule that acts on a change, use an SLA field On the request where a Jira admin put them on its screen, and as columns in searches, queues and boards
Quartz's search names and quartzSla() None Yes Yes, in a rule's JQL search; in a rule's JQL condition, with the exact token Requests Quartz measures, except ones already resolved when Quartz 5 started reading your site's changes (below)
SLA fields You map a value to a real Jira field Yes Yes, "Field value changed" and JQL Every request its SLAs measure, where Jira takes the value (below); a person sees it where the field is on the screen

The built-in fields

Quartz fills four fields itself, in the background, and writes them each time an SLA timer on the request changes state:

A request shows them only where a Jira admin has put them on its screen; JQL searches them, and Jira's searches, queues and boards can show them as a column. They are read only. For a Jira Automation rule that acts when a value changes, use an SLA field: that is what SLA fields are for. Quartz writes a built-in value only when Jira would show it differently, so an unchanged Quartz SLA Target adds no entry to a request's History (measured on a test site: none on 14 requests in more than ten hours of writes).

Quartz's search names

Quartz writes its own search property on each request it measures while the request is open, and the property stays once the request is resolved, whether or not an SLA field is set up, so these names work in JQL with no configuration. A request that was already resolved when Quartz 5 started reading your site's changes carries none unless it is reopened, and Update fields now does not add it: these names and key in quartzSla() do not find it, and key not in quartzSla() finds it as it finds a request the SLA does not measure. The property holds the worst state, the next deadline, the minutes left, the breached count and opaque tokens. It can also hold the word hide, on a request where the customer portal panel has nothing to show. It never holds an SLA name: who can read a request's properties is up to Jira and to every app on your site, so Quartz keeps names inside Quartz.

Name What it holds Example
quartzWorstState The worst state on the request, in the words the built-in Status field writes, without ", paused". quartzWorstState = "Breached"
quartzNextDue The soonest fixed deadline among the request's SLA timers: a running one's, or a date goal's. A paused SLA timer on a working-time goal has none. quartzNextDue <= endOfDay() AND resolution IS EMPTY
quartzMinutesLeft Working minutes left on that deadline, in the steps a Time remaining field takes: exact at each threshold and at the deadline, and below zero once it has breached. quartzMinutesLeft < 60 AND resolution IS EMPTY
quartzBreachedCount How many of the request's SLA timers have breached. quartzBreachedCount > 0
quartzSlaTokens One opaque token for each SLA and state on the request. quartzSlaTokens ~ "qz4817e3s1"

When no enabled SLA measures a request any more (its scope changed, or its SLA was deleted), Quartz removes the property from that request, so these names stop finding a request Quartz no longer measures. Once after an upgrade, Quartz checks every request that holds the property in the background; after an SLA is deleted, it checks the requests whose property still names that SLA's tokens. The SLA Fields page shows how far it has got, and until it finishes these names can still find some of those requests. If Jira cannot run that search to its end, Quartz removes what it found and tries again later, first after an hour. A run that stops before it finishes (Jira or Quartz's database failing) is tried again after 1, 2, 4 and 8 hours, then once a day, from where it had got to; after five failures in a row, configuration health says so.

Search by SLA name: quartzSla()

Quartz adds its own JQL function. It looks the SLA up by name inside Quartz and finds the requests where that SLA's timer is in the state you ask for:

key in quartzSla("Time to first response", "breached")
key in quartzSla("Time to first response")
key not in quartzSla("Time to resolution", "met")

When a query has a mistake. A state quartzSla() does not know, or quartzSla() after a field other than key (for example parent in quartzSla("Time to first response")), is a mistake. Jira shows the error on its search page, in Quartz's words, for example "The second value of quartzSla() must be an SLA timer state: breached, at risk, critical, paused, running, met or ever breached." Elsewhere (an Automation rule, a script, Jira's REST search) the same query can find no requests and show no error, as Jira's REST search did on a test site. So try a query you change by hand on Jira's search page before you put it in a rule. A name no SLA has is not a mistake: it shows no error, even on Jira's search page.

The exact token

quartzSlaTokens ~ "qz4817e3s1" names one SLA in one state: qz, a number of this installation of Quartz, e, the SLA's number, s and the state's number. One token never matches another SLA, even one whose name shares words, and it stays the same when the SLA is renamed, so a filter or a rule on it keeps working. It works everywhere Jira takes JQL, an Automation rule's JQL condition included. Nobody types a token: SLA Fields writes it for you. The tokens belong to this installation: when Quartz is uninstalled and installed again, or its data is cleared, the tokens change, and SLA Fields writes the new ones.

The block Search Quartz without setting anything up, on the SLA Fields page. First response is picked as the SLA and Breached as the state. Quartz writes the search two ways: by name with quartzSla(), for a search, a saved filter, a queue, a board or a scheduled rule's JQL search, and by the exact token qz4817e17s1 in quartzSlaTokens, for an Automation rule's JQL condition. Below come quartzWorstState, quartzNextDue, quartzMinutesLeft and quartzBreachedCount, every search with a Copy the search button, and a note that Jira shows quartzSla()'s errors on its search page, while a rule or a script with the same query can find no requests and show no error.
Search Quartz without setting anything up, a block of the Automation and JQL card on SLA Fields: pick an SLA and a state, then copy the search by name or by exact token.

The SLA Fields page lists these under Automation and JQL: pick an SLA and a state, and it writes the search both ways, by name with quartzSla() and by the exact token, each with Copy the search, and says which one a rule's JQL condition takes. Its recipe Check an SLA timer in a rule's JQL condition writes the token for you.

Creating an SLA field

Create SLA field opens the editor. A new SLA field copies one SLA timer value onto every open request in its sources.

The Create SLA field page. The lead says a new SLA field copies one SLA timer value onto every open request in its sources, so JQL and Jira Automation can read it. SLA status is typed as the name, marked Changed. Under What to store, fifteen value types sit in three groups: eight under The deadline and the time, from Deadline to Time past the goal; four under The state, where Status is chosen; and three under The goal. A note says the worst status wins: breached before critical, critical before at risk. The save bar reads Unsaved changes: Name, beside Discard changes and Create SLA field.
Create SLA field: the name, then what to store, fifteen value types in three groups. Here a Status field named SLA status is being made.
  1. Name. Quartz's own name; a field Quartz creates takes the same name in Jira.
  2. What to store. One of fifteen value types:
Group Value type What it writes
The deadline and the time Deadline (a date and time) The instant the SLA timer comes due, worked out on its calendar, with any extension. Empty while the SLA timer is paused on a working-time goal, because that instant moves later for as long as the pause lasts; Quartz writes the new deadline when it runs again. A date goal keeps its date.
Time remaining (whole minutes) Working minutes left, negative once it has breached. It stops counting down while the SLA timer is paused.
Time used (whole minutes) Working minutes used, paused time left out.
Started, Stopped, Paused since (a date and time) The instant the SLA timer started, stopped, or was paused.
Paused time (whole minutes) Working minutes the SLA timer has spent paused so far.
Time past the goal (whole minutes) Working minutes past the goal. Zero until it breaches.
The state Status (text) Breached, Critical, At risk, On track, or Met once it has stopped; ", paused" while paused; Measuring and Measured for an SLA with no goal; No date set for a date goal whose date is empty.
Breached count (a number) How many of the request's SLA timers have breached.
Ever breached (text, Yes or No) Yes when the SLA timer has breached, whether it still runs or has stopped. It reads the cycles the SLA counts: a breach before a reset, or in an earlier cycle of an SLA that counts the last cycle only, is not kept.
Cycles (a number) How many times the SLA timer has started on this request, counting the one running now.
The goal Goal (whole minutes) The goal in working minutes, as the tier that applies to this request decides it.
Percent of goal used (a number) How much of the goal is used, as a percent. Over 100 once it has breached.
Goal name (text) The name of the goal tier that applies, or "Default goal".

When several SLA timers apply, the worst status wins: breached before critical, critical before at risk. On the SLA Fields page, the What gets written table says what each value type writes for a working-time goal, a date-field goal and an SLA with no goal.

  1. Update Time remaining, Update Time used, Update Paused time, Update Time past the goal or Update Percent of goal used: the card takes the name of the value type, and the other ten value types have no such card. See below.
  2. Source SLAs. Every enabled SLA (a date-field goal and an SLA that only measures are read too; a disabled SLA is not), or the SLAs you choose.
  3. Target Jira field. A field that already exists (one of your text, number, date or date-and-time custom fields, matching the value type), or A field Quartz creates (a global custom field named after this one; add it to your request screens for people to see it; where Jira lets Quartz write past the edit screen, JQL and Automation read it either way). If the SLA field then cannot be saved, Quartz moves the new Jira field to Jira's trash, so nothing is left behind.

Once written, it reads, in the Target Jira field card, shows how the value will look: it is an example, not a value from a request, since each request holds its own. Once the SLA field is saved with its Jira field, the box is headed In Jira it reads, and reads None while Jira holds no value in that field.

On the SLA Fields page, under What gets written, people who can change SLA fields see What (name) holds today, where the name is the first SLA field on the page (Status while there is none yet). It shows the value on up to five real requests you can browse, with the reason (a paused SLA timer, a JQL goal tier, an extension, an empty date, an SLA with no goal, a breach). When Quartz could not check which of those requests you can open (Jira's hourly limit for apps, or Jira did not answer), it says Not checked, why, and when the examples show, never that none of them is open.

Update Time remaining: steps

Every write is a Jira write, so a value that changes with time moves in steps:

With automatic steps, a search on a threshold (at risk, critical, breached) turns true close to the moment the SLA timer reaches it. With a fixed step, "under 30 minutes left" turns true at the step, not at the minute. A smaller step is more writes on the same request; identical values are grouped, and every mapped field of one request goes in one write.

Field updates

How fields are updated:

The freshness line says how many values are up to date, how many wait and since when, and how many Jira refused, with Jira's own reason for each. When values wait because Jira's hourly limit for apps was reached, it says so and until when. See Limits and data retention.

Pause field updates stops writing into Jira until you resume. The SLA timers, Radar, Reports and the alerts keep running; only the writing into Jira stops. Nothing is lost: every value that changes while updates are paused is written when you resume. Pausing is recorded in the Audit log.

Update fields now runs the whole site to the end, with real progress counted in requests, and then says what it wrote, what was unchanged, what Jira refused and why, and any SLA whose JQL Jira would not run. When Jira refused every value the result reads Refused, and when it refused some, Partly written, with Jira's reasons below. Only one update runs at a time. Also write final values on requests resolved since a date writes the final value once on every request resolved on or after that date; a run without it writes open requests only. Measured on a test site: about 7 minutes for 3,000 requests. On Jira's shared limit for apps a large run can wait for the next hour once the site has spent three quarters of its share, and then goes on by itself (see Limits and data retention). The result also counts the values the run wrote into Quartz's four built-in fields ("Wrote 12 values on 12 requests, into Quartz's built-in fields."), so a run that changed only those never reads "Nothing to update".

What one update covers:

Final values. When a request is resolved, Quartz writes its final value once. Deadline, Time remaining and Time used are read from a running SLA timer, so they write nothing on a resolved request; every other value type has a final value. Quartz empties a value on its own in one case only: a Deadline while the SLA timers it reads are paused on a working-time goal (above). So "SLA deadline" < now() never finds a request only because it waits; the next write after the SLA timer runs again puts the new deadline back.

Deleting an SLA field

Delete asks first. Quartz stops writing the field; the values already in it stay as they are, on the requests the dialog counts, and go stale. Two choices:

While the values are being cleared, the page shows how far it got:

After the upgrade to Quartz 5


Something unclear or wrong on this page? Contact support.