i have created an automation for updating a field with a specific date when creating a ticket. Adding two days from today.
I have used the below expression
{{now.plusBusinessDays(2)}}
it is very good for saturday and sunday but it counts public holidays
do you know who to exclude also public holidays
Hi @Giannis Michailidis As @Jeroen Poismans said, it's not feasible to exclude public holidays in A4J because Jira won't store Holidays as different region or org have different holidays. Here is the workaround, you can try to exclude holidays :
Create an issue in Jira and create a table in Issue Description to store the Holiday for the complete year.
Using Regex compare the {{now.plusBusinessDays(2)}} result with table in Description field, if it won't match then put {{now.plusBusinessDays(2)}} in the field else if date matched then add +1 day in Result.
Similar post : https://community.atlassian.com/t5/Jira-questions/How-to-change-working-days-in-jira-automation/qaq-p/2233093
Give it a try, let me know, if you face any issue.
Thanks
V.Y
Hi Giannis!
Out of the box I don't know how to approach this. With Scriptrunner you will probably be able to get this done but still you would need some "place" to store your holidays.
Do you have Assets? If so you might put your holidays in an ObjectType with of course a date as an attribute. From your automation you might the lookup the assets with a date in your range (today+2).
If those assets (holidays) are found (eg 2) you can then add that extra amount of days. Do you get the idea?
Jeroen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.