Info |
---|
Are you using JMWE for Jira Cloud and want to learn how to use this condition? Head to our documentation here. |
When you add this condition to a transition, the add-on checks the related issues, against the number of issues entered in the Min. Related Issues
field. You can further customize the condition using the following options:
What to validate
Require certain related issues: The transition is hidden if related issues respecting the constraints below do not exist. For example, Show the transition “Subtasks Approved” only if there is at least one subtask.
Check related issues: The transition is hidden if the specified related issues do not respect the provided constraints. For example, Show the transition only if there are blocked issues of the “Bug” issue type.
Forbid certain related issues: If any related issue as selected below exists, the condition will fail. If a condition on related issues is defined below, only related issues that pass the condition will be forbidden. This option is especially useful in negative conditions. For example, Hide the transition only if there are subtasks to the issue.
Target Issues
Select the issues to check the constraints 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.Sub-tasks of the current issue: Select this option to operate on the sub-tasks of the current issue
Parent issue of the current sub-task: Select this option to operate on the parent 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 of the current issue: Select this option to operate on the Epic of the current issue
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 the current issue in the Portfolio hierarchy: Select this option to operate on the parent issue of the current issue in the Portfolio hierarchy
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 fieldCode Block <% if (issue.get("Single line text")) { %> project = TEST and issuetype = ${issue.get("Single line text")} <% } else { %> issuekey=INVALID-1 <% } %>
Note |
---|
|
Issue constraints
Min. Related Issues
Select the minimum number of related issues to enforce. By default, it is 1.
Max. Related Issues
Select the maximum number of related issues beyond which the condition will fail. Leave it blank for no limit.
Condition on related issues
Input a Groovy condition in this field to check on each related issue. Leave blank if you don't need any additional constraint on the target issues. See the Groovy help editor for more information on writing the Groovy condition.
All related issues must verify the condition above
By default, this option is checked and the Groovy condition written above is checked on each related issue of the current issue. If you uncheck this option, at least one related issue, instead of all, must verify the condition.