We have a complex employee change system setup and I would like to set required checklists based on what is selected in another field. So if option A is selected in field 1, require field 2 be filled out. If option B is selected in field 1, require field 3 be filled out.
I have used validators to set required fields in the past. Would something like the above be possible using validators and/or automation rules.
For additional information, we have both Jira Automation Suite (JSU) and Automation for Jira installed.
Hello @Ryan Rosenthal
You can add conditions to transition and combine them with validators.
But you would need to create 2 transitions from the same statuses because conditions will not show the transition if the conditions aren't fulfilled. You can have multiple transitions with same name.
Example from Open -> In Progress
First transition
Add a condition to transition - Value filed (JSU) option A is selected in field 1
Add desired validators
Second transition
Add a condition to transition - Value filed (JSU) option B is selected in field 2
Add desired validators
BR, Olga
Thank you Olga,
I saw that in the JSU options and was thinking that might work. I'll give that a try.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ryan,
Yes it's possible. However, I would recommend using JMWE, Power Scripts or Scriptrunner which provide you with the option to have scripts. We have all of them (including JSU) and I don't see the option on JSU.
What you need to do is to have a scripted validator (SIL or groovy) and return false or true values.
if (option==b){
if (field_1== null || field_3==null){
return false; // one of them was left empty so an error message will display
}
else {
return true; // the field 1 and 3 has data so it passes the condition.
}
}
I hope you get the idea.
Cprime: https://confluence.cprime.io/display/JJUPIN/Cloud+Conditions+and+Validators
JMWE: https://innovalog.atlassian.net/wiki/spaces/JMWE/pages/73302028/Scripted+%28Groovy%29+Validator
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.