Versions Compared

Key

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

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 AdminAdministrator.

  2. Go to Administration > Custom Fields > Add Custom Field, and select SIL™ SIL User Picker custom field from the list.

  3. Follow the on-screen instructions.Image Removed

    image-20240213-151826.pngImage Added
  4. Go to the Configure link,  and and then click the Edit SIL™ ScriptField data settings link to define a SIL™ script.

    Image Removed

    Write a SIL™ script.
    Click Save, and the script will get edit the field. You will see the following screen:

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

  6. 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.

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

    image-20240213-152404.pngImage Added
  8. 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-servicedesk-developers users and or Jirajira-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.

...

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.

...

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 desired custom field you want to modify.

    3. Choose the proper correct Search Template for your custom field.

    4. Perform a re-index — After After you are finished modifying all the Search Templates are changed for all the custom field that you wantfields, perform a re-index in Jira for the search to work fine.

    5. After a searcher has been set for the SIL™ SIL User Picker custom field, you can perform a search for all issues containing the desired value you want for that custom field.

      Image Removedimage-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.