Comment related issues

Overview

The Comment related issues post function allows you to add a predefined comment to sub-task, parent, or linked issues automatically when a workflow transition is executed. You can also use macros to add dynamic data to the comment text.

Configuration

  1. Select the relation type in the Perform action on field to decide if the comment will be added to sub-task, parent, or linked issues

    1. If Parent or Sub-tasks was selected, set the Applies to field to decide if the comment will be added to issues with any or selected issue type. If Selected was set, choose the issue types in case of which the comment will be added in the Issue types field

    2. If Linked was selected, set the Applies to field to decide if the comment will be added to issues link with any or selected issue link. If Selected was set, define the details of the issue link used to link issues to which the comment will be added:

      1. Set the type of link in the Link type field

      2. Set the direction of link in the Link direction field

  2. Define the content of the comment in the Comment text field (e.g. “This is a comment added automatically upon executing a workflow transition”)

    1. Use macros to add dynamic data (see the Macros section below)

  3. Set the Viewable by field to restrict the visibility to a certain group or project role

    1. If Group was set, select a Jira user group in the Group field

    2. If Project role was set, select a project role in the Project role field

  4. Activate Send notification and fire event option if you want the post function to trigger the Issue commented event and send the notification according to the project’s notification scheme

  5. Select if the post function should be executed by the current or another user in the Action executor field (see User Permissions below)

    1. If you have selected Current user option, the post function will be executed by the user making the workflow transition

    2. If you have selected Another user option, provide a user in the User field, so that the post function will be executed by this user

  6. Activate the JQL condition option and define the JQL query that has to be met by the issue in order to execute the post function (e.g. “type = Bug and Priority = Blocker”)

  7. Activate the Executor condition option if you want the post function to be executed only if the user is or isn’t in a certain Jira user group or project role

    1. Select if The executor has to be or can’t be a member of a certain Jira user group or project role

      1. Select a Jira user group in the Group field if Group was set in the member of a field

      2. Select a project role in the Project role field if Project role was set in the member of a field

User Permissions

The user set as Action executor in point 5 needs to have the Browse Projects and Add Comments permissions in the project of the related issue in order to execute the post function.

Macros

Macros can be used to add dynamic data related to the issue or the project to the comment text. Following macros are available:

  • {source.summary} - summary field value

  • {source.status} - status field value

  • {source.project} - project name

  • {source.key} - issue key

  • {source.resolution} - resolution field value

  • {source.priority} - priority field value

  • {source.assignee.email} - e-mail address of the user assigned

  • {source.assignee.username} - username of the user assigned

  • {source.assignee.displayName} - full name of the user assigned

  • {source.reporter.email} - e-mail address of the reporter

  • {source.reporter.username} - username of the reporter

  • {source.reporter.displayName} - full name of the reporter

  • {source.projectlead.email} - e-mail address of the project lead

  • {source.projectlead.username} - username of the project lead

  • {source.projectlead.displayName} - full name of the project lead

  • {source.watchers.email} - e-mail addresses of all watchers

  • {source.watchers.username} - usernames of all watchers

  • {source.watchers.displayName} - full names of all watchers

  • {source.singleuser.customfield_id.email} - e-mail address of the user set in a single user picker custom field defined by id

  • {source.singleuser.customfield_id.username} - username of the user set in a single user picker custom field defined by id

  • {source.singleuser.customfield_id.displayName} - full name of the user set in a single user picker custom field defined by id

  • {source.multiusers.customfield_id.email} - e-mail addresses of all users set in a multi user picker custom field defined by id

  • {source.multiusers.customfield_id.username} - usernames of all users set in a multi user picker custom field defined by id

  • {source.multiusers.customfield_id.displayName} - full names of all users set in a multi user picker custom field defined by id

  • {source.text.customfield_id} - value of a text custom field defined by id

  • {source.number.customfield_id} - value of a number custom field defined by id

  • {source.date.customfield_id} - value of a date custom field defined by id

  • {source.singleselect.customfield_id} - value of a single select custom field defined by id

  • {source.multiselect.customfield_id} - value of a multi select custom field defined by id

Use cases

  • When the issue linked to another issue with Bloker link type is resolved, add a comment with the information