PCF - SIL User Picker

PCF - SIL User Picker

Configure the PCF - SIL User Picker custom field

The PCF - SIL User Picker custom field lets you select users from a dropdown list. The available users are filtered based on your SIL script.

Prerequisites:

  • Ensure you understand Simple Issue Language (SIL) basics and capabilities.

  • You have Jira Administrator role and permissions.

  • You have already created a Power custom field of the PCF - SIL Script Custom Field type.

  1. Locate your PCF - SIL Script Custom Field on the Custom fields page and click Configure contexts. The configuration section will look like the one illustrated below:

    Configuration links for PCF - SIL Script Custom Field.
  2. Click Edit Field data settings. This opens the configuration tabs for the custom field.

    General tab on PCF - SIL Script Custom Field configuration page.
  3. In the Scripts tab, enter a SIL script that returns users. For example, return getAllUsers().

 

  1. Click Save. The script you provided is associated with the current custom field. The values returned by the script are the values available for the custom field.

  2. (Optional) In the Filtering Strategy tab, enable filtering and configure filters based on your requirements. You can create filters based on users' group or role.

Filtering Strategy tab on PCF - SIL Script Custom Field configuration page.

In this example, the PCF - SIL User Picker custom field is configured to filter only users that are members of the jira-software-users group and have Administrator role.

  1. In the General tab, set a default value for the field.

  2. Click Save.


How the field displays

  1. After configuring the field, go to an issue and open it for editing. This is an example of how the PCF - SIL User Picker field displays on the edit issue screen:

PCF - SIL Script Custom Field on edit issue page
  1. Type at least two characters in the field to display matching users.

  2. Select a user from the dropdown list.

  3. Update the issue.

  4. View your selection in the People section of the View Issue screen

image-20240213-153015.png
  1. To edit the field on the View issue screen, click the inline edit icon next to the field. A dropdown list will show filtered users based on your SIL script.

Examples

Example

Sample script

Sample display output

Example

Sample script

Sample display output

Display all issue assignees Age

This script retrieves all users who have been assigned to an issue, including both current and previous assignees.

string[] assignees; assignees = addElementIfNotExist(assignees, assignee); string[] assigneeHistory = fieldHistory(key, "assignee"); for(number i = 1; i < size(assigneeHistory); i = i + 2) { string assigneeName = getElement(assigneeHistory, i); assignees = addElementIfNotExist(assignees, assigneeName); } return assignees;

 

"gsmith, mjohnson, awhite"

Display users in a specific project role

This script returns all users who have the "Developers" role in the current project. 

return usersInRole(project, "Developers");

 

"jsmith, bjones, mwilson"

Display users in group

This script returns all users belonging to a specified group.

return usersInGroups("jira-developers");

 

"tdoe, rjohnson"


Configure search settings for your PCF - SIL User Picker custom field

When created, the PCF - SIL User Picker custom field comes with two default searchers: SIL User Picker and Group Searcher. Together, they filter users according to your configured SIL script.

  • When using the SIL User Picker and Group Searcher in the search interface (issue navigator), the available user options are determined by the SIL script defined in your field's global configuration.

  • If your SIL script uses issue-specific variables (such as project, key, assignee, or reporter), you must use the standard User Picker and Group Searcher instead. Otherwise, you won't be able to select values for filtering.

  1. Locate your PCF - SIL Script Custom Field on the Custom fields page and click Edit details.

  2. Select a Search Template compatible with your field's return value type.

    Search Template selection on Edit Custom Field Details page for PCF - SIL Script Custom Field.
  3. Click Update.

After the update, reindex your Jira instance to ensure search functionality works correctly.

  1. Test the search functionality by performing a search for all issues containing the value you want for that custom field.

    image-20240213-155213.png

To learn more about the search functionality, see the Jira Searching for Issues tutorial.

 

Need support? Create a request with our support team.

Copyright © 2005 - 2025 Appfire | All rights reserved.