Forums

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

How do I set a Smart Variable to zero?

Cash Coyne
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.
January 3, 2024

How do I set a Smart Variable to zero?

I tried to use just the number 0 and got an error, then tried this and got an error:

 

SmartValue0.JPG

2 answers

1 accepted

0 votes
Answer accepted
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.
January 7, 2024

Hi @Cash Coyne 

Context is important for automation rule questions.  Please post an image of your complete automation rule, images of any relevant actions / conditions / branches, an image of the audit log details showing the rule execution, and explain what is not working as expected.  Those will provide context for the community to offer ideas.  Thanks!

Until we see those...

The variable value can be set to 0, however variables are always text data type.  And so I suspect the error / problem you are encountering is trying to use that value as a number later in the rule.

To convert a text value to a number, please use the asNumber function: 

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-text-fields/#asNumber

Kind regards,
Bill

Cash Coyne
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.
January 23, 2024

Ahhh... didn't know variables are always text data type.  That helps!

Like Bill Sheboy likes this
0 votes
Malka Jackson [Isos Technology]
Atlassian Partner
January 3, 2024

{{#=}}0{{/}}

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