Versions Compared

Key

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

Before using SIL™ User Picker custom field check out the Simple Issue Language™ documentation for a better grasp of SIL™ usage and capabilities.

How to configure

Adding a new SIL™ User Picker custom field is as easy as adding any other custom field.

...

Button handy
blanktrue
color#0052CC
nameSend Feedback
linkhttps://docs.google.com/forms/d/e/1FAIpQLScmToBe3vynAlb5fdKwCGxYqnTbDc66sIBgeecG2BuFDuHc7g/viewform?entry.2002826954=PCF+-+SIL+User+Picker+-+201228289
widthauto

Table of Contents

Table of Contents
minLevel1
maxLevel6
outlinefalse
styledefault
excludeSee also
typelist
printablefalse

How to configure the SIL User Picker custom field

To configure the SIL User Picker custom field, follow these steps:

  1. Log into your Jira instance as

...

  1. Administrator.

  2. Go to Administration > Custom Fields > Add Custom Field

...

  1. and select 

...

  1. SIL User Picker custom field from the list.

  2. Follow the on-screen instructions.

...

  1. image-20240213-151826.pngImage Added
  2. Go to the Configure link,

...

  1. and then click the Edit

...

  1. Field data settings link to

...

  1. edit the field. You will see the following screen:

    image-20240213-152048.pngImage Added
  2. Go to the Script tab and type or copy and paste a SIL script that returns users. For example, “return getAllUsers()” (without quotes).

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

  4. To filter the returned users by Roles or Groups, go to the Filtering Strategy tab and set your filters.

...

  1. image-20240213-152404.pngImage Added

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

In our example, the SIL User Picker custom field is configured to filter only users that are members of the jira-developers or Jiraservicedesk-users and or jira-administrators group groups.

To set the number of characters that user autocomplete feature is triggered for the field use the global autocomplete threshold parameter from the User Group Picker PRO configuration page. The default value for the autocomplete threshold is set to 2.

Image Removed

For example, if you select "3" for the autocomplete threshold on the configuration page as shown in the example above, the list of suggested users matching the criteria in the user group picker will be shown after the third character in the input is entered.

Image Removed

Note
Note that this is a global configuration parameter, that will be applied for all user picker custom fields.

How to use it

...

How to use the SIL User Picker custom field

  1. Go to an issue and edit it. This is an example of what the field will display as:

    image-20240213-152801.pngImage Added

  2. Select a user from the list of available users for the selection by entering at least two characters.

  3. Select the user and save the user to the current issue. The field value appears on the right side of the view issue screen, in the People section:

...

    ...

    1. Edit the field on

    ...

    1. the View issue screen by clicking on the inline edit icon next to the field to see suggested users filtered accordingly to the

    ...

    1. SIL script.

    Other examples

    Here are more SIL™ This section contains more SIL scripts examples that you can use to configure your SIL™ SIL user picker fields. Basically, by means of SIL™ With SIL, you can restrict the users selection to align with any criteria you wantneed.

    Issue Assignees

    Code Block
    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;

    Users in specific role

    Code Block
    return usersInRole(project, "Developers");

    Users in specific group

    Code Block
    return usersInGroups("jira-developers");

    ...

    When you create a new SIL User Picker custom field, the default searcher set is SIL™ SIL User Picker and Group Searcher. This filters the available users for the custom field in issue navigator accordingly to the configured SIL™ SIL script.

    However, when using SIL™ SIL issue specific variables in the script (for instance project, key, assignee, reporter), you have to use Jira's standard searcher User Picker and Group Searcher for that field, or otherwise you will not be able to select any value for filtering.

    Note

    When using the SIL™ SIL User Picker & Group Searcher, user suggestions in issue navigator will be retrieved based on the SIL™ SIL script from the field's global configuration.

    ...

    1. Go to Administration > Custom fields.

    2. Click Edit for the

    ...

    1. custom field you want to modify.

    2. Choose the

    ...

    1. correct Search Template for your custom field.

    ...

    1. After you are finished modifying all the Search Templates

    ...

    1. for

    ...

    1. the custom

    ...

    1. fields, perform a re-index in Jira

    ...

    1. .

    2. After a searcher has been set for the

    ...

    1. SIL User Picker custom field, you can perform a search for all issues containing the

    ...

    1. value you want for that custom field.

    ...

    1. image-20240213-155213.pngImage Added

    For a more details about searching tickets in Jira, you can check see the Searching for Issues tutorial from the Jira documentation.