Hello all !
I'd like to do exactly what the title says.
So according to the details from this article https://community.atlassian.com/t5/Automation-articles/How-to-sum-up-logged-hours-using-automation-in-Jira-Cloud/ba-p/1409115
I've set up the rule below:
But in "Audit Log" I got error below :
Then I've tried the to set up the rule below
But I've the same error.
Do you happen to have an idea of the problem ?
Thanks a million in advance for your help !
Pierre.
Hi @Pierre Allard ,
As the article mentioned in your question already points out: it´s not that straight forward with epics. Issues within an epic can not be pointed at directly via "child" connection.
In case it´s about stories/issues directly in an epic I solved this with a "lookup issues action" in between --> see screenshot
Please let me know if this helps.
Best
Stefan
Hello Stefan,
Here's what I did in my rule and that works very well ! :)
Thanks a lot for your help!
Best.
Pierre.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are welcome @Pierre Allard
Please be so kind and accept the answer in order to this question appears solved which helps other users in need for the same information find that solution more easily ;)
Best
Stefan
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.
I have the same question. I believe it's {{now}} based on Pierre Allard's Feb 24, 2022's screen shot above, but I still can't get it working.
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.
To complete this post: the feature request for this function: https://jira.atlassian.com/browse/JSWCLOUD-17275
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello all!
I just want to do the sum of all user work logs for tasks, sub-tasks, bugs, and improvements for the last week. trigger this event on Saturday and this should be for all the users inside my Jira and send this sum of individual user work logs and send the message to individual users on Slack. so is it possible to use Jira automation?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the post and the comments, all.
I have noticed many articles like this BUT it seems either something is missed or it is flying over my head :D
With trigger Work logged for all operations, does the update or delete of task worklogs reflect on the Epic? I noticed that if it is updated, the new time is added to the epic and if existing worklog is deleted, that same time is added to the Epic. Both of these seem incorrect. Also, it does not look like we can identify if it is added , updated or deleted.
Any idea please?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is a screen grab. The add work log, update work log and delete work log all log the time additionally to the Epic where it should actually add/update/delete accordingly. i.e expecting the Epic to have the same work log total as the child issues, but the Epic simple appends the total that is added, updated and delted as well.
Hope that helps in helping me :)
Thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Stefan Salzl ,
Could you please instruct me how to sum up to epic the time spent with brunch or rest API, as you mentioned above?
Thanks,
Hila.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Guys,
Do you know How do it for Jira Data Center?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @silfarney_zanatta , is your need still relevant?
Do you have Scriptrunner?
With kind regards
Slava
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Slava Gefen ,
Yes, I still need a solution and I have Scriptrunner.
Let me know your feedback.
Thanks in advance!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @silfarney_zanatta , great!
The last question! Do you want to sum up logged work in additional field, e.g. called Sum of Worklog, or do you want to use Native Worklog in Epics and make read-only?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I would like add this information in Native Field "Worklog".
But I think that is better use a custom field if us will use Scriptrunner, right?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @silfarney_zanatta sorry for the delay.
I thought we could do without Scriptrunner, if you need to implement it in new issues. If some stories already have worklog, firstly we need to update Epics with actual data.
So it turned out that the Automation is pretty simple:
1. We start from Work Logged action
2. Then we check that Epic exists
3. Then we go to Epic
4. And finally add to Epic Work log that just was added to a Story
After that in Epic worklog will be adjusted each time work logged in any Story:
You just need to think if worklog is updated or deleted. In this case we can implement if-else condition.
Let me know if it's working for you 😉
With kind regards
Slava
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@silfarney_zanatta and I forgot to mention, that you need provide work log permissions in Epic only for Automation user, if you don't want users to put worklogs in the epic by mistake.
Regards
Slava
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks so Much @Slava Gefen
My last question, this solution will get only the Time Spent in Story right? (not get the information from Sub-task (belongs to story).
Note. I am using the Jira Data Center.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My last question, this solution will get only the Time Spent in Story right?
Yep, it takes Worklogs from all Story level issues to Epic. Do you want to provide from Sub-tasks to Epic also?
Note. I am using the Jira Data Center.
Yes, my screens are from DC 👍
Regards
Slava
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey, @Slava Gefen Thank you so much! I will try this -- does it work for Jira Software too? (I see you worked this up for Silfarney_zanatta, who uses Jira Data Center.) I definitely want to include from subtasks to epic also. Thank you again, I will try this if you think it works also for Jira Software!
Erika
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Scratch that, @slava_Gefen. I was able to make Hugh Lampert's suggestions above work for me in Jira Software. Thank you!
Erika
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.
@silfarney_zanatta sorry for the delay!
yes I need get the information from ALL Stories and Sub-tasks.
In this way which behavior you are expected when a worklog was added to a sub-task?
Do you want to add it to Sory's worklog and then go up and add to Epic's?
Or just go two levels up to Epic and add there?
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.
Hi @Slava Gefen ,
In this way which behavior you are expected when a worklog was added to a sub-task?
<Zanatta> In My it is possible I see the Total of Worklog hours in Story + Sub-task (into Story. So my expectation is add the same view but in EPIC (get all worklog from Stories + Sub-tasks)
Do you want to add it to Story's worklog and then go up and add to Epic's?
<Zanatta> My expectation when a work log hours was added in a Story or Sub-Task, I would like show it in EPIC level. (So we have today this feature to show the Total of Worklog into Story (Story + Sub-Tasks)
Or just go two levels up to Epic and add there?
<Zanatta> In my case I dont need add Sub-Task worklog in Story (because we have it today) but I need add it in Epic Level.
Note: I would like do the similar solution that we have in Jira Cloud using ({{issue.childissue.timeSpent.sum}}) . But it not works in Jira Data Center *.sum
I don't know if you got my point above.
Thanks in advance!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @silfarney_zanatta sorry for the delay I was away a little)
I don't know if you got my point above.
I hope I did.
So, in the rule above (This my comment )
we need to change the first condition with if-else block:
And put everything else under it.
Then in else block you need to put this condition:
And then for the branch use JQL with this smart-value:
For the worklog action use the same that we used in Story level.
Finally, you will see in Epic worklogs from Sub-tasks:
Let me know if you have any question.
Hope it helps!
With kind regards
Slava
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Slava Gefen
Can you help me please with this case below?
I did exactly the automation and it worked, but if I select a date different from the current one in the story it will set the current date in the epic. In automation I set the option "Copy Created from Trigger issue" and it still didn't solve the problem. Do you have any idea how to resolve this.
I confess that I also couldn't do the if-sel for the removal. Whenever I try it adds deleted value
Thank you very much. Fabio
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Fabio Esteves da Silva Manzoni , hope you are doing well 👍
I did exactly the automation and it worked, but if I select a date different from the current one in the story it will set the current date in the epic. In automation I set the option "Copy Created from Trigger issue" and it still didn't solve the problem. Do you have any idea how to resolve this.
I'm not sure I understand your need. Could you please share some screenshots what are you trying to achieve?
Thanks in advance!
Slava
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Slava,
Thank for your help, below are the prints.
I registered in the Story worklog January 30th at 9 AM. The automation worked, but in Epic it registered on February 2nd at 10:50.
Fabio
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Fabio Esteves da Silva Manzoni
What is your initial trigger?
Maybe just put {{now}} smart-value as a 'Date Started' value to log the same date?
Thanks
Slava
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Slava Gefen
Setting the condition {{now}} in data started it takes the current system date and time and not the date and time selected by the user.
Thanks,
Fabio
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Fabio Esteves da Silva Manzoni I got, a user can set the 'Started Date'
Then try please this smart-value 👇
{{worklog.started}}
Thanks
Slava
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.
@Pierre Allard Have you come across the issue of the automation double counting time spent entries?
For example, if I enter 1h of work on a task within an epic, the epic will show 1h. However, if I enter another 1h of work on that same task or another task within the epic, the epic shows 3h. Which makes me believe it counts the previous entries every time.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Brellison Running into the same issue here. Every time the automation runs, instead of 'over-writing', it adds a new worklog to the previous one hence adding to the previous value.
One workaround would be to delete the previous worklog on epic level before running the rule.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You're right, I've faced the same problem. But it seems that automation rule cannot delete worklogs...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Pierre Allard
Yeah so I ended up just manually deleted the previous worklog before running this particular automation rule.
That's the only thing I can think of at the moment, till there can be a way to delete the worklog via automation first and then run the automation to sum up the logged hours and save on the EPIC level.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Since the work log, IS a rolling work log and you can't delete existing entries through automation, the answer is to check if the sum of the timespent in the exisiting entries in the EPIC log equate to the sum of the timespent on all the child tasks before adding a new entry to the EPIC. If the time spent on the EPIC is less than the time spent on all the child tasks, add a new entry to the epic with the difference:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Nice work @Hugh Lampert!
I would only divide by 3600 instead of 60, I think you're maybe logging in minutes when they should be in hours. I can't tell if that's how it should work for you because I use Tempo Timesheets, so I just changed this and it worked very well.
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.
I am not using Jira cloud, its Jira Data Center. So there is no "LookupIssues". What's the alternative in that case?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
depends on your specific requirement but in general I see 2 ways to do:
Best
Stefan
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.
@Hugh Lampertthis is genius. But in the very last step (Then: Log work), what should be entered for the required field "Date Started"? Please see screen shot. It's not working for me, and I think it's because I don't know what to put into this field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Regarding what to put in the "Date Started" field:
The "date started" field can be left as "{{now}}".
If this isn't working for you and you have "{{now}}" in this field, then there is some other problem; check the evaluation log.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Hugh Lampert for your quick reply. Where will I find an evaluation log? I'm using {{now}} and it isn't working. I'm not getting any errors, but the time logged on children does not show up on epic.
UPDATE to my 4/19 note -- it's now working for me! Thank you so much, @Hugh_Lampert!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Hugh Lampert also not working were. Can you please export your automation to a JSON file? In my case you can find here the log
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.
@Manish Bhardwaj hey ✋
I am not using Jira cloud, its Jira Data Center. So there is no "LookupIssues". What's the alternative in that case?
You can try my solution for DC above (Now it describes create worklog only).
Regards
Slava
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.