JQuery autocomplete custom field

Luca Andreatta
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 25, 2019

Hi all,

I created an automcomplete custom field which takes values directly from Jira database which works well for Jira 7.10. This plugin use jQuery UI Autocomplete 1.8.11 and jQuery UI Position 1.8.11.

I'm trying now to update it for Jira 8.4.0, but I'm not able to get it work.

Looking around I see that in Jira 8 there is the new version of jQuery 2.2.4 and I tried to follow tha Atlassian guidelines, but didn't find a solution.

I also tried to include jQuery JavaScript Library v1.12.4 and jQuery UI - v1.12.1 with the autocomplete modules and the customfield works, but I started to have other pages not loaded correctly because of Javascript errors.

This is a snippet of atlassian-plugin.xml in which I load the JS libraries:

 <!-- Autocomplete JS and CSS-->
<web-resource key="jquery.autocomplete.customfield" name="Script JS about autocomplete managment" >
<context>atl.general</context>
<resource type="download" name="jquery-ui-custom-autocomplete.css" location="css/jquery-ui-custom-autocomplete.css" />
<resource type="download" name="jquery-custom-autocomplete.js" location="js/jquery-custom-autocomplete.js" />
<resource type="download" name="jquery-ui-custom-autocomplete.js" location="js/jquery-ui-custom-autocomplete.js" />
</web-resource>

What is the correct way of doing it? Do I have to use another autocomplete javascript library?

I also take a look at JDVP, but it seems too overcomplicated for my purpouses.

1 answer

0 votes
Luca Andreatta
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 27, 2019

I have build a simple version of my plugin to understand how to create a working version of an autocomplete custom field in Jira 8.

You can find it here:

There are two releases by now, one that has a clean working simple text custom field and another one that have the JQuery library to add the autocomplete funcionality, that doesn't work.

It would be great if you can download and try by yourself to help me!

Suggest an answer

Log in or Sign up to answer