Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Customfield with select2 closes while editing



I'm working with new customfield type where options go from ajax.

My code:

#customControlHeader ($action $ $ $fieldLayoutItem.required $displayParameters $auiparams)

#set ($field_uid = $

<input class="issue-link-field single long-field" id="${field_uid}" name="${field_uid}"/>


ajax: {
url: function (params) {
return '/rest/croc-service-import/1.0/configuration-unit/search?str=' + params;
results: function (data, page) {
var confunits = [];
jQuery.each(data, function (index, value) {
var id = value["key"];
var text = value["name"];
confunits.push({id: id, text: text});
return {
results: confunits
AJS.$("#${field_uid}").select2('data', {id: "$key", text: "$name"});

#customControlFooter ($action $ $fieldLayoutItem.fieldDescription $displayParameters $auiparams)

The problem is that if I click edit in issue, the editing closes at the moment select2 opens.  So I cannot save anything. Screens of this attached. Are there any ideas what can I do with it?screen.PNGscreen1.PNG


2 answers

Did you ever find a solution? 

I have implemented a custom field type using select2, and on quick edit, it only closes on a specific project but not another. 


I new here. May I ask, why are you using <input> instead of <select> ?


Because I can't use select for ajax statements. As said in official select2 doc - use imput tag for ajax.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira Software

An update on Jira Software customer feedback – June 2022

Hello Atlassian Community! Feedback from customers like you has helped us shape and improve Jira Software. As Head of Product, Jira Software, I wanted to take this opportunity to share an update on...

182 views 2 5
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you