Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Overview

The Jira build-in automation can help you to simplify routine tasks. This article describes the rule setup to modify issues located within R4J tree structure.

Use Case:

  • An issues description was changed

  • All issues located directly below of the issue should be modified: change status to draft

  • Option: All issues of any level below fo the issue should be modified

\uD83D\uDCD8 Instructions

To configure rules for automation, you need to be a Global or Project administrator.

  • For a global rule, go to Jira Settings > System > Global Automation.

  • For a project-specific rule, go to Project Settings > Automation.

Follow the steps below to set up a rule.

Step

Action

Explanation

Create a new rule

Select the Create rule button.

Create a trigger for the rule

Select the trigger Field value changed in section Issue Triggers.

The rule is triggered when one or more fields of an issue are changed.

Define fields for the trigger

Select the fields to be monitored for changes when an issue is edited:

In this example, whenever the field Description is edited the rule is triggered.

Add project restriction (optional, useful for a global rule)

Create new condition: Issue fields condition:

If a rule is project-specific the restriction to that project is assumed and this condition is not needed. If a rule is global, it can still be limited to certain projects by adding this condition.

Add further restriction

Create additional condition: Issue type equals

Restrict the rule execution to specific issue types (e.g. folders) or any other restrictions (e.g. via JQL).

Store issue path where issue is located in variable

Select new action Create variable in section Advanced:

The variable Node is used to store the R4J path details of issue key as "smart value" for use later in the rule.

Syntax of the smart value:

{{issue.properties."com.easesolutions.requirements:treeIssuePath".parents.concat("/").concat(issue.key).join("\",\"")}}

Note: As an issue can be located in multiple R4J trees, the Node stores all locations comma separated.

Process issues under node

Select new branch Branch rule / related issues, select JQL:

This branch runs through all issues that are under the changed issue matching the criteria above. You need to specify the JQL (Jira Query Language) to process all direct or further issues:

  • Process only issued directly below of the node, use the JQL with r4jParent:

    r4jParent in ("{{Node}}")
  • Process also issues on lower level the once directly under the node, use the JQL with r4jPath:

    r4jPath in ("{{Node}}")
  • Note: Use the “in …(“ … ”) with quotes to process multiple tree locations correctly.

Modify issue under node

Select new action on branch: Transition issue:

Now you can specify the changes to the issues under node , for example transit their workflow status to “TO DO” state. Other (field) changes can be applied as well.

Add notification (optional)

Select new action on branch: Send email in section Notifications.

Specify the the user roles, single users or groups to be notified, as well as the subject and content of the email. Here are suggested values:

  • To: Reporter, Assignee

  • Subject: Issue {{issue.key}} is changed!

  • Content: Hello Jira user, please check issue {{issue.key}} for completeness as the issue above in the R4J tree was modified. Best Regards, your Jira System

Enable the rule

Provide a name for the rule and then enable it by selecting Turn on rule.

 Related articles

  • No labels