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

1 vote
Accepted answer

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

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.

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
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,418 views 15 19
Read article

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