Create epics and associated issues
Create a template for an epic
Step 1: Prepare to create a Jira issue with the issue type epic
Follow Create a Jira issues with the Page Tree Creator
Either select the issue type epic, when creating the issue or make it fixed.
The issue type id of epic can be found via the following REST API:
https://<YOUR-JIRA-URL>/rest/api/2/issuetype
{
"self":"http://localhost:2990/jira/rest/api/2/issuetype/10000",
"id":"10000", <--------- THIS IS THE ID OF THE ISSUE TYPE EPIC
"description":"Created by Jira Software - do not edit or delete. Issue type for a big user story that needs to be broken down.",
"iconUrl":"http://localhost:2990/jira/images/icons/issuetypes/epic.svg",
"name":"Epic",
"subtask":false
}
Step 2: Add a PTC Default Value macro to save the epic issue key
Follow Use newly created Issue Number and Combine with PTC Default Value macro
Define a Placeholder in the Default Value macro to be used for assigning issues to the epic.
Create a template to assign an issue to an epic
Step 1: Prepare to create a Jira issue with the additional field for epic link
Follow Create a Jira issues with the Page Tree Creator
Add an additional field for the epic link with the value being the placeholder from the default value macro.
The field id of epic can be found via the following REST API:
https://<YOUR-JIRA-URL>/rest/api/2/field
{
"id": "customfield_10002", <--------- THIS IS THE FIELD ID OF EPIC LINK
"name": "Epic Link",
"custom": true,
"orderable": true,
"navigable": true,
"searchable": true,
"clauseNames": [
"cf[10002]",
"Epic Link"
],
"schema": {
"type": "any",
"custom": "com.pyxis.greenhopper.jira:gh-epic-link",
"customId": 10002
}
}
Instantiate your pages
Step 1: Instantiate your template to create the epic
The macro body of the Default value macro will be filled out with the corresponding epic issue key.
Step 2: Instantiate your template to create an issue being assigned to the epic
Copy the second template as a descendant to the new epic page.
The epic link will be set with the epic issue key.