JQL filtering on SLA values?

I can use JQL to find issues that breach an SLA like this:

"Response in 60 min." = breached()

What I'd like to do is create a series of filters that are more granular. For example, one filter might return issues on which the SLA was breached by less than 3 hours, another for breached between 3 and 6 hours, another for breached from 6 to 24 hours. I could then add these filters to a Multiple Filter Pie Chart and get a simple report on how we're measuring up against the SLA for an entire quarter. 

Is this possible? I can see the numerical values for the SLA in the issue navigator, but can't find any syntax that lets me use comparisons on those values. 

I suppose I could create additional SLAs at 3, 6 and 24 hours, but would prefer not to. 

Thanks in advance.

2 answers

1 accepted

1 vote
Accepted answer

I wonder, though, if I can create a calculated field that contains the SLA field value in date-time format, and then use if for my filters. We have both JIRA Misc Custom Fields and Scriptrunner. 


This script did the trick for me in a JIRA Misc Custom Fields "Calculated Number Field"

<!-- @@Formula:
// log.error("In Issue "+issue.get("issuekey") + " the value of field 13861 = " +issue.get("customfield_13861"));
if (issue.get("customfield_13861").getCompleteSLAData().empty)
return null;
return issue.get("customfield_13861").getCompleteSLAData().get(0).getElapsedTime()/(60*1000)

That gives me a field with the elapsed time as a number, so I can create filters like this:

project = projectX AND "Response Time Elapsed" < 15



Hi Dave,

Thanks for voting on the issue and providing your work around.  I upvoted your answer so hopefully someone else will be able to benefit from this!



0 votes

Hi Dave,

In regards to the SLA time metrics, elapsed() and remaining() can be natively queried against but they don't provide time that has past since the breach.

On Server, one option for finding those values may be the Time to SLA Plugin for JIRA add-on.  It has a function called issuesHaveSomeExceededSlas.  It filters issues which have at least one exceeded SLA. SLAs which are not completed but already have a breach are also included.

Next, there is a feature request for this that you can find at JSDCLOUD-4059 for Cloud and JSDSERVER-4059 for Server.  Please vote on them and add your use case to the comments to add impact our developers will consider adding this in the future.

Finally,  please see some of the other suggestions in the Community:

Reporting on recently breached SLAs with JIRA Service Desk



Thanks, Branden. I voted on the JSDSERVER issue. And I'll check out the Time to SLA plugin.

We currently use JIRA Enhancer plugin, but I can't get what I need there. Our JSD SLA is satisfied with either a comment or a status transition, so it can't be replicated in JEP. 



Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

1,095 views 4 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you