Hi, I have a project which is designed to have a parent issue ticket and as the project is moved between statuses, different sub-tasks are created with a start/due date based on business days from the parent due date. This I have working fine, but I am trying to write an automation that will adjust open sub-task dates if the parent due date is changed.
My automation detects the due date change from the parent and calculates the new number of business days to change and inserts it into a Smart Value (DaysToShift), this is working from viewing logging:
{{fieldChange.from.toDate.diff(fieldChange.to.toDate).BusinessDays}}
I then have a rule which I am trying to update the Start Date and Due Date fields for any open subtasks. I have tried these values but I keep getting an error.
Start Date Value: {{issue.[Start Date].plusBusinessDays({(DaysToShift}})}}
Due Date Value: {{issue.duedate.plusBusinessDays({{DaysToShift}})}}
The error I get in the log is this:
Try this:
{{issue.duedate.plusBusinessDays(DaysToShift.asNumber)}}
You may also want to add conditions to confirm that the Start Date and Due Date fields that you are going to try to set actually already have a value. If the fields are blank you could run into some errors or weird outcomes from apply the plusBusinessDays function.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you very much! This worked perfectly.
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.