Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×Hi All,
I know that Jira Workflow Toolbox has a capability to define custom field as calculated math function. Moreover this function can operate on a list of linked issues e.g.:
sum(fieldValue({16901}, linkedIssues()))
But I cannot find a way to define such calculated field as nested match expression operating on selected 2 fields of lined issues e.g.:
sum(fieldValue({16901}, linkedIssues())* fieldValue({16902}, linkedIssues()))
I need it to calculate total spending as as sum of (cost * rate) of all linked issues.
Is there any way to workaround that ?
Hi @KM ,
and welcome to the 'parser zone'. :)
Your scenario is actually rather easy using the mathOnIssueList() function.
If you can ensure that cost and rate are always set on your linked issues, you can use:
sum(mathOnIssueList(linkedIssues(), ^{16901} * ^{16902}))
The failsafe approach would read:
sum(mathOnIssueList(linkedIssues(), (^{16901} != null AND ^{16902} != null) ? ^{16901} * ^{16902} : 0))
The second expression calculates the multiplication only for issues in which both values (cost and rate) are set and otherwise includes 0 in the total for this issue.
Cheers
Thorsten
You're welcome. Just as an additional note: if my explanation solved your problem, could you please mark the answer as correct?
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.