Heads up! On March 5, starting at 4:30 PM Central Time, our community will be undergoing scheduled maintenance for a few hours. During this time, you will find the site temporarily inaccessible. Thanks for your patience. Read more.
×I have a transition on which I am trying to do "Condiitonal Validation".
I have a screen that is displayed on transition. On that screen I have a field for which I would like to base validation.
In the transition from To Do to In Progress, Screen X is displayed with 3 fields:
Depending on the value of Field A...
Is there a way to implement this?
It would be possible to achieve using Jira Expression Validator, which is part of the free Workflow Building Blocks for Jira app.
The expression would be as follows:
issue.customfield_A?.value == 'Yes'
? issue.customfield_B != null && issue.customfield_C != null
: true
Change customfield_A, customfield_B, customfield_C, to field ids valid for your Jira. Start typing in the editor and you will get suggestions based on the name of your fields.
Finally, you can add a validation message to ensure users understand why the transition is blocked.
Full disclosure: I am from Forgappify, the vendor of the app.
Cheers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Deon Schaffer ,
I wish you a good day!
I am from the appfire support team, and to achieve your use case, I would like to recommend you JMWE app for the cloud.
1) you can choose to build your own scripted condition
2) then you can write the condition like below.
Once you click on issue fields, you can look for your field A ( like I have looked for 'Product short code' in above eg) and then it will show you available code options. You can hover your mouse over it to see what it does, and then you can click on it and the code will be selected .
eg:
if (!!issue.customfield_10049 && issue.customfield_10049.value == "IRIS") {
((!! issue.customfield_10050 && !! issue.customfield_10050.value) && issue.customfield_10048 != null)
}
else {
return true
}
the above code checks if issue.customfield_10049 is not empty and has the value IRIS
IF yes then it checks customfield_10050 is not empty
AND then it checks issue.customfield_10048 is not null (because it was text field and others are select list )
else it returns true
Once you have completed writing your code, you can click on the test Jira expression and choose the issue key to validate it.
Once you are satisfied with the result. You can save it.
Let me know if it helps!
Thanks!
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.