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
@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?
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 @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
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.