I created a variable in the automation like this
this function should be a number, then I called it to modify the due Date
I got this error
Does anyone know what is happening here?
@Mark Segall I found this function and it works
{{#now}}func=plusDays({{date}}){{/}}
Thanks for your help
Hi @juan_lara - Looks like a typo
You have PlusBussinesDays (note the spelling of busSines instead of businesS)
Should be plusBusinessDays
Hello, @Mark Segall thanks for your answer. I did the changes but the same error.
Another thing to consider is that your compareTo function can return a positive or a negative so I believe the plusBusinessDays function will only work with a positive.
So you may need to add an If condition to your rule where if {{date}} greater than 0 perform plusBusinessDays(1) Else perform minusBusinessDays(1)
Also, if that doesn't fix it, I'd add a log action to your rule to validate the compareTo is in fact returning desired results.
Hello @Mark Segall ,
I changed the compare condition to {{now.diff(issue.created).days.abs}} now always be positive number.
I added the log action, but the same error is still here
@Mark Segall could you please explain to me where I need to do this? So you may need to add an If condition to your rule where if {{date}} greater than 0 perform plusBusinessDays(1) Else perform minusBusinessDays(1)
Your change to the variable renders my last comment moot. Looking at the log, it looks like your date variable now returns 300 (at least on your test issue). I'm not sure why you added ">=1" to your log entry though. Is 300 what you're hoping to get from that diff?
It looks like you're new here. Sign in or register to get started.