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


The Update a Jira issue action lets you modify and update Jira issues based on specific conditions and criteria. This documentation provides detailed information on the various options available for configuring this action.

## Prerequisites

Before you start configuring the action, ensure you have the following prerequisites:

- Only Jira administrators have the necessary permissions to access and configure the Update a Jira Issue within Easy Integrations.

## How to configure the Call a Rest API action

Update a Jira Issue in Listeners can be accessed within Easy Integrations's admin UI. Follow these steps to configure listeners:

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 **Update a Jira Issue**.
7. Here's how to configure the Update a Jira Issue action:
  - **Action name –** Give a descriptive name for the action. This is a reminder for you 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](https://appfire.atlassian.net/wiki/spaces/EIFJC/pages/10125347) for more details. For 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 which returns an Issue ID or key. Event data or previous actions data can be used in the script. Example:
    `return data.apiData.api1.responseBody.issueId;`
  - **Notify users –** Enable to let Jira notify users when the issue is updated.
  - **Issue fields –** Select the fields to update.
    - **Field –** Select the field to update.
    - **Field script –** Script for the field value. Event and previous Action data is available.
    - **Custom shape for field – **Check for the custom object field. Not all fields expect String. See [https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-put](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-put)  for more details.
    - **Custom shape for field JSON –** Write the JSON for the custom shape. {{fieldValue}} variable can be used in JSON which is the result of "Field script".
8. Click **Save**, and then save your listener configuration as well.

That’s it! You have successfully configured the Update a Jira Issue action in Easy Integrations. To gain more insights, check out the following examples:

### Example 1: Update an issue in which its issue key is fetched from the first action response

*Note: This is a sample use case and can be customized to suit your integration needs.*

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

![image](media://bd74cb8b-ce0d-4eb7-8d4b-d5d49a051627)
</details>

###   
Example 2: Adding multiple components

The component shape can be set manually to add multiple values:

```javascript
return JSON.stringify(
    [
        {"add": {"name": "Mobile"}},
        {"add": {"name": "Web"}}
    ]
)
```

Custom shape for field JSON must be **{{fieldValue}}**.

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

![image](media://30473e55-9800-493b-ba90-bcb91bb333ea)
</details>