Option types
Power Custom Fields offers the following option types:
You can use any option type with any custom field type. For more information on custom fields, see the User Guide.
Option type | Description | Example |
---|---|---|
Component Picker | This option is rendered as a project component. | This is the SIL script to get project components. The example below shows how to get all components that exist in the "TEST" project. The components will be added as options to the custom field which uses this SIL script as data source. string projectKey = "TEST";
string[] componentNames = admGetProjectComponents(projectKey);
number[] componentId;
for(string componentName in componentNames){
JComponent componentNames = admGetProjectComponent(projectKey, componentName);
componentId += componentNames.id;
}
return componentId; This is the SQL script that returns all components: select cname, id from component; To see how this works, see the PCF - Checkbox page. |
Group Picker | An option is rendered as a group. | This is the SIL script that returns groups: 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. This is the SQL script that returns all groups: To see how this works, see the PCF - Multi Select page. |
Issue Picker | An option is rendered as an issue. | This is the SIL script that returns issues: It returns all issues previously created. The issues will be added as options to the custom field which uses this SIL script as data source. This is the SQL script that returns all issue keys: To see how this works, see the PCF - Single Autocomplete page. |
Project Picker | An option is rendered as a project. | This is the SIL script that returns projects: It returns all previously created projects. The projects will be added as options to the custom field which uses this SIL script as data source. This is the SQL script that returns all projects: To see how this works, see the PCF - Radio Buttons page. |
User Picker | An option is rendered as a user. | This is the SIL script that returns users: It returns all users existing in some groups (in this case, "jira-users") and adds the usernames that match the search as options to the custom fields using this data source. This is the SQL script to return all users: To see it in action, see the PCF - Multiple Autocomplete page. |
Version Picker | An option is rendered as a version. | This is the SIL script that returns versions: It returns all versions that exist in the "TEST" project. The versions will be added as options to the custom field which uses this SIL script as data source. This is the SQL script to return all versions. To see how this works, see the PCF - Single Select page. |