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

How to create automation for due date to be in business hours

Aryeh Schwob March 23, 2023

I am creating an automation for when an issue is transitioned to a new status it gets assigned a due date of for example 5 hours. I'm using smart date of {{now.PlusBusinessHours(5)}}

How do I set our business hours in Jira to 8am-5pm which will make the issue if assigned at 4:30pm have a due date of the next business day at 12:30pm?

Thank you!

2 answers

1 accepted

0 votes
Answer accepted
Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 23, 2023

Hi @Aryeh Schwob - Calculating Business Hours is going to be tricky because Jira Business Days are statically set to M-F 9:00 - 6:00.  If it's even possible, you would need to have a complex calculation based upon Days, factoring in weekends.

Is this a JSM project by chance?  If so, you could make use of SLAs because they allow custom calendars (not to mention exclusion days for holidays) which would do all of this dynamically.

Aryeh Schwob March 24, 2023

Hi @Mark Segall 

9-6 can work too, its a Jira Work Management project. For now it will be easier to work with a 9-6 than to figure out a workaround.

Is there Documentation available for for how JIra statically calculates business days and hours?

 

Thank you!

Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 24, 2023

Take a look at THIS QUESTION that I answered previously.  It shows how you can convert business days into hours.

Aryeh Schwob March 24, 2023

There is another issue that I ran into in that the duedate field only accepts dd/mm/yyyy and I'm trying to give it hours as the due date. Is there a field for that or do I have to create a custom field to show a due hour?

Again the project is a Jira work management project.

Thank you

Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 24, 2023

Correct, Due Date is a date only field so if you need to capture down to a specific time, you'll need to replace with a custom date/time field.

0 votes
Kateryna_v_SaaSJet_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
April 30, 2023

Hi @Aryeh Schwob 

If you are not against using third-party add-ons, then the following solution can be implemented with the SLA Time and Report for Jira add-on:
1) Create a calendar according to your schedule, considering holidays and holidays.
7_2023-04-30_8-19-04.png
2) Set up a new SLA configuration according to the created calendar.
Select the Issue Created to Start condition, for Stop - all closing or resolving statuses, and put all others to Reset SLA.
Set the SLA goal to 5 hours and an action – change the priority to critical.

8_2023-04-30_8-19-04.png
Thus, when the status of the ticket changes, SLA will be restarted each time and start counting a new 5 hours until the issue is resolved. It will be calculated exclusively within the working hours of your calendar. When the issue is closed, SLA will also stop counting.

I hope this helps you.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events