Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Contents

Table of Contents
excludeSee also

The Single Select custom field enables you to select an option in the select list field that is 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 the PCF - Single Select custom field

If you go to an issue and edit this field for an issue, you will see an image like similar to the following example (when the Option type is Component Picker): 

image-20240212-150852.png

Save the changes and the selected value will appear on the issue screen

image-20240212-150917.png

Examples

Using Single Select custom field with SIL Data Source

Getting Project Versions

The example gets project versions like in the image above.

Code Block
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 SQL Data Source page.

SQL Initial Script

This The following example returns the versions names.:

Code Block
select vname, id from projectversion;

See More

Child pages (Children Display)
pagePower Custom Fields User Guide