Skip to main content
Skip table of contents

Copy a full issue hierarchy as page and sub-pages

Context

In this tutorial, we will copy an entire issue hierarchy to Confluence by copying a parent issue and all its children, ensuring the tree structure is preserved.

This guide explains how to configure your recipes and trigger them using Automation for Jira so that it will copy the entire issue hierarchy.

This tutorial differs according to the number of levels to be copied:

  • Case 1 - Hierarchies with 2 levels (a parent and one child level)

  • Case 2 - Hierarchies with more than 2 levels (a parent and multiple child levels)

Prerequisites

As a Jira administrator, go to the "Elements Publish" administration and create the following recipes:

1st recipe

1 - Create a recipe named “Create parent

2 - Go to the “Target” tab and specify a specific Space and parent page

3 - Go to the “Content” tab and populate the “Page title” and “Page content

4 - Click Save

2nd recipe

1 - Create recipe named “Create child

2 - Go to the “Target” tab and specify a specific Space and parent page

3 - Go to the “Content” tab and populate the “Page title” and “Page content

4 - Click Save

For technical reasons, specifying a target in the 2nd recipe is mandatory. Without it, the recipe cannot be automatically executed by the Automation rule. However, be aware that this target will be overwritten by the Automation rule to create the pages under their parent, to ensure the hierarchy structure is preserved.

In the “Settings” tab of the “Elements Publish” administration, you need to generate a token to be used in the automation rule to trigger the recipe from.

You also need to select a user as Actor. Make sure the selected user has the requiredpermissions to create pages in Confluence.

For more information, see Create Confluence pages with Automation

Tutorial

Case 1 - Hierarchies with 2 levels (a parent and one child level)

1 - As a Jira administrator, go to "Global automation"

2 - Import the following rule:

copy-parent-and-child-issues-automation-rule.json

3 - Edit this rule

4 - Update the two “Send web request” actions as follows:

  • Replace “PARENT-RECIPE-REQUEST-URL” with the request URL of the "Create parent" recipe

  • Replace “CHILD-RECIPE-REQUEST-URL” with the request URL of the "Create child" recipe

  • Replace “TOKEN-VALUE“ with the Token generation from the Settings tab of our app

Case 2 - Hierarchies with more than 2 levels (a parent and multiple child levels)

1 - As a Jira administrator, go to "Global automation"

2 - Import these 2 rules:

copy-parent-and-1st-level-automation-rule.json create-subsequent-levels-automation-rule.json

3 - Edit these rules

4 - In each rule, update the “Send web request” actions as follows:

  • Replace “PARENT-RECIPE-REQUEST-URL” with the request URL of the "Create parent" recipe

  • Replace “CHILD-RECIPE-REQUEST-URL” with the request URL of the "Create child" recipe

  • Replace “TOKEN-VALUE“ with the Token generation from the Settings tab of our app

Result

With this configuration, the issue from which the automation rule was triggered will be published to Confluence, and all its child issues will be published as sub-pages, preserving the hierarchy structure.

chrome_BTXVGrySwG.gif

•••

New to Elements Publish? 
If this tutorial has stirred your imagination, why not give it a try? 

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.