Comment issue

A workflow post-function that creates a comment on the current issue or issues related to the current issue. The text of the comment to be created can be any simple text or generated text using Groovy templates or expressions.

Configure the post-function

  1. Follow the steps above to add a post-function to a Transition.

  2. From the list of post-functions, select Comment issue.

  3. Click Add.

  4. The Comment issue page will open (Figure 1, right). Configure the post-function as needed, setting the options for target issues, comment body, comment visibility, and additional options as necessary. See below for details on each of the configurations.

  5. Click Add.

Note that you need to publish the workflow for the new post-function to take effect.

Target issues

Comment body

Enter the text value to be used as the comment content; the value can be either a static text value or a String value generated by a Groovy template or Groovy expression.

  • Comment type - Select one of the following:

    • Text or Groovy template - A fixed text that can include a Groovy template markup that can be used as the comment body.
      For example, The issue will be resolved on or before <%= issue.duedate%> by <%issue.assignee%>.

    • Groovy Expression - A Groovy expression whose return value (of type String) will be used as the comment body.
      For example, issue.get("description") will add the description of the issue to the issue as a comment.
      See the Expected Value tab of the Groovy help editor or refer to the documentation to know more about the expected value in the above cases.

  • Comment text - Enter text including optional Groovy expression that is used as the body of the comment.

Comment visibility

This configuration enables you to select a group or a project role to which the comment will be visible.

For no restriction, leave the field blank.

  • Restrict to Group - Select a group to restrict the visibility of the comment to a specified group. For no restriction, leave the field blank.

  • Restrict to Project Role - Select a project role to restrict the visibility of the comment to a selected project role. For no restriction, leave the field blank.

  • Restrict to Internal (Jira Service Desk only) - REQUIRES the option Send 'Issue Commented' notification is selected. Select this option to restrict the visibility of the comment to the Service Desk Agents and Collaborators only. 

Options

  • Send "Issue Commented" notification - Select this option to notify users by email when a comment is added to the issue.

Run as

Conditional execution

Error Handling

You are viewing the documentation for Jira Data Center/Server.

On This Page

Figure 1 - Comment Issue post-function