Button handy | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Button handy | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Panel | ||||||
---|---|---|---|---|---|---|
| ||||||
This page is about Easy Integrations for Jira Cloud. Using Jira On-Prem? Click the On-Prem button above. |
...
How to Configure the Add a Jira Comment Action
The Add a Jira Comment action in Listeners can be accessed within Easy Integration's admin UI. Follow these steps to configure:
Navigate to Jira's top menu, and click Apps.
Select Manage your apps.
In the sidebar, locate and click Easy Integrations configuration.
Select Listeners from the app’s top menu.
Configure the listener according to your requirements. For more information on that, refer to this documentation.
In the Actions section of the listener configuration, click Add a Jira Comment.
Here's how to set up the Add a Jira Comment action
...
:
...
Field Name
Action name
...
– Give
...
a
...
descriptive name to easily identify this action.
Condition
...
– Enable or
...
disable the condition.
When enabled,
...
provide a JavaScript condition
...
for the listener. The action will execute only if the script returns true.
...
You can refer to Context variables, Scripts, and Events for more details.
...
For example:
...
return
...
startsWith(data.event.issue.fields.summary,
...
'Sultans
...
of
...
Swing');
Custom issue key
...
Unchecked: Event's issue
...
– Whenunchecked, the event’s issue will be used. When checked, a custom issue will be used.
Issue ID or Key script
...
– Write a JavaScript script that returns an Issue ID or key.
...
You can use event data or previous action data
...
in the script.
...
For 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.
...
For example:
...
return
...
data.event.issue.fields.summary;
...
Click Save, and then save your listener configuration as well.
That’s it! You have successfully configured the Send an Email for a Jira Issue action in Easy Integrations. To gain more insights, check out the following example:
Example 1: Add a Jira Comment
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.
...
Note: This is a sample use case and can be customized to suit your integration needs.
Expand | ||
---|---|---|
| ||