I want to build a validator that won't let the user transition a ticket if one of the fix version values doesn't have a hyphen in it.
Background: We use fix version both for code releases which have a hyphen in them and for PI increments. The ticket will have a PI fix version on it, and I need the transition to fail if it also doesn't have a code release (with a hyphen) fix version on it.
Alternatively, if hyphen won't work, the validator could look for either: No-Deployment-Needed or a fix version containing 2025.
I've tried the Build-Your-Own Validator jira expression, but I don't have the coding skills to get it right.
Thanks in advance!
Hi @Stewart_ Emily _ Global D_T,
Welcome to the Community! If I understand correctly, transition should work if at least one of the versions contains "-", in that case following should work:
issue.fixVersions != null
&& issue.fixVersions.some(item => item.name.indexOf("-") != -1)
If you are new to Jira expressions, have a look on the Ultimate Validator that my team developed. It can generate the expression for you using simple UI
I hope this helps.
Cheers!
This totally worked! Thanks so much, @Maciej Dudziak _Forgappify_ ! I will check out your app. I spent many hours trying to figure this out, so your app must be amazing.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You're welcome
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.