/
PCF - Single Select

PCF - Single Select

The PCF - Single Select custom field provides a dropdown list of options that are dynamically generated by a SIL script.

This custom field uses standard configuration settings.

How the field displays

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

PCF - Single Select custom field on edit issue screen

When you update the issue, the new value appears on the view issue screen: 

image-20240212-150917.png

Contents:

See also:


Examples

Example

Sample script

Sample display output

Example

Sample script

Sample display output

Using PCF - Single Select with SIL data source

This script retrieves all versions from the "TEST" project and adds them as options to the custom field.

string projectKey = "TEST"; string[] versionNames = admGetProjectVersions(projectKey); number[] versionId; for(string versionName in versionNames){ JVersion version = admGetProjectVersion(projectKey, versionName); versionId += version.id; } return versionId;

 

"Version 1.0 (10001)"
"Version 2.0 (10002)"
"Version 3.0 (10003)"

Using PCF - Single Select with SQL data source

This query retrieves all version names and IDs from the database. 

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

select vname, id from projectversion;

 

"Version 1.0 (10001)"
"Version 2.0 (10002)"
"Version 3.0 (10003)"

Related content