/
PCF - Single Autocomplete

PCF - Single Autocomplete

The PCF - Single Autocomplete custom field provides a searchable dropdown list that dynamically updates with options from your data source.

This custom field uses standard configuration settings.

How the field displays

This is an example of how the PCF - Single Autocomplete custom field (with option type Component Picker) displays on the edit issue screen: 

PCF - Single Autocomplete custom field on 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 value appears on the view issue screen: 

PCF - Single Autocomplete custom field on view issue screen

Contents:

See also:


Examples

Example

Sample script

Sample display output

Example

Sample script

Sample display output

Using PCF - Single Autocomplete with SIL data source

This script retrieves all existing issues and filters them based on the search query, returning only issues whose summaries match the search text.

string [] issues = selectIssues("created < now()"); string [] res; for (string iss in issues) { if (contains(iss.summary, argv["query"])) { res = addElementIfNotExist(res, iss); } } return res;

 

"DEMO-123 (Implement login feature)"
"TEST-456 (Update user interface)"
"PROD-789 (Fix database connection)"

Using PCF - Single Autocomplete with SQL data source

This query retrieves all issue keys by combining project keys and issue numbers. 

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

select p.project_key ||'-'||i.issuenum as "KEY" from jiraissue i inner join project_key p on p.project_id = i.project

 

"DEMO-123 (Implement login feature)"
"TEST-456 (Update user interface)"
"PROD-789 (Fix database connection)"

Related content