Comment current issue

Overview

The Comment current issue post function allows you to add a predefined comment to the issue automatically when a workflow transition is executed. You can also use macros to add dynamic data to the comment text.

Configuration

  1. 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)

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

    1. Select a Jira user group in the Group field if Group was set in the Viewable by field

    2. Select a project role in the Project role field if Project role was set in the Viewable by field

  3. 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

  4. 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

  5. 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”)

  6. 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 4 needs to have the Browse Projects and Add Comments permissions in the project of the 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 a bug is transitioned to Done, the project manager is mentioned in a comment with the resolution date, environment, etc.