Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Calculations in Jira

Robin Stemmers
Contributor
March 27, 2024

Hi All

I am a bit baffled about my calculation. Please help

I want to do a simple calculation

Input value x Rate = Cost

10 x 10 = 100

Input value 10

Calculation must do

Input value x Rate = Cost

 

My automation is set as follows:

On a numeric field "Cost"

{{#=}}{{isssue.customField_????}} * 1.2{{/}}

Then I get this error

Error rendering smart-values when executing this rule:
Unknown unary operator * at character position 1: * 1.2
What am I doing wrong?

1 answer

1 accepted

1 vote
Answer accepted
Kalyan Sattaluri
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 27, 2024

Hello @Robin Stemmers 

Sorry but your post is not clear for us to help.

Assuming customField_12345 is your numeric "Cost" field, syntax is correct for below.

{{#=}}{{isssue.customField_12345}} * 1.2{{/}}

But before you do calculation, can you post what {{issue.customField_12345}} holds from audit log?

Because what I gathered is, customField_12345 is your "Cost" field and earlier in your post, I see you talk about calculating cost from input value x rate. You are doing all that?

Please help us help you by sharing your rule and audit log..

 

 

Robin Stemmers
Contributor
March 29, 2024

Hi

You kinda got it, but let me break it down.

I have 3 numeric fields. 

I want a user to input QTY ; the Rate is preset; Calculation must take place after saving.

EG: 10 x 2 = 20

Cost = Field "QTY" * Field "Rate"

Qty Field

Rate Field

Cost Calculation

10

2

20

Form View

2024-03-28 06_12_22-Server Quotations - QA Media24 QA Service Desk - Jira Service Management.png

My automation is triggered on Create

2024-03-28 06_06_49-Audit log - Automation - QA_ M24 Service Desk - Jira.png

Automation Error

2024-03-28 06_13_22-Audit log - Automation - QA_ M24 Service Desk - Jira.png

I hope that makes sense.

 

Kalyan Sattaluri
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 29, 2024

Hello @Robin Stemmers 

There is a typo (extra s) in your formula. It should be issue, not isssue..

I copied your syntax and did not check either ..  sorry. :p

Update to below:

{{#=}}{{issue.customField_11072}} * 1.2{{/}}

BTW, I still havent figured out the requirement but please update and let us know if any further blockers.

Also, please do Action -> Log to constantly log smart values so you are tracking progress and share screenshot of audit log showing that result for community to help quicker. Hope it helps! Thanks!

 

 

Like Robin Stemmers likes this
Robin Stemmers
Contributor
March 29, 2024

@Kalyan Sattaluri Thank you so much.

That was a silly error :)

I tested this and it works perfectly.

 

Like Kalyan Sattaluri likes this

Suggest an answer

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

Atlassian Community Events