Manage auto indexing rules
Add an auto indexing rule
To add an auto-indexing rule:
Go to JMCF administration pages
Click on Automatic Indexing
Click on “Add auto indexing rule”
Select the Project, leave it blank for all projects
Select the Issue type, leave it blank for all issue types
Select the link to the related issues under “Which issues” (see below)
Click on “Save”
The rule will be created
Edit an auto-indexing rule
To add an auto-indexing rule:
Go to JMCF administration pages
Click on Automatic Indexing
Click on “Edit” for an auto-indexing rule
Modify the rule
Click on “Save”
The rule will be updated
Delete an auto-indexing rule
To add an auto-indexing rule:
Go to JMCF administration pages
Click on Automatic Indexing
Click on “Delete” for an auto-indexing rule
Click on “OK”
The rule will be deleted
Which issue(s)
Select the issues to operate on. They can be:
Linked issues: Select issue(s) linked to the current issue through any link type or a specific link type such as
blocks
,is cloned by
, etc.Parent issue of the current sub-task: Select this option to operate on the parent of the current issueSub-tasks of the current issue: Select this option to operate on the sub-tasks of the current issue
Parent issue Epic of the current sub-taskissue: Select this option to operate on the parent Epic of the current issue
Issues that belong to the current Epic: Select this option to operate on the issues that belong to the current Epic
Epic Parent issue of the current issue in the Portfolio hierarchy: Select this option to operate on the Epic parent issue of the current issue in the Portfolio hierarchy
Child issues of the current issue in the Portfolio hierarchy: Select this option to operate on the child issues of the current issue in the Portfolio hierarchy
Parent issue of Issues linked to the current issue in the Portfolio hierarchythrough any link type: Select this option to operate on all issues linked to the parent issue of current issue
Issues linked to the current issue in the Portfolio hierarchythrough the following link type: Select this option and select the link type to operate only on issues linked through a specific link type
Issues returned by a Groovy script: Input a Groovy script that returns either a single Issue object, or a Collection of Issue objects, or a String representing the key of an issue, or a Collection of Strings each representing an issue key. For example:
"TEST-1"
["TEST-1","TEST-2"]
ComponentAccessor.issueManager.getIssueObject("TEST-1")
[ComponentAccessor.issueManager.getIssueObject("TEST-1"),ComponentAccessor.issueManager.getIssueObject("TEST-2")]
issue.parentObject
issue.getLinkedIssues()
Issues returned by a JQL search: Input a JQL search expression, including an optional Groovy Template markup. For example:
project = TEST
returns issues of the project with the key TESTproject = ${issue.get("project").key} and assignee = ${currentUser.name}
returns issues of the project the current issue belongs to and assigned to the current user.To operate on issues of a project with key
TEST
and issue type name same as the value in a text field <% if (issue.get("Single line text")) { %> project = TEST and issuetype = ${issue.get("Single line text")} <% } else { %> issuekey=INVALID-1 <% } %>Code Block
Use case
Consider a case where you have a Calculated Multi-user field that displays the assignee of the subtasks of the Story. The calculated custom field script will be:
Code Block |
---|
issue.subtasks*.assignee - null |
If you change the “Assignee” of one of the subtasks and do not reindex the Story or edit the Story, then when you use the Issue navigator search with the Calculated Multi-user field the search will not display the right results since the Story has not been reindexed. To work around this add an auto-indexing rule to reindex the Story when the subtasks are modified.
Go to JMCF administration pages
Click on Automatic Indexing
Click on “Add auto-indexing rule”
Select the Issue Link as “Parent of the current issue”
Click on “Save”