How to auto-assign a 'Component' default value when creating a new issue?

How do you set a default value for the 'Component' field when creating a new issue using the OnDemand service?

Basically, I'm looking for the same functionality the 'Priority' setting offers. In the Create Issue window, the default priority is always set to 'Major' with an option to change to something else from the pull down list.

I would like the 'Component' field to be pre-populated with a default value with an option to change to something else as well.

2 answers

0 votes

You can't have a default value for components. Not without code or some javascript - which is not allowed in onDemand instance.

The best you can do is to make it mandatory so that people will be forced to select one!

Little tricky, but you will need to use the both line together, the first will truly select the components, the second will display it to user:

AJS.$("#components").val(11902); //11902 is id of "My Component"
AJS.$("#components-textarea").val("My Component").blur();

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,781 views 11 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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot