Insert a Jira Issue Action
This page is about Easy Integrations for Jira Cloud. Using Jira On-Prem? Click the On-Prem button above.
The Insert a Jira Issue action allows you to create an issue in Jira, and, if the option to generate subtasks in Jira is enabled, you can create a subtask. This documentation provides step-by-step instructions on how to configure this action within Easy Integration.
How to Configure the Insert a Jira Issue Action
The Insert a Jira Issue 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 Insert a Jira Issue.
Here's how to set up the Insert a Jira Issue action:
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');
Subtask – Enable this option to create the issue as a subtask.
Custom parent 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. For example:
return data.apiData.api1.responseBody.issueId;
Project – Select a project that the issue will be added to.
Issue Type – Select an issue type for the issue.Â
Summary Text script – Write a JavaScript script that returns a text for the summary. Event data or previous action data can be used in the script. For example:
return data.event.issue.fields.summary;
Issue fields – Select which fields to update, or click Add field to create new ones.
Field: Choose the field to be updated.
Field script: This is the script for the field value. Event and previous Action data are available.
Custom shape for field: Check for the custom object field. Not all fields require a string. See the Jira documentation for more information.
Custom shape for field: Write the JSON for the custom shape. The
{{fieldValue}}
variable (result of Field script) is available.
Click Save, and then save your listener configuration as well.
That’s it! You have successfully configured the Insert a Jira Issue action in Easy Integrations. For further insights, check out the following example:
Example 1: Send an email
Here's an example that adds an issue as a subtask, with the parent issue key fetched from the event's issue and the summary text coming from the first action.
Note: This is a sample use case and can be customized to suit your integration needs.