Forums

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

can I create variable by mathematical operation

Ketaki kate May 17, 2023

I am trying to do a automation which contains Two mathematicl operation. so first variable created with just fetching value of A field. Now I am creating second variable by fetching value of B and adding variable A. is it possible.

Finally, I will update the D field by just fetching value of C and subtracting (variable B+A) from it.

 

2 answers

0 votes
brady_leach October 24, 2023

Hi Kate,

I stumbled across this searching for something similar, so I thought I would answer on the chance it helps someone else. 

I don't believe this will work for your use-case. The created variable can be created from math expressions but not used in subsequent math expressions as it is returned as a string and not a number type. 

You can combine the entire equation into a single call. I haven't tested it, but it will be something as shown below. 

 

For example

image.png

0 votes
Aron Gombas _Midori_
Community Champion
May 17, 2023

There is an automation action called "Create variable" which will evaluate an expression and set its result to a new variable.

It can work with smart values, so it should fit your use case.

See: https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Create-variable

Suggest an answer

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

Atlassian Community Events