Automation RUle: sum of Time spent in Subtask and show them at Story level

Emna Elleuch July 27, 2024

I've asked a lot of questions regarding Time Spent sum and i couldn't find the right way so i've asked the team to come back to the original Jira workflow.

Basically, we receive Epic (from another platform which is integrated to JIRA), we add a Story and under each Story we add QA and DEV Substaks. The team log their time under QA And DEV Subtasks, The clock work App works as expected

 

now i'm looking to find a way to sum up all the time spent in QA and DEV Substask (or bugs) and display the sum at Story Level and then at  Epic Level (we have added a custom field called Time spent).

 

I've tried the attached rule for 1 sub task (that works fine)but if i have 2 subtasks, how can i fix it?

 

Thanks in advance

 

time spent.PNG

2 answers

1 vote
Tim Kopperud
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 27, 2024

Hi @Emna Elleuch, I first posted an answer here which I noticed had to be incorrect, hence  I removed it. After trying to rephrase it and add a new example I still didn't get it, and I think its because I dont fully understand your requirements. E.g. when you are saying 

I've tried the attached rule for 1 sub task (that works fine)but if i have 2 subtasks, 

What does this exactly means? 

I see under the Parent branch that you use {{issue....}} and not {{triggerIssue....}}. Do you try to copy the value from the Parent into "Time Spent" (then using issue is correct), or do you want to copy the value from the subtask into the Time Spent on parent issue (then triggerIssue is correct).

Do you want to simply overwrite Time Spent or accumulate to it? Is Time Spent meant to show the total accumulated end result on all child Issues? 

On Stories we have a feature including subtasks.

image.png

Is it so that you want to have Time Spent (red underscore) on the Story to be identical to Time Tracking (yellow marking)?

 

TimK

0 votes
Adaeze_Jude_HEROCODERS
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 29, 2024

Hello @Emna Elleuch ,

Without needing an automation rule, you can get this information with Clockwork.

In Clockwork, you can display the total time tracked on Child issues by Clicking a button, as shown:

2hyfu6WQTM.png

Also, this information is available on the Timesheet, as shown:

opYi5n2Ege.png

I also discussed an automation recently that gets the total time spent on all linked issues.

 

This is the Webrequest used:
https://YOUR-INSTANCE -URL/rest/api/2/search?jql=parentEpic%3D{{issue.key}}%20or%20parent%3D{{issue.key}}&fields=timespent

 If you would like to discuss this further, please reach out here.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events