Hi there!
I am running an automation to update the timeSpent of an Epic with the summarized timeSpent value of the Epic's Children and GrandChildren (Tasks, and it's sub-tasks)
In the additional fields of the Edit issue fields action I have this:
{ "update": { "worklog": [ { "add": { "timeSpent": "{{#=}} ROUND(({{lookupIssues.timetracking.timeSpentSeconds.sum}}/3600),2){{/}}" } } ] } }
But every time the automation runs, the summarized timeSpent value of the Epic's Children and GrandChildren is added to the timeSpent of the Epic.
Thus I first need to initialize (set to zero) the timeSpent of the Epic and then add the
summarized timeSpent value of the Epic's Children and GrandChildren.
Unfortunately the "set" operation is a not supported operation on worklog fields.
And thus is my question:
So how do I set the timeSpent field to zero before running the add operation?
Thank you very much for your valuable insights!