PCF - Multiple Autocomplete

Table of Contents

The Multiple Autocomplete custom field enables you to select multiple options based on a dynamic data source in an autocomplete list field. 

This custom field can be used for the following options: 

  • String (default)

  • Component Picker

  • Group Picker

  • Issue Picker

  • Project Picker

  • User Picker

  • Version Picker

Using the PCF - Multiple Autocomplete custom field

If you go to an issue and edit this field, you will see an image like the following example: 


Save the changes and the values will appear on the issue screen: 



Using Multiple Autocomplete custom field with SIL Data Source

Getting Users

This example groups all users existing in specific groups (in this case, "jira-users") and adds the usernames that match the search as options to the custom fields using this data source.

function getUsers(string [] groups){ string [] users; for(string group in groups){ string [] currentGrp; currentGrp = addElement(currentGrp, group); for(string user in usersInGroups(currentGrp)){ users = addElementIfNotExist(users, usernameToUserKey(user)); } } return users; } string [] groups = {"jira-users"}; string [] users = getUsers(groups); string [] res; for (string user in users) { if (contains(user, argv["query"])) { res = addElementIfNotExist(res, user); } } return res; 

Using Multiple Autocomplete custom field with SQL Data Source

To use SQL Data Source, set the JNDI first. For more information, see the SQL Data Source page.

SQ Autocomplete Script

The following example returns user names of all users:

select user_name from cwd_user;

See More