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

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 Leaders.
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 Leaders.
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 Leaders.
March 11, 2025

Glad to know this worked for you

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events