I'm using Adaptavist Simple Scripted Validator to check the below on create:
A). I have a field "Global" - if a user fills it in as Yes, I want them to be required to fill out field "Users"
B). If a user fills in global = no, they have to fill out one of either Users, User Types, or Dataset.
I have the script for A (below). How do I add in the script for B? Basically I want an either/or statement
cfValues['Global']?.value != 'Yes' || cfValues['Users']
I think you can achieve it using a single validator:
(cfValues['Global']?.value == 'Yes' && cfValues['Users']) || (cfValues['Global']?.value == 'No' && (cfValues['Users'] || cfValues['User Types'] || cfValues['Dataset']))
looks like a lot of brackets, but basically first part is condition A, second - B
Use script-runner behaviors to achieve this. You don't need to write any groovy for this.
https://scriptrunner.adaptavist.com/latest/jira/behaviours-overview.html
Making a field mandatory depending on other data entered on the issue screen (i.e during an issue creation or an issue transition)
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.