PCF - Multiple Autocomplete

PCF - Multiple Autocomplete

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 uses standard configuration settings.

How the field displays

  • This is an example of how the PCF - Multi Select custom field displays on the edit issue screen:

PCF - Multple Autocomplete custom field on the edit issue screen

The selection of options displays after you start typing.

Autocomplete suggestions will appear after typing at least 2 characters, which is the default setting. You can adjust this minimum character requirement from the Autocomplete tab of the custom field configuration.

When you update the issue, the new values appear on the view issue screen:

PCF - Multiple Autocomplete custom field on the view issue screen

Examples

Example

Sample script

Sample display output

Example

Sample script

Sample display output

Using PCF - Multiple Autocomplete with SIL data source

This script retrieves usernames from specific groups (in this example, "jira-users") and filters them based on the search query. Only matching usernames are added as options to the custom field.

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; 

 

"jsmith (John Smith)"
"mjones (Mary Jones)"
"rwhite (Robert White)"

Using PCF - Multiple Autocomplete with SQL data source

This query retrieves all user names from the database. 

Before using SQL data source, ensure you've configured the JNDI settings as detailed in the SQL data source documentation.

select user_name from cwd_user;

 

"jsmith (John Smith)"
"mjones (Mary Jones)"
"rwhite (Robert White)"

Need support? Create a request with our support team.

Copyright © 2005 - 2025 Appfire | All rights reserved.