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

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. 

Dave

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

Thanks, 

Dave

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!

Cheers,

Branden

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


Cheers,

Branden

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. 

Thanks,  

Dave

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,864 views 12 18
Join discussion

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot