On this page

Use case

When a user comments or edits a comment in a subtask, that comment will be written to the parent as current user.

This is useful when the assignee of the parent needs to see all comments completed by subtasks without having to go into each one and view the subtasks' comments.


 Issue event

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.

Add a Trigger → Issue Event → Issue Commented

 JQL condition

Add the following JQL query:

project = YOURPROJECT and type in subTaskIssueTypes()

Update the query and replace the YOURPROJECT with the desired project name.

 Issue Component Selector

Add Selector → Issue Selector

Select Parent Issue

 Add comment action

Next to the Issue Selector click on Add → Action → Add Comment

Comment's text

%{trigger.issue.lastComment}

Simply use the Select field dropdown to quickly select the Last Comment virtual field. Make sure to select the field from the trigger issue.

Enable the rule by clicking on the Enable button → 


 Screencast

No screencast available at the moment.


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 all subtask comments to the parent issue",
    "description": "",
    "creator": "admin",
    "status": false,
    "triggerData": "6",
    "triggerType": "ISSUE_EVENT",
    "configuration": {
        "refs": [
            "issue",
            "system",
            "trigger.issue",
            "trigger.parent"
        ],
        "triggerType": "6"
    },
    "children": [
        {
            "sequence": 0,
            "type": "JQL_CONDITION",
            "ruleEntityType": "CONDITION",
            "configuration": {
                "refs": [
                    "issue",
                    "project",
                    "system",
                    "trigger",
                    "trigger.issue",
                    "trigger.parent"
                ],
                "jql": "project = TEST and type = subTaskIssueTypes()",
                "jqlParsingMode": "jql",
                "actingUser": "field_00020"
            },
            "children": [
                {
                    "sequence": 0,
                    "type": "ISSUE_SELECTOR",
                    "ruleEntityType": "SELECTOR",
                    "configuration": {
                        "refs": [
                            "issue",
                            "project",
                            "system",
                            "trigger",
                            "trigger.issue",
                            "trigger.parent"
                        ],
                        "option": "parent",
                        "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.