Required field Validator - Check Issue type and Summary contains Text

Madhu Reddy February 3, 2022

Hello,

We have a requirement to check conditional validation before going to the status. 

Field will be required only if the Issue type is X and Summary contained XYZ. 

Please help us to write the above validation.

Thanks in Advance

Madhu

 

1 answer

1 accepted

2 votes
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 

 

With Scriptrunner you could use a simple scripted validator on the transition in the workflow. Then use this condition:

issue.issueType.name == 'X' && issue.summary.toLowerCase().contains("xyz") || cfValues['name of customfield']

 

https://scriptrunner.adaptavist.com/6.20.0/jira/recipes/workflow/validators/simple-scripted-validators.html 

 

Thanks,

Tim

Madhu Reddy February 3, 2022

Hello @Tim Perrault 

Your script worked for me like a charm. Thank a lot.

Madhu

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events