Possible to make fields required for certain components?


I wonder if it possible to make a field required when you choose certain components in Jira?

Our scenario:

We have both server and and different mobile clients (iOS/Android/Blackberry e.g.) components in our Jira project.

If the submitter of a issue pick a mobile client as component it would be nice to make fields like phone model and mobile OS version required.

Is this possible? Or does anyone have another smart solution for this scenario?



3 answers

1 accepted

This widget could not be displayed.

Yes this is possible using workflow validator. It should take Components value, based on that you write a message under the required fields on screen.

You can learn workflow validator using the workflow module and http://www.j-tricks.com/1/post/2010/08/workflow-validator.html

This widget could not be displayed.

Off-the-shelf, no. Schemes are all hung off the project and issue type, so you can't have different field configurations by component. It would be messy if you could too - the code would have to dynamically change field settings on-screen part way through a create or edit screen, and you immediately run into a massive problem in that you don't know which scheme to use when the user selects more than one component.

There are two more obvious options here - bodge something in specifically for your needs with javascript, or write a validator that would kick in on issue transtions and check the data entered is valid.

I always prefer the second one myself (javascript fixes tend to break on any change or upgrade and can interfere with each other, whereas I've got validators written for Jira 3 which work in Jira 6 with little ore than "recompile for new version"). For both solutions though, I'd look to Jamie Echlin's work - for the front-end changes, you can probably avoid your own javascript and use the behaviours plugin. For the validator, his script runner plugin can save you a lot of time and coding.

This widget could not be displayed.

Thanks for the quick and good answers! The behaviour plugin sounds like a good way forward!

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

281 views 1 4
Join discussion

Atlassian User Groups

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!

Find my local user group

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

Groups near you