SLA Search 3.0 JQL Functionalities

This page is about Time to SLA for Jira Server users.
This page requires some knowledge of searching for issues using JQL. If you need a detailed introduction to JQL usage, please click here to get more information. Due to the limitations of the issue navigator, it's not possible to search for the SLAs in the Basic mode.

What is slaFunction?

The Time to SLA plugin adds the slaFunction custom field upon installation. You cannot add this custom field to screens but use it for JQL search. This design allows a better plugin performance. Click here if you want to check out former JQL functions.


State functions

State Functions filter issues for a given state of SLA. These functions check state equality so you can only use = or != as operands.
FunctionDescriptionExample

isNotStarted([Optional List of SLA IDs or/and Name(s)])

Finds issues that have at least one inactive SLA on it.

slaFunction = isNotStarted()

slaFunction = isNotStarted(SLAid1,SLAid2)

slaFunction = isNotStarted("SLA Name 1","SLA Name 2")

isFinished([Optional List of SLA IDs or/and Name(s) ])

Finds issues that have at least one finished SLA on it.


slaFunction = isFinished()

slaFunction = isFinished(SLAid1,SLAid2)

slaFunction = isFinished("SLA Name 1","SLA Name 2")

isRunning([Optional List of SLA IDs or/and Name(s)])

Finds issues that have at least one running SLA on it.


slaFunction = isRunning()

slaFunction = isRunning(SLAid1,SLAid2)

slaFunction = isRunning("SLA Name 1","SLA Name 2")

isPaused([Optional List of SLA IDs or/and Name(s)])

Finds issues that have at least one paused SLA on it.


slaFunction = isPaused()

slaFunction = isPaused(SLAid1,SLAid2)

slaFunction = isPaused("SLA Name 1","SLA Name 2")


Duration functions

Duration Functions filter issues by their SLA durations. These functions compare duration so you can only use '>', '>=', '<' and '<=' as operands.
Calendars of the SLAs are taken into consideration while interpreting the given duration strings.
FunctionDescriptionExample

remainingDuration(Duration, [Optional List of SLA IDs or/and Name(s)])


This function compares the given duration with the remaining duration of SLAs and finds issues if at least one SLA satisfies the comparison.


slaFunction <= remainingDuration("4h")

slaFunction < remainingDuration("1d", 5, 7)

slaFunction < remainingDuration("1d", "SLA Name 1","SLA Name 2")

slaFunction >= remainingDuration("5d", 2, 6, 12)

slaFunction >= remainingDuration("5d", "SLA Name 1","SLA Name 2", "SLA Name 3")

slaFunction > remainingDuration("5d", 2, 6, 12)

slaFunction > remainingDuration("5d","SLA Name 1","SLA Name 2", "SLA Name 3")

elapsedDuration(Duration, [Optional List of SLA IDs or/and Name(s)])


This function compares the given duration with the elapsed duration of SLAs and finds issues if at least one SLA satisfies the comparison.


slaFunction <= elapsedDuration("4h")

slaFunction < elapsedDuration("1d", 5, 7)

slaFunction < elapsedDuration("1d", "SLA Name 1","SLA Name 2")

slaFunction >= elapsedDuration("5d", 2, 6, 12)

slaFunction >= elapsedDuration("5d", "SLA Name 1","SLA Name 2""SLA Name 3")

slaFunction > elapsedDuration("5d", 2, 6, 12)

slaFunction > elapsedDuration("5d", "SLA Name 1","SLA Name 2""SLA Name 3")

breachDuration(Duration, [Optional List of SLA IDs or/and Name(s)])


This function compares the given duration with the breach duration of SLAs and finds issues if at least one SLA satisfies the comparison.


slaFunction <= breachDuration("4h")

slaFunction < breachDuration("1d", 5, 7)

slaFunction < breachDuration("1d", "SLA Name 1","SLA Name 2")

slaFunction >= breachDuration("5d", 2, 6, 12)

slaFunction >= breachDuration("5d", "SLA Name 1","SLA Name 2""SLA Name 3")

slaFunction > breachDuration("5d", 2, 6, 12)

slaFunction > breachDuration("5d", "SLA Name 1","SLA Name 2""SLA Name 3")


Date functions

