I have a custom field called 'OS' (field ID 2354); it is a single-select field with multiple choices containing values such as 'Ubuntu,' 'RHEL,' and 'Windows,' which determine the operating system for my Jenkins job.
I now require a script that allows users to select values, but specifically prevents the selection of 'Windows' in conjunction with other values. An error should be triggered when attempting to create or update a ticket under this condition.
I attempted this using ScriptRunner Behaviour without success. Can anyone provide assistance?
Refined Conditions:
- If I select a single value, such as Ubuntu, RHEL, or Windows, then I should be able to create or update a Jira issue.
- If I select multiple values, such as Ubuntu and RHEL, then I should be able to create and update a Jira issue.
- If I select combinations like "Ubuntu & Windows," "RHEL & Windows," or "Ubuntu, RHEL & Windows," then I shouldn't be able to create or update the Jira issue. Instead, a message should be displayed, stating: "Windows cannot be selected with other values."