Skip to end of banner
Go to start of banner

Add a Jira Comment action

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

The Add a Jira Comment action can be used to comment on any Jira issue. On this page, you'll learn how to use it.

Add a Jira Comment action options:

Field Name

Description

Action name

Give the action a name. This is just a reminder for you.

Condition

Enable or Disable the condition.

When enabled, write the listener's JavaScript condition, and the Listener actions will work if the script returns true. See Context variables, Scripts and Events for details. Example:

return startsWith(data.event.issue.fields.summary, 'Sultans of Swing');

Custom issue key

  • Unchecked: Event's issue

  • Checked: Custom issue

Issue ID or Key script

Write a JavaScript script that returns an Issue ID or key. Event data or previous action data can be used in the script. Example:

return data.apiData.api1.responseBody.issueId;

Visibility

Field

Description

Service Management projects

For Service Management projects, select either "Internal Only" or "Share with Customer".

Software and Business projects

For Software and Business projects, select either a role or a group.

Comment Text script

Write a JavaScript script that returns a text for comment. Event data or previous action data can be used in the script. Example:

return data.event.issue.fields.summary;

 Check Out an Example Screen

The following example adds a comment to an issue, in which the issue key is fetched from the second action response, and the comment text is fetched from the first action.

  • No labels