SLA Search 3.0 JQL Functionalities

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

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 SLAs in the Basic mode.

If you want to use more than one SLA 3.0 JQL functions, you have to use the slaJoin function! Want to learn how to join SLA functions? Click here.

What is slaFunction?

The Time to SLA plugin adds the slaFunction custom field upon installation. This custom field cannot be added to screens; however, it can be used for JQL search. This design allows for 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.

Function

Description

Example

Function

Description

Example

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.

Function

Description

Example

Function

Description

Example

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.

Function

Description

Example

Function

Description

Example

slaStartDate(Date or Duration or timeFunction, [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")

slaFunction > slaStartDate("endOfMonth(-1)")

slaFunction > slaStartDate("startOfDay(+2h)", 1)

slaFunction <= slaStartDate("endOfWeek(+2d)", 1 , 2)

slaTargetDate(Date or Duration or timeFunction, [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")

slaFunction > slaTargetDate("endOfMonth(+2w)")

slaFunction > slaTargetDate("startOfWeek(inc)", 1)

slaFunction <= slaTargetDate("endOfYear(-2M)", 1 , 2)

slaEndDate(Date or Duration or timeFunction, [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")

slaFunction > slaEndDate("startOfMonth(+2d)")

slaFunction > slaEndDate("endOfDay(-3h)", 1)

slaFunction <= slaEndDate("endOfYear(-2M)", 1 , 2)

Percentage Functions

Percentage Functions filter issues by the elapsed or remaining percentage of SLAs. These functions compare percentages so you can only use '>', '>=', '<', and '<=' as operands.

Function

Description

Example

Function

Description

Example

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.

Function

Description

Example

Function

Description

Example

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")

Critical Zone Functions

Critical Zone Functions filter issues for the critical zone. These functions check SLA state equality so you can only use = or != as operands.

Function

Description

Example

Function

Description

Example

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



Finds issues that have at least one SLA in the critical zone.

slaFunction = isInCriticalZone()

slaFunction = isInCriticalZone(SLAid1,SLAid2)

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

Business Hours functions

Business Hours Functions filter issues for the SLA calendar's business hours. These functions check SLA state equality so you can only use = or != as operands.

Function

Description

Example

Function

Description

Example

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



Finds issues that have at least one SLA in business hours.

slaFunction = isInBusinessHours()

slaFunction = isInBusinessHours(SLAid1,SLAid2)

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

Contains SLA Function

The Contains SLA Function filters issues for the presence of SLAs. This function checks SLA state equality so you can only use = or != as operands.

Function

Description

Example

Function

Description

Example

containsSla([List of at least 1 SLA ID or/and Name(s)])



Finds issues that contain the listed SLAs.

slaFunction = containsSla(SLAid1,SLAid2)

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

Complex functions

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

Function

Description

Example

Function

Description

Example

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



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

slaFunction = isMet()

slaFunction = isMet(SLAid1,SLAid2)

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

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



Finds issues that all SLAs are met on it.

slaFunction = isAllMet()

slaFunction = isAllMet(SLAid1,SLAid2)

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

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



Finds issues that have at least one SLA which is not breached and not finished on it.

slaFunction = isNotBreachedAndNotFinished()

slaFunction = isNotBreachedAndNotFinished(SLAid1,SLAid2)

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

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



Finds issues that all SLAs which is not breached and not finished on it.

slaFunction = isAllNotBreachedAndNotFinished()

slaFunction = isAllNotBreachedAndNotFinished(SLAid1,SLAid2)

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

SLA Definition

Description

Example

Description

Example

Find the issue details that don’t have an SLA definition (any part of the SLA definition).

slaFunction is EMPTY

Find the issue details that have at least one SLA definition on them.

slaFunction is not EMPTY