Conditional Validation - If Summary contains Some Text

Madhu Reddy February 3, 2022

Validate if the summary contains "SomeText", if not transition should pass .

We need to check for some text in the ticket summary before passing the transition. Something like Summary ~ "sometext" in JQL. 

Please help to write validator for Summary contains text.

 

Thanks & regards

Madhu

1 answer

1 accepted

1 vote
Answer accepted
Tim Perrault
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.
February 3, 2022

Hi @Madhu Reddy 

 

If you use scriptrunner you can use a simple scripted validator on the transition.

The code below gets the summary and changes it all to lowercase so that we don't have to check for every iteration of capitalization and thens check to see if the summary contains 'text here'. If it doesn't contain that then it won't pass. You can change text here to the text you need.

!issue.summary.toLowerCase().contains("text here")

 

Thanks,

Tim

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events