Forums

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

smart values calculating cost of 2 fields.

Tomasz Osik October 19, 2023

Hi,

 

Where I am making a mistake? I am having 3 fields:

Change Cost = read only 

Original Estimates = to be populated

ML Estimates = to be populated

 

Automation to:

On transition

If any of value is present

calculate using smart value.

 

Smart Value:

{{#=}}{{((issue.Original Estimate}}) / 8) * 650 + (({{issue.ML Esitmates}}) / 8) * 750{{/}}

 

Cant get values or flashing unary operator. Seems like from simple calculation i have created monster that will not be working at all... 

 

Can anyone advise me on this issue?

 

Best Regards

Tomasz

 

1 answer

0 votes
Marc - Devoteam
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.
October 19, 2023

Hi @Tomasz Osik 

What is the automation look like and what is the current error you are getting, when the automation rule is executed?

This detail level would help the members here to see if we can find a solution for you.

Tomasz Osik October 19, 2023

Hi,

 

Thank you for response, i think i have fixed the issue by correcting equasion to:

 

{{issue.Change Cost.asCurrency("gb_GB")}}{{#=}}((({{issue.Original Estimate}} / 8) * 650) /3600)+(({{issue.ML Estimates}} / 8) * 750){{/}}

Missing brackets and i did not took into consideration that original estimates are always stored in seconds, therefore i had to divide this field by 3600second (this equates to 1 hour).... and it worked. However i cannot set up "£" currency. 

 

Is smart value correct?

 

Thanks in advance.

Like Marc - Devoteam likes this
Marc - Devoteam
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.
October 20, 2023

Hi @Tomasz Osik 

I think the smart value in relation to the pound sign should be en_GB instead of gb_GB

Tomasz Osik October 20, 2023

Hi,

 

Amended it... no joy so far.... will research it further

Like Marc - Devoteam likes this
Bill Sheboy
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.
October 20, 2023

Hi @Tomasz Osik 

Adding to the earlier answer:

I am unclear why you are placing the Change Cost value next to the math operation.  Would you please explain? 

For an example, please show some example values and your expected output (field set).  Knowing that may help the community to suggest improvements.

Kind regards,
Bill

Suggest an answer

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

Atlassian Community Events