Forums

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

Workflow Transition Validator: Regular Expression Check for selected issue types only

Tilman Ulshoefer
Contributor
February 17, 2023

I want to limit a Regular Expression Check to specific issue types:

  • Field to be checked: Story Points
  • Regular expression: [1-3]|[5]

I assume this is the correct expression to retrieve the issue types:, isn't it?

  • issue.get("issuetype").name in ["Activity","User Story"]

What is the correct expression so that the check is only performed for these issue types?

2 answers

0 votes
Tilman Ulshoefer
Contributor
February 19, 2023

deleted, wanted to reply.

0 votes
Derek Fields _RightStar_
Community Champion
February 17, 2023

What tool are you using for your validator? If this is JMWE, then you would want to use 

issue.get("Issue Type").name in ["Activity", "User Story"]

If you are using ScriptRunner, then you need this code

issue.getIssueType().getName() in ["Activity", "User Story"]
Tilman Ulshoefer
Contributor
February 19, 2023

Thank you, Derek. For the tool I need to check.

How do I combine my two parts? Something like <If issue.get("Issue Type").name in ["Activity", "User Story"] then [1-3]|[5]>.

How does IF... THEN... work?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events