Date Functions filter issues by their SLA date values. These functions compare dates so you can only use '>', '>=', '<' and '<=' as operands.
If duration strings are used instead of giving an exact date to compare to, calendars of the SLAs will be taken into consideration while interpreting them.
FunctionDescriptionExample

slaStartDate(Date or Duration, [Optional List of SLA IDs or/and Name(s)])


This function compares the given date or the given duration string with the start date of SLAs and finds issues if at least one SLA satisfies the comparison.

slaFunction <= slaStartDate("2019-07-01")

slaFunction < slaStartDate("-5d")

slaFunction > slaStartDate("-20d", 4, 6, 8)

slaFunction > slaStartDate("-20d", "SLA Name 1","SLA Name 2""SLA Name 3")

slaFunction >= slaStartDate("2019-04-01 13:00", 1, 2)

slaFunction >= slaStartDate("2019-04-01 13:00", "SLA Name 1","SLA Name 2")

slaTargetDate(Date or Duration, [Optional List of SLA IDs or/and Name(s)])


This function compares the given date or duration string with the target date of SLAs and finds issues if at least one SLA satisfies the comparison.


slaFunction <= slaTargetDate("2019-07-01")

slaFunction < slaTargetDate("-5d")

slaFunction > slaTargetDate("-20d", 4, 6, 8)

slaFunction > slaTargetDate("-20d", "SLA Name 1","SLA Name 2""SLA Name 3")

slaFunction >= slaTargetDate("2019-04-01 13:00", "SLA Name 1","SLA Name 2")

slaEndDate(Date or Duration, [Optional List of SLA IDs or/and Name(s)])


This function compares the given date or duration with the end date of SLAs and finds issues if at least one SLA satisfies the comparison.


slaFunction <= slaEndDate("2019-07-01")

slaFunction < slaEndDate("-5d")

slaFunction > slaEndDate("-20d", 4, 6, 8)

slaFunction > slaEndDate("-20d", "SLA Name 1","SLA Name 2""SLA Name 3")

slaFunction >= slaEndDate("2019-04-01 13:00", 1, 2)

slaFunction >= slaEndDate("2019-04-01 13:00", "SLA Name 1","SLA Name 2")


Percentage functions

Percentage Functions filter issues by elapsed or remaining percentage of SLAs. These functions compare percentages so you can only use '>', '>=', '<' and '<=' as operands.
Only the following percentage values are valid for comparison: 10, 20, 25, 30, 40, 50, 60, 70, 75, 80, 90
FunctionDescriptionExample

remainingPercentage(Percentage, [Optional List of SLA IDs or/and Name(s)])


This function compares the given percent with the remaining percentage of SLAs and finds issues if at least one SLA satisfies the comparison.

slaFunction <= remainingPercentage(10)

slaFunction > remainingPercentage(75)

slaFunction < remainingPercentage(25, 5, 7)

slaFunction < remainingPercentage(25, "SLA Name 1","SLA Name 2")

slaFunction >= remainingPercentage(50, 2, 6, 12)

slaFunction >= remainingPercentage(50, "SLA Name 1","SLA Name 2""SLA Name 3")

elapsedPercentage(Percent, [Optional List of SLA IDs or/and Name(s)])


This function compares the given duration with the elapsed percentage of SLAs and finds issues if at least one SLA satisfies the comparison.


slaFunction <= elapsedPercentage(10)

slaFunction > elapsedPercentage(75)

slaFunction < elapsedPercentage(25, 5, 7)

slaFunction < elapsedPercentage(25, "SLA Name 1","SLA Name 2")

slaFunction >= elapsedPercentage(50, 2, 6, 12)

slaFunction >= elapsedPercentage(50, "SLA Name 1","SLA Name 2""SLA Name 3")


Breach functions

Breach Functions filter issues for breach state. These functions check state equality so you can only use = or != as operands.
FunctionDescriptionExample

isBreached([Optional List of SLA IDs or/and Name(s)])


Finds issues that have at least one breached SLA on it.

slaFunction = isBreached()

slaFunction = isBreached(SLAid1,SLAid2)

slaFunction = isBreached("SLA Name 1","SLA Name 2")


Attention

Other plugins may provide functions with the same name as those provided by Time to SLA such as isNotStarted. For functions like these, no other name would make a great deal of sense, so this is not surprising. The protocol for these situations is explained in JRA-24219, i.e. the plugin key that is first alphabetically will "win".