Button handy | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Button handy | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Panel | ||||||
---|---|---|---|---|---|---|
| ||||||
This page is about Easy Integrations for Jira Cloud. Using Jira On-Prem? Click the On-Prem button above. |
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 Create or Update a Confluence Page action within Easy Integration.
Confluence Integration must be enabled for your Jira instance.
How to Configure the Create or Update a Confluence Page Action
The Create or Update a Confluence Page 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 Configure the Create or Update a Confluence Page.
Here's how to configure the Create or Update a Confluence Page 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');
Space – Select the Confluence Space in which the content is to be created.
Parent page – Specify the parent content for the new content. If you are creating a top-level page, you can leave this field blank.
Template space – Choose a space for space templates or leave it blank for global templates.
Template – Select a user-defined global or space template.
Action parameters (variables) – Write JavaScript code to return objects of variables. For instance, you can define variables such as "issue key," "issue summary," "issue status," and "project name." These variables can be used in the URL, headers, and request body. Here's an example:
var parameters = {};
parameters['issue key'] = data.event.issue.key;
parameters['issue summary'] = data.event.issue.fields.summary;
parameters['issue status'] = data.event.issue.fields.status.name;
parameters['project name'] = data.event.issue.fields.customfield_10500.name;
return parameters;
Page title – Specify the title of the page. You can use parameters in the title by enclosing them in double curly braces. For example: "New issue is created with key {{issueKey}}."
Update existing – Check this option if you want to update a page with the same title found in the directory. Page names must be unique within a space. If you do not check this option, the action may fail. When checked, an additional option is required:
Append template – If checked, the action appends the template body to the end of the current page; otherwise, it overrides the existing content.
Add page link to issue – Enable this option to add a page link to the issue. When this field is enabled, additional fields are required:
Issue ID or Key script – Write a JavaScript script that returns an Issue ID or key. Event data or data from previous actions can be used in the script.
Confluence application link ID – The application links information cannot be accessed by the apps. To obtain the "id" value of the Confluence object, please log in to Jira, navigate to https://[domain name].atlassian.net/rest/applinks/latest/applicationlink, and copy the "id" value. For example: "7d4bz3tu-fy2m-26p1-1g3m-3857972<9252."
That’s it! You have successfully configured the Create or Update a Confluence Page action in Easy Integrations. For further insights, please refer to the following example:
Example 1: Create/Edit Wiki Page
Note: This is a sample use case and can be customized to suit your integration needs.
Expand | ||
---|---|---|
| ||
Example 2: Templates
Templates are employed for the creation or modification of Confluence pages. All action parameters are accessible as variables. Space templates can be found within the "Look and Feel" space settings.