Possible to make fields required for certain components?

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

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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Tuesday in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

376 views 1 18
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