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

Compare with Current View Page History

« Previous Version 5 Next »

On this page

Use case

This is case is useful for copying every new comment added to the parent issue to its sub-tasks.

Configuration

Create a new rule and name it appropriately.

Providing a description will help you to identify what the rule does but this step is optional.

 Issue event

Add a Trigger

Select Issue event and Issue commented

Boolean condition


Add a condition

Select Boolean condition

Expression

Add the following expression to the boolean condition.

%{issue.project.key} = "CASE" and %{issue.issueType} ="Task"

This boolean condition will restrict the range of the automation rule to the desired issues. In this use case we restrict it to the issues in a project with a certain issue type.

Issue selector

Add a selector

Select Issue selector

Target issue(s)

Select Sub-tasks

  Add comment action

Add an action

Select the action Add comment

Comment text

Write the following expression.

%{trigger.issue.lastComment}

Import the example

Import the JSON file below to get started in no time.

JSON


After importing the JSON file, make sure to check the configuration of the rule. Non-existing configuration elements (issue types, fields, values etc.) will be highlighted.

{
"name": "Copy the parent issue comments to its sub-tasks",
"description": "Copy every new comment added to the parent issue to its sub-tasks.",
"creator": "admin",
"status": false,
"triggerData": "6",
"triggerType": "ISSUE_EVENT",
"configuration": {
"refs": [
"issue",
"system",
"trigger.issue",
"trigger.parent"
],
"triggerType": "6"
},
"children": [
{
"sequence": 0,
"type": "BOOLEAN_CONDITION",
"ruleEntityType": "CONDITION",
"configuration": {
"refs": [
"issue",
"project",
"system",
"trigger",
"trigger.issue",
"trigger.parent"
],
"expression": "%{issue.project.key} = \"CASE\" and %{issue.issueType} =\"Task\"",
"expressionParsingMode": "logical",
"actingUser": "field_00020"
},
"children": [
{
"sequence": 0,
"type": "ISSUE_SELECTOR",
"ruleEntityType": "SELECTOR",
"configuration": {
"refs": [
"issue",
"project",
"system",
"trigger",
"trigger.issue",
"trigger.parent"
],
"option": "subtasks",
"issueListExpressionParsingMode": "issues",
"actingUser": "field_00020"
},
"children": [
{
"sequence": 0,
"type": "ADD_COMMENT",
"ruleEntityType": "ACTION",
"configuration": {
"refs": [
"issue",
"issues",
"project",
"selector.issue",
"selector.parent",
"system",
"trigger",
"trigger.issue",
"trigger.parent"
],
"comment": "%{trigger.issue.lastComment}",
"commentParsingMode": "textBasic",
"actingUser": "field_00020",
"commentVisibility": "everybody",
"sendMail": "true"
},
"children": null,
"hasChildren": false
}
],
"hasChildren": true
}
],
"hasChildren": true
}
],
"hasChildren": true
}

If you still have questions, feel free to refer to our support team.