/
Option types

Option types

 

When you create a new Power custom field, you either select a data option type from a list of pre-configured templates or it is pre-selected. The available option types and modification capabilities depend on your custom field type.

When modifying the option type of your Power custom field:

  • For multiple-option custom fields (such as PCF - Checkbox, PCF - Radio Buttons), you can select any option type and change the option type to string (default). These fields follow a standard configuration process.

  • For string-based custom fields (such as PCF - SIL User Picker), the option type cannot be modified to use other option types. These fields require a different setup.

For details, see the Supported option types by custom field reference below.

Changing the initial option type will affect which values are valid for the custom field. For additional information, see Change the option type.


Supported option types by custom field type

Power custom field types can be used with different data option types.

Field type

Supported data options

Can be modified to…

Field type

Supported data options

Can be modified to…

Multiple-option types:

  • PCF - Checkbox

  • PCF - Multi Select

  • PCF - Multiple Autocomplete

  • PCF - Radio Buttons

  • PCF - Single Autocomplete

  • PCF - Single Select

You can select any of these option types available as templates during field configuration:

  • Component Picker

  • Group Picker

  • Issue Picker

  • Project Picker

  • User Picker

  • Version Picker

  • String (default)

  • If changed to string, can be modified back to any of the six supported data options for this field.

String type only:

  • PCF - Interval Field

  • PCF - Regular Expression Custom Field

  • PCF - SIL Script Custom Field

  • String (default)

N/A

  • PCF - SIL User Picker

The options for this field are determined by the SIL script you used to configure it; they appear as users in the right-side of the View Issue page.

N/A


Data retrieval Reference for pre-configured option types (SIL and SQL)

The reference table below explains how to retrieve data for custom fields using either SIL or SQL scripts with any of the pre-configured templates.

pcf-templates-single.png
Select template dialog for configuring multiple-option type custom fields.

Option type

Description

Examples

Option type

Description

Examples

Component Picker

Provides a selection of components from your Jira instance.

  • Use this SIL script to retrieve all components from a specified project and add them as options to the custom field. This example script retrieves all components from the "TEST" project and returns their IDs. The components will be added as options to the custom field which uses this SIL script as data source. The script first gets component names using admGetProjectComponents, then iterates through each component to collect its ID using admGetProjectComponent.

string projectKey = "TEST"; string[] componentNames = admGetProjectComponents(projectKey); number[] componentId; for(string componentName in componentNames){ JComponent componentNames = admGetProjectComponent(projectKey, componentName); componentId += componentNames.id; } return componentId;

After creating the Power custom field, you must set your project key in the SIL script data source (replace "TEST" with your project key). This ensures the picker will display issues specific to your project rather than the example project.

  • Alternatively, you use this SQL query to retrieve all components and their IDs from the component table.

select cname, id from component;
  • To see how the Component Picker is used, see the PCF - Checkbox page.

Group Picker

Provides a selection of groups from your Jira instance.

  • Use this SIL script to retrieve all groups that the current user belongs to. These groups will be added as options to the custom field which uses this script as data source

return userGroups(currentUsername());

It returns all groups that the current user belongs to. The groups will be added as options to the custom field which uses this SIL script as data source. 

  • Alternatively, use this SQL script to retrieve all available groups from the system

select group_name from cwd_group;

Issue Picker

Provides a selection of issues from your Jira project.

  • Use this SIL script to retrieve all previously created issues. These issues will be added as options to the custom field which uses this script as data source.

return selectIssues("created < now()");
  • Alternatively, use this SQL script to retrieve all issue keys from the system.

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

Project Picker

Provides a selection of projects from your Jira instance.

  • Use this SIL script to retrieve all previously created projects. These projects will be added as options to the custom field which uses this script as data source

string [] projects = allProjects(); return projects;
  • Alternatively, use this SQL script to retrieve all projects from the system.

select pkey from project;

User Picker

Provides a selection of users from your Jira instance.

  • Use this SIL script to retrieve users based on group membership and search criteria. The script works by first getting all users from the specified groups (in this example, "jira-users"), then filters them based on a search query. The matching usernames will be added as options to the custom field which uses this script as data source.

function getUsers(string [] groups){ string [] users; for(string group in groups){ string [] currentGrp; currentGrp = addElement(currentGrp, group); for(string user in usersInGroups(currentGrp)){ users = addElementIfNotExist(users, user); } } return users; } string [] groups = {"jira-users"}; string [] users = getUsers(groups); string [] res; for (string user in users) { if (contains(user, argv["query"])) { res = addElementIfNotExist(res, usernameToUserKey(user)); } } return res;

Before using this script, you must replace "jira-users" with your group name in the SIL script data source. This ensures the picker will display groups specific to your Jira instance.

  • Alternatively, use this SQL script to retrieve all users from the system.

select user_name from cwd_user;

Version Picker

Provides a selection of versions from your Jira project.

  • Use this SIL script to retrieve all versions from the "TEST" project. In this example, the script gets all version names using admGetProjectVersions, then iterates through each version to collect its ID using admGetProjectVersion. These versions will be added as options to the custom field which uses this script as data source.

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

After creating the Power custom field, you must set your project key in the SIL script data source (replace "TEST" with your project key). This ensures the picker will display versions specific to your project rather than the example project.

  • Alternatively, use this SQL script to retrieve all versions from the system.

select vname, id from projectversion;



 

Related content

Need support? Create a request with our support team.

Copyright © 2005 - 2025 Appfire | All rights reserved.