Is it possible to set multiple options mandatory in a checkbox field depending on another field value?
For example, I have a checkbox field and a select list field
Select list field has the following options. Only one option can be selected.
Checkbox field has the following options. Multiple options can be selected.
If "B" is selected from select list field, can we put H, I, J, K as mandatory options when JIRA workflow transits to another status?
I'll appreciate if you have any suggestions.
I'm new to JIRA development, but in the past, the developers of my current project did something similar to this using a custom 'validator' plug-in, which was added to any workflow transitions on which it should be enforced. I'm not sure if this is the best (or only?) approach, but it did work. Note: this won't mark the field as 'mandatory' (with *), but does cause the transition to fail, and gives the user whatever custom feedback you want...
Well, when I said 'custom' validator, I mean one our team wrote 'from scratch'. Not a huge deal, just...:
3 Velocity templates (edit, input, view),
2 Java classes (one that implements com.opensymphony.workflow.Validator and the other extends AbstractWorkflowPluginFactory and implements WorkflowPluginValidatorFactory, both from the com.atlassian.jira.plugin.workflow package),
and an atlassian-plugin.xml file (not 'in a pear tree...' ;-} LOL)
Some 'MyXyzValidator' holds a CustomFieldManager variable (passed into constructor) to get contents of custom fields, but the conditional logic is in the 'validate' method, wherein you can structure tests on whatever values you want, and if the test(s) fail(s), you throw an InvalidInputException (containing any error message you want to show the user). The plugin XML file must specify the validator class and templates, and the plugin must be compiled/packaged, and then installed by the JIRA administrator. THEN the custom validator must be added to a workflow transition to execute.
There are tutorials that do a much better, more complete job of explaining this (I don't have the URL handy, but they are easy to find), so good luck!
This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.Read more
As a Jira power user, I was at first doubtful that Trello could benefit my workflow. Jira already uses boards (ones you can customize!), so why would I even need to use Trello?! In this post you will...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs