Single select custom field behave like component section


I've tried following the scripts in these questions:

I'm still not getting any results. Is there more than just entering the script into the description field and updating the custom field ID?


3 answers

1 accepted

0 votes
Accepted answer

Those two questions are ancient and irrelevant to newer versions of JIRA (especially as the ability to run dodgy javascript as part of fields is being reduced because it breaks so much and so often)

Could you explain what you mean by "custom field behave like component section"?  What are you looking for? 


  • For it to behave like a multi-select?  (You'll need to start with a multi-select cf to start on that one)
  • For it to appear somewhere else on issue view?
  • For it to be maintainable by project admins?

Currently my single select custom field has a list with all the available options, but I would like to have it appear like the component field so the user can start typing and have relevant options appear.

This works for me on a Custom Field of type Select List (multiple choices) - make sure to put this: on the Field Configuration, on the Custom Field, click edit, put the following JavaScript in the Description. Earlier versions of JIRA let me use it directly on the Custom Field description, but after a recent upgrade I had to make sure to use it on the Field Configuration.


<script type="text/javascript">
	AJS.$("#customfield_10698 option[value='-1']").remove();
		new AJS.MultiSelect({
      		element: $("#customfield_10698"), itemAttrDisplayed: "label", errorMessage: AJS.params.multiselectComponentsError


Make sure to edit the Custom FIeld ID in the two spots in the JavaScript to match your custom field id value.


Hope it helps.

I'm on JIRA 6.4 and this script does not work for me.

I'm also on 6.4. Did you make sure to change the occurrences of "customfield_#####" to whatever your custom field id is? Did you place this script on the "Field Configuration" description for the custom field instead of directly on the custom field's description? One issue w/ this script is that it will only work if the issue type is first selected, it won't render if you have to change the issue type in order to see this field.

The field is not issue type dependent and both field IDs are changed in the configuration description.

I found that this script worked for one field, that had just text options, but when I had things like below (it didn't work). Any ideas?

A.1.a - commercial 

A.2.a - worker

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

1,097 views 4 9
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