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

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

Avatar

1 badge earned

Collect

Participate in fun challenges

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

Challenges
Coins

Gift kudos to your peers

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

Recognition
Ribbon

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!

Leaderboard

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
4,464,809
Community Members
 
Community Events
176
Community Groups

How to get sum timespent from linked issues?

Edited

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

@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)

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 Sep 03, 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 Sep 03, 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

Atlassian Community Events