PCF - Single Select
Contents
Single Select custom field enables you to select an option in the select list field based on a SIL script.
This custom field can be used for the following types of options:
String (default)
Component Picker
Group Picker
Issue Picker
Project Picker
User Picker
Version Picker
Using PCF - Single Select custom field
If you go to an issue and edit this field, you will see an image like the following example:
single select
Save the changes and the selected value will appear on the issue screen:
single select example
Examples
Using Single Select custom field with SIL Data Source
Getting Project Versions
The example gets project versions like in the image above.
string projectKey = "TEST";
string[] versionNames = admGetProjectVersions(projectKey);
number[] versionId;
for(string versionName in versionNames){
JVersion version = admGetProjectVersion(projectKey, versionName);
versionId += version.id;
}
return versionId;Using Single Select custom field with SQL Data Source
To use SQL Data Source, set the JNDI first. You can see details on the Data Source Configuration page.
SQL Initial Script
This example returns the versions names.
select vname, id from projectversion;