Hello
I am trying to create an automation that will automatically update the due date of an issue when the SPs change (yes, we have decided to use SPs as days).
I have a rule that triggers when story points change and I create this variable:
{{delta}} = {{#=}}{{fieldChange.toString.asNumber}} - {{fieldChange.fromString.asNumber}}{{/}}
Which prints out fine in a slack log that I have, so Jira recognises the old and new SPs and succesfully assigns the difference to the variable.
However when I try to set the due date with various formats:
- {{issue.duedate.plusBusinessDays(delta.asNumber)}}
- {{issue.duedate.plusBusinessDays(delta)}}
- {{issue.duedate.toDate.plusBusinessDays(delta.asNumber).format("yyyy-MM-dd")}}
- {{issue.duedate.toDate.plusBusinessDays(delta).format("yyyy-MM-dd")}}
I even tried skipping the variable
- {{issue.duedate.toDate.plusBusinessDays(#=fieldChange.toString.asNumber - fieldChange.fromString.asNumber).format("yyyy-MM-dd")}}
- {{issue.duedate.toDate.plusBusinessDays(fieldChange.toString.asNumber - fieldChange.fromString.asNumber)}}
In all those cases The due date dissapears even though the rule executes correctly. What am doing wrong?