Hi together,
is there any way to consolidate spent time in an epic.
I tried to branch the automation by using For epic (parent) and inserted "{{issue.subtasks.aggregatetimespent.sum}}" but that always reply 0. Even if I see by using the Rest Api that there is a value in it.
Even if I have the summarized time spent. Where to store it? I want to have it visible in the time tracking field available in my epic.
So I want to realize by automation the checkbox Jira introduced for standard issue types "Including Subtasks" but here as "Including standard issue types"
//edit 02.11.2021
I tried even more potential smart values, and all reply "0". I tried it now with the action Lookup issues, and for Story Point sum it works.
All reply 0:
{{lookupIssues.worklog.timeSpentSeconds.Sum}}
{{lookupIssues.aggregatetimespent.sum}}
{{lookupIssues.timespent.sum}}
{{lookupIssues.timetracking.timeSpentSeconds.sum}}
This really helped me to get time spent of sub-task under lookup value in Automation
{{issue.subtasks.timetracking.timeSpentSeconds.sum}} <<< For sub-task Time Spent
{{worklog.timeSpentSeconds.sum}} << for task Time Spent
Adding both I got rollup at Task which is similar to Aggregate (Sigma) Time Spent
I found a solution but it's quite hacky.
I use the action "Send web request" with the following values:
.../rest/api/latest/search?jql=%22Epic+Link%22%3D{{issue.epic link}}&fields=aggregatetimespent
Headers:
HTTP method: GET
Web request body: empty
Wait for response:
After a successful request you can use the following statement to sum up all aggregates timespent of standard issue types except epic. So it's only working for items like story, bug, ...) But that's no problem because you can check include subtasks in the standard issue type and then the value is included in aggregatetimespent.
{{webhookResponse.body.issues.fields.aggregatetimespent.sum}}
Quite hacky and sadly you need login credentials from a user for that. But I didn't found any other way, because I can't access aggregatetimespent by smart value.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Denis
The Lookup Issues action only supports a small number of fields currently, and does not support those time tracking fields. I believe using the REST API is one of the only ways to do this currently from within a rule.
The other way is to trigger on child issue changes for the fields, adjusting custom fields in parents with each change.
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for sharing @Denis -- between your info and this page:
I was able to get it working for multiple custom fields on the Task issues that I wanted to roll up to the Epics.
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 @Rodolfo So
This is a very old question / thread. I recommend creating a new question and linking back to older threads for context. That will ensure more members of the community see the question to offer help.
Until you post your new question...
The capabilities of rules have changed quite a bit since November 2021...
Kind regards,
Bill
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.