Forums

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

SmartValue CustomField (Dropdown) and Char selection

Simon König
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 3, 2024

Hello,

I would like to use a smart value charcter to do some comparisons, but I cannot get a single char out of a dropdown field smart value.

I have a single select dropdown menu. All of the options start with a number 1-5 and I want to be able to edit a Issue via Automation, when Dropdown 1 = 5 and Dropdown 2 = 3.

The comparison part is not the problem, but I can't seem to get the Number I need.

So far I tried:

{{issues.customfield_id.charAt(0)}}

 

{{issues.customfield_id.toString.charAt(0)}}

 

{{issues.customfield_id.left(0)}} and {{issues.customfield_id.toString.left(0)}}

as well as {{issue.customfield_id.substring(0,1)}}.

I think I might be using the wrong syntay, or something changed bc. I know that it worked some time ago (which I unfortunately have no backup of)

1 answer

1 accepted

4 votes
Answer accepted
Simon König
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 3, 2024

I found another post made ages ago, and for everyone else with this problem: The solution with select lists is .getValue.charAt()

See: https://community.atlassian.com/t5/Jira-questions/Using-String-Manipulation-functions-on-Select-List-Fields-Jira/qaq-p/1477939

 

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