Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Reverted from v. 13
NoteDocumentation for
Status
colourYellow
title5.0.0 - 6.1.3
is available here (open in a new tab)


Excerpt

A workflow condition that allows you to hide/show a particular transition from the list of available transitions based on

issues related to

the

current issue. It can be used to test the existence of certain related issues (such as linked issues, Stories of an Epic, Epic of a Story, subtasks of an issue, issues returned by a Groovy script or a JQL search, etc.).

issue's linked issues.


The transition to which the condition is added will be available only if the

related

issue's linked issues respect certain conditions

. Note
  • This post-function does not work with remote links (links to Jira issues residing on another Jira instance/server).
  • JMWE now considers "symmetrical" link types (such as "relates to") as one link direction instead of two on the configuration screens and in the condition's execution

    .

     

    To add '

    Related Issues

    Linked Issue(s) Condition' to a transition:

    1. Click Edit
    for
    1.  for the workflow that has the transition you wish to configure the condition on.
    2. In the Workflow Designer, select the transition.
    3. Click on 
    Conditions 
    1. Conditions in the properties panel.
    2. Click on Add condition.
    3. Select 
    Related Issues Condition 
    1. Linked Issue(s) Condition from the list of conditions.
    2. Click on Add to add the condition to the transition.
      Image Added
    3. Select the
    related issues from Which issue(s) drop-down
    1. link from the Issue Link drop-down, or leave it as Any for any link type other than Issue/Subtask, Epic/Story and Jira Portfolio hierarchy.
    2. Select the minimum number of
    related
    1. linked issues required from the Min.
    Related
    1. Linked Issues field. 
    2. Click on Add to add the condition to the transition.


    Panel

    Related links :

    Refer to the Use cases for conditions page for use cases for this

    condition
  • How to write JQL expressions in the editor

  • How to write Groovy scripts in the editor

  • Image Removed

    validator.


    When you add this condition to a transition,  the the add-on checks the related issues, checks the number of issues of specified type, linked to the current issue against the number of issues entered in the the Min. Related Linked Issues field field. You

    You can further customize the condition using the following options:

    What to validate

    Require

    certain related issues: The transition is hidden if related issues

    issue links with a specific link type or set of constraints: Hides the transition if issue links of specified link type and respecting the constraints

    below

    configured do not exist.

    Check

    related issues: The transition is hidden if the specified related issues

    existing issue links: Hides the transition if existing linked issues of the specified link type do not respect the

    provided constraints

    constraints configured.

    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 TEST

  • project = ${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

    Code Block
    <% if (issue.get("Single line text")) { %>
        project = TEST and issuetype = ${issue.get("Single line text")}
    <% } else { %>
        issuekey=INVALID-1
    <% } %>
    Note
    • Note that the <% if %> block is necessary to avoid an invalid JQL query when the Single-line text field is empty. In that case, the template will return a valid JQL query that returns no issue (issuekey=INVALID-1). This is in general applicable to JQL operating on select type fields with pre-determined values like Affects Version/s, Checkboxes etc.

    • The maximum number of issues returned by a valid JQL is limited to 1000.

    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.

    Max. Linked Issues

    Select the maximum number of linked issues to be accepted. Leave it blank for no limit.

    Condition on

    related

    linked issues

    Input

    a Groovy condition in

    this field

    this field to check on each

    related

    linked issue.

     Leave

     Leave blank if you don't need any additional constraint on the

    target

    linked issues. See the Groovy help editor for more information on writing the Groovy condition.

    All

    related

    linked issues must verify the condition above

    By default, this option is checked and the Groovy condition written above is checked on each

    related

    linked issue of the current issue.

     If

     If you uncheck this option, at least one

    related

    linked issue, instead of all, must verify the condition.