Is there any way to create a custom field of type Multi Select, in Jira with Autocomplete Renderer?

I need to create a custom field something similar to the 'Affect version' field with AutoComplete, multiselect and drop down.

From the documentation it seems this is not possible, but please let me know if there is any way?

2 answers

This widget could not be displayed.

This type of field is not available as a custom field. But you can use some JavaScript to simulate it on a multi-select field.

  1. Create a new multi select list field. Remember the custom field ID
  2. Paste the below Javascript code in the description of that field in your field configuration (replace "customfield_10131" with your field ID)

 

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

 

It does not always work on page refreshes and not in some dialogs. Give it a try and see if it meets your needs.

Best regards,
George

Thanks George, tried it but it still renders in same old way. I am trying in issue create UI and detailed issue view.

Hmm, that's weird. I just tested it with JIRA 6.3.11 standalone (not OnDemand). Works fine. Are you sure you have the correct field ID and field configuration?

Yes, the custom field id is correct, double checked it. Just to be sure, this is what I am doing: 1. Create a custom field(of type: Select List(multiple choices)) 2. CustomFields--> Configure CustomField--> Edit Configuration: In the description box there enter the above code with appropriate custom field. But the end result is same, the normal multi select list.

Oh, I see. You are putting the code at the wrong spot. In my post above I referred to the "field configuration" of your project. Do not edit the configuration of the field itself. Open the field configuration that your project is using for the desired issue type, scroll to your field there, click Edit and paste the code into the "Description" field there.

Ok, so I tried with the steps, but the multiselect remains same. Only change is I see the entire code below the field now(normally where the field description resides). This is the code I am pasting: ------------------------------------------ <script type="text/javascript"> AJS.$("#10036 option[value='-1']").remove(); (function($){ new AJS.MultiSelect({ element: $("#10036"), itemAttrDisplayed: "label", errorMessage: AJS.params.multiselectComponentsError }); })(AJS.$); </script> ------------------------------------------ Just a note, I have tried with 'customfield_10036', but results is same.

Did you try with #customfield_10036 ? (needs the hash at the start)

Yes, I tried it with #, with out # both; but the result is same.

Beats me at this point. Are you sure you edited the right Field Configuration for the issue type in question? Are you using your own server or JIRA OnDemand?

This widget could not be displayed.

Hi,

We have developed an add-on, Custom Fields++. It provides some extra features not available in ordinary single select/multi select/radio button fields.

It provides following extra features:

  • auto complete
  • coloring for each option (any css style)
  • icons for each option
  • extra help text that is shown when users hover on an option
  • REST API for options

They are direct replacement of build-in custom fields so migration is very easy. It has some extra custom field types too, and we will continuously add new ones.

multi-select.png

issue-navigator.png

Hello,

I see this is not available for Cloud. Is there an equivalent for JIRA Cloud?

Thank,

Davina Tsosie

Hi,

 

Unfortunatelly it is not available for Cloud. I haven't seen anything similar for cloud, most probably due to limitations of Cloud api.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

232 views 3 0
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