The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Multiplying lookupissue values

Ari Raatikainen
Contributor
March 11, 2025

Hi,

In automation I am trying to calculate sum of multiply of two lookupissue values (X and Y)

lookupissue.valueX (string)

lookupissue.valueY (number)

 

Could you help me and propose what is the correct smartvalue to be used or how to achieve the expected. Take an examle of lookup issue values

5 * 2 + 10 * 3 + 1 * 5 = 10 + 30 + 5 = 45

but if I use for example

{#=}}{{lookupIssues.valueX.asNumber.multiply(lookupIssues.valueY).sum}}{{/}}

it returns 0 ?

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

4 votes
Answer accepted
Vishal Biyani
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
March 11, 2025

@Ari Raatikainen 

if I understand it correct, you want to do sumproduct. Below works.,

 

{{#=}} {{#lookupIssues}} {{valueY.multiply(valueX.asNumber)}} {{^last}}+ {{/}} {{/}} {{/}}

 Can you check and see if this works for you?

Vishal Biyani
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
March 11, 2025

@Ari Raatikainen 

 

This will give the correct sum product.

{{#=}} {{#lookupIssues}} {{valueY}} * {{valueX.asNumber}} {{^last}}+ {{/}} {{/}} {{/}}

 

Like Ari Raatikainen likes this
Ari Raatikainen
Contributor
March 11, 2025

Hi @Vishal Biyani your solution works :) I am so glad to see this finally working - thanks a lot for you help and have a nice day!!

BR;
/Ari

Vishal Biyani
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
March 11, 2025

Glad to know this worked for you

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events