I'm writing automation that, when the original estimate of the story is added, increased or decreased the epic original estimate will update.
{{#=}}({{fieldChange.to}}/3600 - {{fieldChange.from}}/3600 + {{issue.original estimate}}/3600){{/}}
Im using this above but its erroring out if the epic estimate is blank / 0 as the calculation needs base figure to calculate.
Hi @JM -- Welcome to the Atlassian Community!
When you are using math on smart values, it can help to supply a default value with the pipe operator. For your case that could be using zero (0) as:
{{#=}}({{fieldChange.to|0}}/3600 - {{fieldChange.from|0}}/3600 + {{issue.original estimate|0}}/3600){{/}}
If that does not work due to null handling for fieldChange, you may need an if/else structure to test {{fieldChange.from}} first.
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.