Forums

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

Use smart values on customfield dropdown field

Kai Ytterberg
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!
September 7, 2022

Hi!

I have a dropdown customfield where all fields are in the format "Some value [custom ID]". 

When running an automation rule, I need to get just the custom ID part of the customfield. 

If I just print the customfield, it works, but if I add any smart value functions to it, I just get a blank text

The below is what should be correct to get the custom ID part:

{{issue.customfield_NNNNN.match("(\[.*?\])").get(0).substring(1,-1)}}

 

On a similar topic, there aren't any dropdown options where I can show a text with a corresponding hidden value in jira?

1 answer

1 accepted

6 votes
Answer accepted
Alex Koxaras _Relational_
Community Champion
September 7, 2022

Hi @Kai Ytterberg and welcome to the community

Text methods do not apply to single select fields. That's why you are getting null. You should first place your value on a variable and then do your expression. Mine works like this:

ssf as text.png

And I get proper results!

Hope that helps :)

Kai Ytterberg
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!
September 17, 2022

Thank you! Exactly what I was looking for! :)

Like • Alex Koxaras _Relational_ likes this
Alex Koxaras _Relational_
Community Champion
September 17, 2022

Good to know that! Thank you for marking my answer as accepted! :)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
atlassian, confluence, loom, atlassian intelligence, ai notes, ai-powered meeting notes, atlassian community events, ace, confluence ai, loom ai integration, ai note-taking, atlassian ai features, team '25, atlassian live learning, confluence automation

Unlock AI-powered meeting notes: Join our live learning session! 📹

Did you catch the news at Team ‘25? With Loom, Confluence, Atlassian Intelligence, & even Jira 👀, you won’t have to worry about taking meeting notes again… unless you want to. Join us to explore the beta & discover a new way to boost meeting productivity.

Register today!
AUG Leaders

Atlassian Community Events