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.
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.
{{/}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.