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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@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)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Mark Segall that 300>= 1 was my mistake but is fixed now. the problem is when I call the {{date}} inside {{now.plusDays({{date}})}}
that is the problem, I don't know if inside this function I need to use a different way to call the variable?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @juan_lara - Looks like a typo
You have PlusBussinesDays (note the spelling of busSines instead of businesS)
Should be plusBusinessDays
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.