Hello there!
I've been trying for a couple hours to create an automation to fill the due date field with the sum of the current day and the originalEstimate, but have not been successful.
I've tried to create a varieble called estimatedDays
{ "fields": { "estimatedDays": "{{#if(issue.OriginalEstimate)}}{{math.floor(issue.OriginalEstimate / 28800)}}{{/if}}" } }
and then updating the due date field with
{ "fields": { "duedate": "{{now.plusBusinessDays(estimatedDays).format('yyyy-MM-dd')}}" } }
and many different ways, but none of them worked...
Can anyone help?
Hi @Vitor Hugo Campos Lage -- Welcome to the Atlassian Community!
For a question like this, context is important for the community to help. Please post the following:
Until we see those...
The originalEstimate smart value is the human-readable one. Please instead use this one:
{{issue.timetracking.originalEstimateSeconds}}
Next, your syntax for creating the variable with a math expression is incorrect. Perhaps try this:
{{#=}}FLOOR(0{{issue.timetracking.originalEstimateSeconds}} / 28800){{/}}
I put a 0 at the front to work as a default value in case the field is empty.
Finally, created variables are text, and so must be converted with asNumber for use as a parameter to plusBusinessDays().
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.