Forums

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

How do I create an issue where due date is < SLA

Robert Ortega July 5, 2023

How do I (if possible) allow end users/requestors to set a due date < SLA?  When submitting an issue I can input a due date of tomorrow (but my SLA is 2 days) and Jira automatically changes the due date to 2 days.  Yes, the agent can amend the field but if they don't then the requestors deadline could be missed. 

1 answer

0 votes
Riley Sullivan
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.
July 6, 2023

Hi  @Robert Ortega 

 

This one was fun and tricky to figure out. I was able to get a lot of good direction from a similar question

https://community.atlassian.com/t5/Jira-Service-Management/smart-value-for-quot-time-to-done-quot-or-time-to-resolution/qaq-p/1813023

 

Unfortunately, Jira Automations do not offer a timing delay feature, which seems to be a key requirement for this scenario. To explain further, when you initially create a ticket, the SLA time doesn't immediately register in the system log, so an automation cannot be triggered based on the creation of an issue.

 

This is where a scheduled automation comes in handy. You'll need to determine a suitable schedule based on how frequently you'd like the automation to run - it could be daily, hourly, or whatever interval suits your needs best.

 

How to set up this automation

  1. When: Select "Scheduled"
    • I did daily at 9:00 am for this example
    • JQL "status = Open" 
      • I would do open or something similar to make sure its not effecting issues that are being worked or closed tickets when the automation first runs
    • Check "Only include issues that have changed since the last time this rule executed"
      • if you don't check that, it could cause problems or stop your automation
    • Screenshot 2023-07-06 at 2.53.50 PM.png
  2. Advanced Compare Condition: You need to check if the issue's due date comes before the ongoing cycle's breach time (or whichever SLA you choose). Use this 'formula':
    • {{issue.due date.isBefore(issue.time to resolution.ongoingCycle.breachTime.jira)}} equals true
    • Screenshot 2023-07-06 at 3.05.17 PM.png
  3. Then: If the condition is met, edit the issue field due date to match the breach time:
    • {{issue.time to resolution.ongoingCycle.breachTime.jira}}
    • Screenshot 2023-07-06 at 3.08.40 PM.png

This approach should yield the result you're seeking. Please give it a try and let me know how it works for you. Feel free to reach out if you have any further questions or face any challenges.

Robert Ortega July 12, 2023

Thank you for putting some time into this one.  The issue, with part 2 - "You need to check if the issue's due date comes before the ongoing cycle's breach time" the system automatically overrides the due date selected by the user.  There is no chance to run an automation.  Basically I want the system to accept whatever due date is entered and if nothing is entered then default use SLA.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events