Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Panel

On this page

Table of Contents
maxLevel2
exclude(On this page|Use case).*
stylecircle
typeflat
separatorpipe



UI Text Box
sizemedium
typeinfo

Use case

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


Configuration

UI Steps


UI Step

Create a new rule and name it appropriately.

UI Text Box
typetip

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


 Issue event

UI Step

Add a Trigger

Select Issue event and Issue commented

Boolean condition


UI Step

Add a condition

Select Boolean condition


UI Step

Expression

Add the following expression to the boolean condition.

Code Block
languagebash
linenumberstrue
%{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 the project CASE with a certain the issue type Task.

Issue selector

UI Step

Add a selector

Select Issue selector


UI Step

Target issue(s)

Select Sub-tasks

  Add comment action

UI Step

Add an action

Select the action Add comment


UI Step

Comment text

Write the following expression.

Code Block
languagebash
linenumberstrue
%{trigger.issue.lastComment}






Import the example

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

UI Expand
titleJSON


UI Text Box
typewarning

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.


Code Block
languagejs
themeMidnight
linenumberstrue
{
"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
}



Related use cases

Page properties report
firstcolumnUse case
headingsJWT feature, Workflow function, Parser functions, Label
sortByTitle
cqllabel = "use-case-auto" and label = "add-comment" and space = "JWTSDC"


Excerpt Include
DECADIS:Contact support
DECADIS:Contact support
nopaneltrue


Page properties
hiddentrue


JWT feature

Automated action

Add comment action

Label





Page properties
hiddentrue



Status
Tech review

Status
titletodo

Style guide

Status
titletodo

Status
titletodo
Status
colourYellow
titleReady for review
Status
colourGreen
titledone
Status
colourRed
titleflagged