Update a Jira Issue Action
This page is about Easy Integrations for Jira Cloud. Using Jira On-Prem? Click the On-Prem button above.
The Update a Jira Issue action is a powerful tool that allows you to 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 in place:
Only Jira administrators have the necessary permissions to access and configure the Update a Jira Issue within Easy Integration.
How to Configure the Call a Rest API Action
Update a Jira Issue in Listeners can be accessed within Easy Integration's admin UI. Follow these steps to configure listeners:
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 Update a Jira Issue.
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 for more details. For example:
return startsWith(data.event.issue.fields.summary, 'Sultans of Swing');
Custom issue key – Unchecked: Event's issue
Checked: Custom issueIssue 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 The Jira Cloud platform REST API 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".
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.
Example 2: Adding multiple components
The component shape can be set manually to add multiple values:
return JSON.stringify(
[
{"add": {"name": "Mobile"}},
{"add": {"name": "Web"}}
]
)
Custom shape for field JSON must be {{fieldValue}}.