Forums

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

Jira comment for service request raised during non business hours

Vijay Pal February 24, 2023

I have a requirement to add a comment to a new jira ticket raised if it is created after 5 PM or before 3:30 AM or if it is a weekend(Sat-Sun) that "it'll be picked next business day during the working hours 03:30-17:00".

 

When I am trying to compare the time, getting error.

{{#if(or(issue.created.isAfter("1700"),issue.created.isBefore("0330")))}}
Request will be picked during the working hours 03:30-17:00 next business day
{{/}}

Please help on how to check if it is a weekend.

I know this can be done using the IF block -issue field condition but my requirement here to do this within comment as I have other information to be added in same comment based on other smart value conditions.

1 answer

1 accepted

0 votes
Answer accepted
Vijay Pal March 16, 2023

I was able to accomplish this with below:

{{#if(or(or(now.isAfter(now.withHour(17).withMinute(0).withSecond(0).withMillis(0)),now.isBefore(now.withHour(03).withMinute(30).withSecond(0).withMillis(0))),
or(now.dayOfWeekName.equals("Saturday"),now.dayOfWeekName.equals("Sunday"))))}}
As this {{issue.issueType.name}} is raised outside of regular support hours, Please expect a delay in action. It'll be picked on next business day between 03:30 - 17:00 BST.
{{/}}

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events