Possible to make fields required for certain components?

Niklas Jonsson September 18, 2013

Hi

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?

Cheers,

Niklas

3 answers

1 accepted

1 vote
Answer accepted
Bharadwaj Jannu
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 18, 2013

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

1 vote
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 18, 2013

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.

0 votes
Niklas Jonsson September 18, 2013

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