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.
For information about supported option types, see Supported option types by custom field type.
For step-by-step setup guidelines, see Add and configure a new Power custom field.
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:
When you update the issue, the new value appears on the view issue screen:
Examples
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)" |
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)" |