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

How to get sum timespent from linked issues?

Pavel
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 2, 2020

Hi, I'm trying to calculate total timespent of all worklogs for linked issues (is caused by for ex.) using smart values.

This one gives me a list of linked issues:

{{issue.issuelinks.outwardIssue}}

This one gives me total amount of timespent from their worklogs (in seconds):

{{issue.issuelinks.outwardIssue.timespent}}

It works perfect and returns one number until there becomes more than one linked issue.

If parent issue has 2 linked issues it returns string of values separated by comas:

3600, 2400 ...

How can I sum these values to get one number (6000 for ex.)?

Tried to add .sum" but it returns nothing:

{{issue.issuelinks.outwardIssue.timespent.sum}}

UPD: audit logs:

Logaction

Parent issue (is caused by) list issue.issuelinks.outwardIssue.timeoriginalestimate: 3600, 7200

Logaction

trying to get sum issue.issuelinks.outwardIssue.timeoriginalestimate.sum:

^this one is my current problem, it's empty

Log work

This work duration obviously terminates:

{{#=}}({{issue.issuelinks.outwardIssue.timespent}}-{{issue.timetracking.timeSpentSeconds}})/60{{/}}m

Error rendering smart-values when executing this rule:Too many numbers or variables: (1920, 5400-3720)/60

1 answer

0 votes
Sherry Goyal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 2, 2020

@Pavel  Hello!

 

Thanks for writing to us.

If you are using cloud(not jira server), then "sum" should work the way you are trying to do. I used

{{#=}}{{issue.issuelinks.outwardIssue.timespent.sum}} / 3600{{/}}

This gave me sum in hours.

It would be better if you can share audit logs and rule plan for better insights. 

Let us know in case of concerns.

 

Cheers
Sherry(A4j)

Pavel
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 3, 2020

Thanks for quick reply. Yeah, i'm on server version. Updates post with logs, can't paste images due to net  rules restrictions. Is there any solution for server version?

Sherry Goyal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 3, 2020

@Pavel 

I do see request for sum/min/max, etc raised in the backlog with the relevant team. I have voted for the request. Also, have notified the team with your concern. Hopefully somebody will respond here soon.

Cheers
Sherry

Victor Seger
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 3, 2020

Hi @Pavel ,

I'm Victor from Atlassian Support. I'm one of the experts about Automation for JIRA.

So, currently there's no way of performing this action as you wanted. The workaround that @Sherry Goyal is the closer that we can get from what you wanted to do.

Automation for JIRA would need to have variables and aggregate functions that are not currently available on our Server version of the plugin.

Sorry for not bringing you good news at this point. 

I've updated the request that Sherry sent you previously to add the "aggregate" function as well.

I'd suggest you voting and watching that case so you're going to receive updates when they happen on that ticket.

Hope it all makes sense.

Cheers,
Victor

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events