Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

I want to sum up 'Time logged' against sub-tasks, and update it in the 'Time logged' of the parent



I have been trying to use automation rule in Jira to sum the time-logged against any/every sub-tasks and then add it to the Parent User story's "Time logged".

It seems that the automation rule recognizes the 'Time log' field when I use it as a trigger, but when I want to save the value to it, it just doesn't allow me to find the 'Time logged' field.

Just to be clear, I don't mean the Original estimate or the Remaining estimate fields.

Scenario example:
1. User story : A
                         - Tasks # 1 (1 hour work logged i.e. Time spent = 1)

                         - Tasks # 2 (2 hours work logged i.e. Time spent = 2)

                         - Tasks # 3 (3 hours work logged i.e. Time spent = 3)

So, the rule would update the 'Time spent' field of the "User story: A" as Time spent = 6 h.
automation rul.png

3 answers

1 accepted

0 votes
Answer accepted
Mark Segall Community Leader Jul 18, 2022

Hi @Sehreen Jafry 

There are specific triggers/actions for logged work. Try this:

  • TRIGGER: Work Logged
  • CONDITION: Your existing condition is fine
  • BRANCH: Your existing branch is fine
  • ACTION: Log Work
    • Time Spent: {{worklog.timeSpentSeconds}}
    • Date Started: {{worklog.started}}

@Mark Segall ,

I am stuck on the 'ACTION: Log work' step.

Jira isn't allowing me to use the same field 'Time spent' for the user story level.

It allows me to use 'Time spent' update as a trigger, but as you can see in the image above, when I try to find the 'field' in the 'Parent' to place the sum of 'Time spent' of the sub-tasks, I can't find the field.

Can you please guide?

Mark Segall Community Leader Jul 18, 2022

In your screenshot, you're using the Edit Issue action.  You need to change that to the Log Work action.

@Mark Segall ,

I can't believe that actually worked. 

I just have one follow-up question as a newbie to the Jira automation rules.

Question: If I want to build the same rule but this time on the 'Epic' level so that Epic's time logged is the sum of the 'user stories' under it, just like the rule created for user stories reflecting the sum of time logged for their sub-tasks.

What's the best practice? Should I create another rule, which is fired based on this rule's firing? Or, is there another better way?

timspent sum.png

Like Mark Segall likes this
Mark Segall Community Leader Jul 18, 2022

You can add it to the existing rule.  You would just add another branch based upon JQL at the bottom of the rule to branch into the epic like this:

key = {{issue.parent.Epic Link}}

Then add another Log Work action setup identically to the one you have in the first branch.

@Mark Segall 
Thank you so much for your reply. Really appreciate your time.

I realized something after having this discussion here.

1. Jira is already calculating the 'sum' of the time logs of the sub-tasks of a user story and saving that in the 'Σ Time Spent' field of the parent user story. I had four tasks under the following user story and the accumulated score is under the  'Σ' column.
sumof time spent.png

2. The 30 minutes logged on the user story itself, are populating under the Time Spent column, and they are getting summed up under the 'Σ Time spent' column as well.

So, that suffices what I needed without adding the automation rule to it.

For Epics, I followed the following thread and the automation rule described here worked well for me.

Like Mark Segall likes this
Mark Segall Community Leader Jul 19, 2022

Ooh - I learned something new.  Thanks for sharing that the roll up is available out of the box.

Like Sehreen Jafry likes this
1 vote
Mark Segall Community Leader Jan 10, 2023

Hi @Yong - Note the final answer on this.  The rule is not required.  Jira automatically rolls up time spent so whether you're logging new time or editing a previous entry, the Time Spent field will provide an accurate sum of time spent.

This rule works for Log Work action when time spent is logged, but how about the update/deletion of alreay logged time? How do we write the automation rule then?

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events