Autocomplete stopped working after upgrade to JIRA 8

Ambica Seshasayee March 26, 2020

Hi,

I have a text field which is autocomplete enabled using JS and my code looks as follows:


jQuery( function() {

jQuery('<input field>').autocomplete({
source: function( request, response ) {
jQuery.ajax( {
url: "<REST Path for getting the projects>",
dataType: "json",
data: {
"query" : request.term
},
success: function (data) {
response( jQuery.map( data.projects, function ( item ) {
return {
label: item.name+' ('+item.key+')' ,
value : item.name
};
}));
}
});
},
select: function( event, ui ) {
jQuery('<input field>'').val(ui.item.value);
}
} );
} );

As is obvious, I am trying to autocomplete and list down the projects and print it in "Project name (Project key)" format.

I am getting the following error: "Uncaught TypeError: jQuery(...).autocomplete is not a function".

Pls suggest. Thank you.

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events