I’m stuck creating an automation for the use-case where a task’s due date gets automatically updated based on the updated remaining estimate.
I have a task
Start date: 18.11
Original estimate: 8h
Due date: 18.11
I spent 8 hours working and log these 8 hours on 18.11. I see that I need another 12 hours to fully complete the task, so when logging the 8 hours I set the remaining estimate to 12. Based on this, the due date should move from 18.11 → 20.11.
I already have a rule that updates the due date when I manually update the Remaining Estimate field alone, without logging hours.
However, when I log hours and update remaining estimate simultaneously the due date doesn't shift. Seems like Jira doesn't understand that I update remaining estimate and does not update due date.
I've tried various options for my rule, including "Log Work", "Edit work item" but none of these worked for me.
Eventually I ended up with this rule
I'd appreciate it if you could help me to configure this automation.
Thanks!
Hi @Denys Pavlov ,
I had to try this for myself to figure it out.
The Log Work doesn't trigger an issue updated event. As stated in the documents here, the Issue Updated doesn't include the Log Work.
But when I use the Trigger "Work Logged", then my Rule is triggered.
And I can use the {{worklog.timeSpentSeconds}} to calculate the number of days from now is remaining. And then I can compare that with the Due date to determine if an update to the due date is needed.
Hope that helps.
Have a nice day.
Rik
Hi @Rik de Valk _Brainboss_ many thanks for your prompt reply.
When I said “I tried Log work”, I actually meant the “Work Logged” trigger. And it does work — when I log time andupdate the remaining estimate at the same time, the due date gets updated correctly.
However, the Work Logged trigger also updates the due date even when I don’t manually change the remaining estimate.
For example, when I simply log time, Jira automatically reduces the remaining estimate, and this new remaining estimate still gets added to the due date. Do you know what I mean?
So I believe the issue is not with the date-calculation formula itself (thanks again for the hint!), but rather how the time tracking behaves.
Do you know if there is any smart value or mechanism that lets me detect whether the remaining estimate was changed manually, and not just recalculated automatically during work logging?
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah, yes. There is no difference between an automatic versus manual update of the remaining estimate.
This makes the solution more complex.
If the change is different from the logged time, it must be a manual update.
If the change is equal to the logged time, it must be an automatic update.
To put this in practice:
I found this a nice challenge, so I tested it myself 😄
⚠️ The Change log from API can give many records if an issue was updated a lot. So you'll have to first check the webresponse.total to see if there are more than 100 results. If so, calculate which startAt value you should include in your second web request to ensure you get the latest change records
Have a nice day!
Rik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Many thanks for your extensive reply — it's good to hear that you found this challenging :)
It does seem like a very complex task indeed. I'll try to play with it and see how far I can get, and I really appreciate you taking the time to outline the approach in such detail.
Thanks!
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.