Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

JQL for determining time of SLA breach

Walker White September 1, 2022

On the first of each month, I want to pull a query of all issues that breached SLA for the previous month.  Specifically, I want to know all issues that breached and were resolved, as well as those that breached and are still unresolved.  However, when I run the query the following month, I don't want to count issues that are still in breach from the previous month.

For example, on February 1st, I query January, and I find Issue #1 and #2 breached and were resolved in January, and Issue #3 breached in January, but it was NOT resolved.  My January report should show Issues #1, #2, and #3.

Then, on March 1st, I query February, and Issue #3 is still unresolved.  No other issues breached or were in breach in February.  My February report should have NO issues.

It's easy to get the ones that breached and were resolved using:

project = "MyJSM" and "TimeToResolution" = everBreached() and
resolutiondate > startOfMonth(-1) and resolutiondate <= endOfMonth(-1)

but I'm looking for something like a "dateBreachStarted" column for that TimeToResolution SLA so I can do this:

project = "MyJSM" and "TimeToResolution" = everBreached() and
dateBreachStarted > startOfMonth(-1) and dateBreachStarted <= endOfMonth(-1)

 Any help would be appreciated.

1 answer

1 accepted

2 votes
Answer accepted
Walker White September 1, 2022

I see that @Jerry O'Sullivan just asked this question a few days ago right here: https://community.atlassian.com/t5/Jira-Service-Management/Time-SLA-breached/qaq-p/2118696  

 

We're each seeking the same golden egg...

Jerry O'Sullivan September 2, 2022

Workaround here -https://community.atlassian.com/t5/Jira-Service-Management/Time-SLA-breached/qaq-p/2118696 

 

Hope this helps!

Walker White September 2, 2022

@Jerry O_Sullivan Yes, it did.  Specifically, for those who wish to do it themselves:

  1. Created a custom field, FirstBreachDate
  2. Populated FirstBreachDate with historical dates for issues that had breached in the past.  This data was inexact; I just needed it to be in about the right month.
  3. Created a "SLA threshold breached" automation that populates FirstBreachDate if the values has not previously been set.

Then, issuing a JQL query is really easy:

project = "MyJSM" and "TimeToResolution" = everBreached() and
FirstBreachDate > startOfMonth(-1) and FirstBreachDate <= endOfMonth(-1)

And, in fact you don't even need the  "TimeToResolution" = everBreached() because the presence of a FirstBreachDate value indicates a breach has occurred.

Note that if you have multiple SLAs, this triggers ONLY on the first breach of ANY SLA.  If you need to care for FirstBreachDate by SLA, you'd need to do a bit more.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events