---
title: "Add a Jira comment action"
canonical: "https://support.appfire.com/space/EIFJC/33915409/Add%20a%20Jira%20comment%20action"
format: markdown
---
> Macro (aura-html)

The Add a Jira comment action can be used to comment on any Jira issue. This documentation provides step-by-step instructions on how to configure this action within Easy Integration.

## 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:

1. Navigate to Jira's top menu, and click **Apps**.
2. Select **Manage your apps**.
3. In the sidebar, locate and click **Easy Integrations configuration**.
4. Select **Listeners** from the app’s top menu.
5. Configure the listener according to your requirements. For more information on that, refer to [this documentation](https://appfire.atlassian.net/wiki/spaces/EIFJC/pages/10125382/Listeners#How-to-Create-a-New-Listener).
6. 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:

![image](media://a45e7c16-64e2-4920-896a-96698e64836f)

7. **Action name –** Give a descriptive name to easily identify this action.
8. **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](https://appfire.atlassian.net/wiki/spaces/EIFJC/pages/10125347) for more details. For example:  
`return startsWith(data.event.issue.fields.summary, 'Sultans of Swing');`
9. **Custom issue key – **When** **unchecked, the event’s issue will be used. When checked, a custom issue will be used.
10. **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;`
11. **Visibility –** For Service Management projects, select either "Internal Only" or "Share with Customer". For Software and Business projects, select either a role or a group.
12. **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;`
13. 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.*

<details>
<summary>Example:</summary>

![image](media://336bf7bc-eeeb-42da-98a1-d0da12cc0953)
</details>