Pragmatic Jira Automation: Atlassian's 3 Ways of Using Jira and Confluence Together, We Unveil the 4th Way

Pragmatic Jira Automation: Atlassian's 3 Ways of Using Jira and Confluence Together, We Unveil the 4th Way

If you use Jira and Confluence together, have you ever had to:

  • Create a Jira issue, then
  • Switch to Confluence to create a page, then
  • Link said Confluence page to that Jira issue?

This involves a lot of tedious and manual steps, as well as switching between Jira and Confluence. The linking step requires you to manually specify the Jira issue and the Confluence page being linked to. Most of the current docs & guides available from Atlassian more or less follow this manual method:

What if I tell you, there is another secret way achieving the similar result?

AgileOps - What if I tell you we have a better way to do this?

In this article, I’ll introduce our AgileOps way of seamlessly integrating Jira and Confluence together, by leveraging the power of Jira Automation and REST API calls. We can trigger this automation process from a specific Jira issue and then have the Confluence page automatically created and linked back to Jira.

First, let’s see how the solution works in action. Then we’ll dive deeper into how to set it up.


The Demo

In any Jira issue, we trigger this Create page in Confluence automation rule. I’ll show you how to set it up in the next section The Setup:

AgileOps -  Create page in Confluence automation rule

Voila, a new Confluence page is automatically created and linked back to the triggered Jira issue:

AgileOps - A new Confluence page is automatically created and linked back to the triggered Jira issue

Navigating to the created Confluence page, we can see the page has been automatically linked to the Jira issue, resulting in a bio-directional link in one simple process.

AgileOps - We can see the page has been automatically linked to the Jira issue

This saves you the hassle of having to go back and forth between Jira and Confluence and manually linking Jira issue and Confluence page.


The Setup

Step 1: Create a manual Jira Automation rule

Click Create rule, then choose Manual trigger from issue as the trigger:

AgileOps - Create a manual Jira Automation rule

Step 2: Configure an action step to create Confluence page

Add a new component, choose Create page in Confluence as an action:

AgileOps - Configure an action step to create Confluence page

Then, click Connect to connect with the Confluence site we want to create page from, and configure the options as shown below:

AgileOps - Connect to connect with the Confluence site we want to create page from, and configure the options as shown below

  1. On the Title field, refer to Jira issues - smart values on how to extract data from the Jira issue, and populate the Confluence page title
  2. Choose the Space where you want to host the created page
  3. Choose Parent Page where you want the created page resides in
  4. On the Template field, choose a page template if you want to the created page to base on, or leave None to have it created as an empty page

When the rule is triggered on a Jira issue, this action step will create a Confluence page with the title populated from the Jira issue data.

Step 3: Link the newly created Confluence page to the triggered Jira issue using remote links REST API

AgileOps - Link the newly created Confluence page to the triggered Jira issue using remote links REST API

Add a new Send web request action step, then configure the options as shown below:

  1. In Web request URL, put https://YOUR_ATLASSIAN_SITE/rest/api/2/issue/{{issue.key}}/remotelink
  2. For HTTP method, choose POST
  3. For Web request body, choose Custom data
  4. In the Custom data field, put the following snippet:

{
  "globalId": "appId=YOUR_CONFLUENCE_APP_ID&pageId={{createdPage.id}}",
  "application": {
    "type": "com.atlassian.confluence",
    "name": "System Confluence"
  },
  "relationship": "Wiki Page",
  "object": {
    "url": "https://YOUR_ATLASSIAN_SITE/wiki/pages/viewpage.action?pageId={{createdPage.id}}",
    "title": "Wiki Page",
    }
}        

  • Replace YOUR_ATLASSIAN_SITE with your Atlassian site URL
  • For the YOUR_CONFLUENCE_APP_ID variable, go to https://YOUR_ATLASSIAN_SITE.atlassian.net/rest/applinks/3.0/applinks, and obtain the id value:

AgileOps - Obtain the id value


Finally, publish the rule and turn it on.


The Result

Now, pick any Jira issue, run the published rule, and you should see everything works exactly like The Demo:

  • A new Confluence page is automatically created, with title filled with Jira issue’s key, summary, and current timestamp.
  • This new page will then be automatically linked back with the Jira issue.


The Uses Cases

This solution is a game-changer for various tasks:

  • Social media marketing: Automatically create a detailed Confluence page for new article ideas through Jira. It simplifies tracking progress and organizing content.
  • Software development: Log bugs in Jira and generate Confluence pages for them. This keeps track of bug details, affected users, and fix status in sync.
  • IT service management: You can create a Confluence page for each incident or problem Jira issue, detailing the incident description, timeline, affected users, and resolution status.

To sum it up, using Jira and Confluence together, the way this article suggests, can really boost how well your team works together and cuts down on the back-and-forth between different apps. It's flexible enough to fit into any department's workflow.


I wrote blog posts about Jira, Automation, Atlassian ecosystem that help make business processes run more efficient:

Follow me and stay tuned for the upcoming articles on this topic:

  • Pragmatic Jira Automation: Jira Governance Loop - Using Jira to Manage Jira
  • Pragmatic Jira Automation: Document Generator with Jira, Automation, Confluence, and K15t Scroll PDF Exporter
  • Pragmatic Jira Automation: How Did We Use Jira as a full-pledge CRM system

AL CHEN

User Growth & Marketing @ Coda | Ex-Google | I launch marketing and growth programs from 0->1

11 个月

Great tip! I agree the existing methods in Jira only get you halfway there.

要查看或添加评论,请登录

Kiet ?Ngo的更多文章