Table of Contents | ||
---|---|---|
|
How to configure
...
the SIL User Picker custom field
...
To configure the SIL User Picker custom field, follow these steps:
Log into your Jira instance as AdminAdministrator.
Go to Administration > Custom Fields > Add Custom Field, and select SIL User Picker custom field from the list.
Follow the on-screen instructions.
Go to the Configure link, and and then click the Edit Field data settings link to edit the field. You will see the following screen:
Go to the Script tab and write type or copy and paste a SIL script that return returns users. For example “return , “return getAllUsers();” (without quotes).
Click Save, and the script will get . The script is associated with the current custom field. The values returned by the script are the values available for the custom field.
If you want to To filter the returned users by Roles or Groups, go to the Filtering Strategy tab and set your filters.
You can In the General tab, set a default value for the field, in the General tab.
In our example, the SIL User Picker custom field is configured to filter only users that are members of the jira-servicedesk-users and or jira-administrators groups.
How to use
...
the SIL User Picker custom field
Go to an issue and edit it. This is how an example of what the field will look likedisplay as:
Select a user from the list of available users available for the selection , by filling entering at least 2 two characters.
Select the necessary user and save it on the user to the current issue. The field value appears on the right side of the view issue screen, in the People section:
...
...
Edit the field on
...
the View issue screen by clicking on the inline edit icon next to the field to see suggested users filtered accordingly to the SIL script
...
.
Other examples
Here are This section contains more SIL scripts examples that you can use to configure your 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 User Picker and Group Searcher. This filters the available users for the custom field in issue navigator accordingly to the configured SIL script.
...
Note |
---|
When using the SIL User Picker & Group Searcher, user suggestions in issue navigator will be retrieved based on the SIL script from the field's global configuration. |
...
Go to Administration > Custom fields.
Click Edit for the desired custom field you want to modify.
Choose the proper correct Search Template for your custom field.
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.
After a searcher has been set for the SIL User Picker custom field, you can perform a search for all issues containing the desired value you want for that custom field.
For a more details about searching tickets in Jira, you can check see the Searching for Issues tutorial from the Jira documentation.