How to configure
Go to the Administration page, choose Custom Fields link and add a SIL script custom field.
...
After you create the field, go to the corresponding Configure link. A page like in the image below will appear:
...
Click on the Edit SIL Script link to see the SIL editor.
Click on the Save button and the script is associated to the current custom field.
...
Code Block |
---|
string[] assignees; assignees = addElementIfNotExist(assignees, userFullName(assignee)); string[] assigneeHistory = fieldHistory(key, "assignee"); for(number i = 1; i < size(assigneeHistory); i = i + 2) { string assigneeName = userFullName(getElement(assigneeHistory, i)); assignees = addElementIfNotExist(assignees, assigneeName); } return assignees; |
Search Issues
If you want a Sil Script Custom Field to be searchable you must select a Search Template for that custom field.
If the custom field already exists, in Administration->Custom fields, click Edit for the desired custom field, and choose the proper Search Template for your custom field according the value type returned by it.
If you are about to add a new Sil script custom field, you can choose the Search Template at the step 'Create Custom Field - Details (Step 2 of 2)'.
Note |
---|
Perform a re-index |
After a searcher has been set for the Sil Script custom field, you can perform a search for all issues containing the desired value for that custom field.
For a detailed explanation on searching issues in Jira, you can check the Searching for Issues tutorial from the Jira documentation.