I have two single select fields in my project:
Field1 is Signature: Signed, Not Signed (its values)
Field2 is Category: Revex, Capex (its values)
I have a Documents checkbox with four options:
1. invoices attached
2. Approval mail attached (for not signed)
3. Revex docs attached
4. Capex docs attached
On Create Issue, I want the checkbox validation to be as:
If Signature field is Not Signed, then the user must tick the option 2 of checkbox
If Category field is Revex, then the user must tick the option 3 of checkbox
If Category field is Capex, then the user must tick the option 4 of checkbox
The user must always tick the option 1
How can I achieve this using JSU?
I was able to achieve the validation as mentioned in the question using a ScriptRunner Build In validators. I used Simple Scripted Validator for each of the conditions. Examples were very helpful to get started with.
If Signature field is Not Signed, then the user must tick the option 2 of checkbox
cfValues['Signature']?.value!= "Not Signed" || cfValues['Documents']*.value.contains("Approval mail attached (for not signed)")
Did it similarly for below two conditions:
If Category field is Revex, then the user must tick the option 3 of checkbox
If Category field is Capex, then the user must tick the option 4 of checkbox
The user must always tick the option 1:
cfValues['Documents']*.value.contains("invoices attached") //i.e. option 1
Important Note: The value in contains() should be the exact value of the option.
This doesn't work in Jira Cloud. Could you please help me with the script for the cloud instance.
I am trying to add the following validator script to Workflow but getting the following error.
cfValues['Sub-Status']*.value.contains("On hold")
Here 'Sub-Status' is a checkbox field having only 1 value 'On hold' currently.
Thanks in advance.
Sneha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, @Pranita Warik We'd love to help you with your special use case. Kindly create a ticket here so we could help you configure. Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.