Forums

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

Can I use condition with Smart Value

cc0682
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 5, 2020

I try to use smart value to submit the Web Request.

For the customer data, I try to add the POST value to certain field.

 

For example {

"severity": {{issue.priority}}

}

The expected value of severity in server side is integer. However, the {{issue.priority}} is a text string like "Major".

If there any if/else condition which can change the value based on smart value ?

 

For example:

 

if {{issue.priority}} == "Major", {{issue.priority}} = 3.

 

 

1 answer

0 votes
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.
June 25, 2020

Hi @cc0682 -- Welcome to the Atlassian community!

Rather than trying change the value, why not access the name attribute?

  • {{issue.priority}} is the integer
  • {{issue.priority.name}} is the string representation of it

And if you are looking for conditional logic, you could try the if-then-else structure.

Best regards,

Bill

Suggest an answer

Log in or Sign up to answer