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.
Making a field mandatory depending on other data entered on the issue screen (i.e during an issue creation or an issue transition)
When to use CSV importer When managing your processes in Jira, there are many occasions where you need to create a lot of tasks. Creating them one by one will cost you a lot of time and effort and i...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event