Forums

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

Automation and BusinessDayBackwards

Ganea_ Merissa
May 8, 2026

Hello. I need an automation where if the value changes for due date, then the automation should compare two values (first value are all of my company holidays and the second value is what is showing in Jira for the Issue due date currently) by checking if: 

First Value:

["2026-01-01","2026-05-25","2026-07-03","2026-09-07","2026-11-26","2026-12-25"] 

Condition: contains

Second Value: 

{{issue.duedate}}

If it does, then edit the work item field "Due Date." Here is what I have in the Due Date field: 

{{ issue.duedate.toBusinessDayBackwards }}

Help on why this is not working? 

1 answer

2 votes
Bill Sheboy
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 Champions.
May 8, 2026

Hi @Ganea_ Merissa 

First, when you use {{issue.duedate}} like that it converts the date / time object into the long format of jiraDateTime as text, and thus will never match what is in your First Value of the condition.

To force the comparison to work, add the matching format with {{issue.duedate.jiraDate}}

 

Next, the toBusinessDayBackwards function is documented as going backwards one business day, and that also returns a date / time value.  When you want to use the result of the function to set a field such as Due Date, remember to also add the jiraDate format at the end to force it to text in the format yyyy-MM-dd.

 

Finally, what are you trying to accomplish when the Due Date matches one of your holidays?

Once you make the changes described above, that would only change for one day.  But, if the Due Date spanned multiple holidays into the future relative to "now", what do you want: go back one day, go back the number of days for spanned holidays, etc.?

 

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer