Validate certain text in a custom field (JIRA Cloud / Scriptrunner Validation Expression

Darren.Fairweather April 20, 2023

Hi Community!

I'm trying to validate that on creation a certain custom field contains a certain value in addition to other text. I have created a VERY simple Scriptrunner validation.... issue.customfield_10173 == "@hello.uk". This obviously only validates the text being exact in the field. How do i do it so it checks to see if it "contains" @hello.uk?

 

Many thanks!

 

2 answers

1 accepted

3 votes
Answer accepted
Darren.Fairweather April 20, 2023

issue.customfield_10173.includes("@hello.uk")

0 votes
Vikrant Yadav
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 20, 2023

Hi @Darren.Fairweather Try to add below JIRA Expression :- 

issue.customfield_10155.includes("@hello.uk")

Thanks,

V.Y 

Suggest an answer

Log in or Sign up to answer