I am trying to create a rule that automatically creates a set of sub-tasks when a story is created. Each Sub-task will have Target start and end dates created within the rule based off the target start and end dates of the story. For example if the story has a date difference of 90 days between the start and end dates the first sub-task will have dates that cover 10% of that, or 9 days.
I have a variable which calculates that 10%:
{{#=}}ROUND({{triggerIssue.Target start.toDate("yyyy-MM-dd").diff(triggerIssue.Target end.toDate("yyyy-MM-dd")).days*.1,0){{/}}endDate
When I try to use this variable within a date calculation it doesn't work. When adding it to the audit log, for instance:{{now.plusDays(endDate)}}the log is empty. {{now.plusDays(endDate.asNumber)}} also doesn't work.
Does anyone know how to use a variable within a date calculation, or at the very least how to get a variable to function as a number?