Sample Configuration: Building a Page Tree reflecting the Issue Hierarchy

Goal

We want to explain how to replicate a parent child hierarchy in Jira in your Confluence Page Tree. The Jira standard hierarchy is Epic, Standard Issue Types, Subtask Issue Types.

As a result of this configuration you will have a corresponding Page Tree in Confluence that is hiarachical identical as your Jira issues.

blue book Instructions

Our example configuration is made for a simple two level hierarchy (Epic, Story).

Custom Field Configuration

  1. Add a Single Line Customfield ParentIssuePageId

  2. The Customfield must be added to the context of your projects and assigned to the issue types 

Autopage Rules

Parent Rule

  • Add an Autopage Rule “Epic Hierarchy - Parent Issue Rule” to create pages for the hierarchy level Epic

We assume that you define a static page underneath these pages are placed in Confluence

 Parent Issue Rule - Trigger Config

Parent Issue Rule - Condition Config

Parent Issue Rule - Action Config


Child Rule

  • Add an Autopage Rule “Epic Hierarchy - Child Issue Rule” to create pages for the hierarchy level Story

We assume that you want to place these pages underneath the pages that belong to the linked Epic issue

Child Issue Rule - Trigger Config 

(lightbulb)  See here How to setup an Incoming Webhook

(lightbulb) Use the “Custom Field”-Mode to define the Target Page.

The Customfield “ParentIssuePageId” must have been created in advance.

Jira Automation Rule

API Token Generation

The Automation Rule contains a web request to the Jira API. You need to create a Personal Access Token.


Step 1: Generate an API Token

  1. Navigate to your User Account.

    • Open the Security Tab

  2. Create a new token.

    • Click on "Create and manage API tokens"

  3. Configure the token:

    • Label: Enter a name for your token (e.g., "Jira Automation").

    • Expiry date: Set an expiration date for the token. You should choose a reasonable period for security reasons.

    • Permissions: Select the appropriate permissions that the token will need to perform actions via the API.

  4. Generate the token.

    • Click "Generate" and copy the token. You will not be able to view the token again once you close this screen, so save it securely.

Step 2: Use the Personal Access Token in Jira Automation

  1. In your Jira Automation rule, when configuring the "Send Web Request" action, set the following HTTP header:

    • Authorization: Use the Personal Access Token. The format is:

      Authorization: Bearer <your-personal-access-token>

    • For example:

      Authorization: Bearer abc123def456ghi789


  2. Set the Content-Type header:

    • Add a header:

      Content-Type: application/json

Step 3: Secure and Manage Your Token

  • Treat the API Token as a sensitive credential. Do not share it or expose it in insecure locations.

  • Revoke the token if it is no longer needed or is compromised by going to Profile > Personal Access Tokens and selecting Revoke.

Jira Automation Rule - Overview

Jira Automation Rule - Detail Configuration

Web Request - Get the Remote Links of Parent Issues

Atlassian Jira API Documentation

Setting the parent issue in the web request to retrieve the parent page:

{base-url}/rest/api/3/issue/{issuek key}/remotelink //replace {issuek key} with smart value {{issue.parent.key.urlEncode}}

{{#webhookResponse.body}}
{{#if(relationship.startsWith("mentioned"))}}
{{object.url.match("pageId=([0-9]+)").replace("pageId=", "").trim}}
{{/}} {{/}}

See here How to setup an Incoming Webhook

This page was last edited on 05/17/2025.