Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Setting SLA's in Jira Software

Mayur Gaikwad/Tech PMO
Contributor
January 8, 2023

Can we define SLA's in Jira software using custom fields. Typically, at our end we get dates by when a said task is supposed to be completed but these dates always gets breached. We are currently capturing these dates + the actual time stamp when tickets are moved to next stage. I want to compare these two dates and calculate delta.

2 answers

1 accepted

5 votes
Answer accepted
kuldeep Singh
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 8, 2023

Hi @Mayur Gaikwad/Tech PMO

Using SLA's as custom fields will not works, as it is working in Jira Service management.

But you can use Start and End date, or use Jira Plan.

Thanks.

0 votes
Ste Wright
Community Champion
January 8, 2023

Hi @Mayur Gaikwad/Tech PMO 

Can I clarify the need from the question?

  • Is this in a Jira Project, or a Jira Service Management Project? SLAs are only available (natively) in JSM Projects
  • Could you clarify the logic with an example? Is it...
    • Due Date(s) are set when an Issue should be completed (i.e "Done") and/or per Status - in one or more date fields
    • If an Issue is not "Done" by the Due Date, then it is considered in breach
    • Both the Due Date and actual end date (Resolution Date?) are captured
    • You'd like to know the delta between due date and actual end date (i.e +/- days)

Ste

Mayur Gaikwad/Tech PMO
Contributor
January 8, 2023

Hi Stephen, 

Please find my response.

1. Its a Jira Project

2. Its basically capturing due date

3. Yes, if issue is not done in due date it is considered as breach

4. Yes, both due date & actual end date (when its moved from one status to next staus) is getting captured

5. Yes, difference between two dates needs to be calculated so we get to know what is the breach rate for a particular team / members

Ste Wright
Community Champion
January 8, 2023

Hi @Mayur Gaikwad/Tech PMO 

This is possible, but won't utilise the SLA functionality which is just for Jira Service Management.

For my example below, I've assumed:

  • The due date is for completion of the Issue - i.e transition to "Done"
  • That the resolution date is set when moving to "Done"
  • That the difference between these two fields is the delta

If this was the case, you could do something like this...

---

Create Custom Field(s)

You need somewhere to capture the difference between the two dates. I'd recommend creating a custom Number Field, for example, Days between Due Date and Resolved Date

This will house the number of days.

Create Automation Rule

The Automation Rule will populate the custom field - and might look something like this:

  • Trigger: Issue Transitioned
    • To Status = Done
  • Action: Edit Issue
    • Field = <Custom Number Field here>
      • Value = {{issue.duedate.diff(issue.resolutiondate).days}}

Logic

  • The rule will generate a number for the field...
    • If the number is -1 or lower, the Issue did not breach - because it was resolved before the due date
    • If the number is 0, then the issue did not breach - it was resolved on the due date
    • If the number is 1+ - then it has breached
  • You can then search using these results in JQL - eg. "<Number Field Name>" > 0

---

You could easily extend this example depending on your use case:

  • If you have multiple due date and end date fields (eg. one per Status), you could create a custom Number Field per status, and calculate the days in separate rules or using If/Else block conditions
  • If you using custom fields, not Resolved/Due Date - the smart value will still work, it'll just use the custom field's IDs - eg..
    • {{issue.customfield_10123.diff(issue.customfield_10456).days}}

---

Let us know what you think!

Ste

Like Mayur Gaikwad/Tech PMO likes this

Suggest an answer

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

Atlassian Community Events