Create Issue Automation Macro (PRO)
With the PTC Create Issue Automation macro you can easily create Jira issues when you instantiate a template with the PTC.
Just insert the macro on the template page and configure it for your purpose.
You can add placeholders in the macro parameters and even use the Default Value Macro to configure the Create Issue Automation.
On instantiation of a PTC template a Jira issue will be created in your primary Jira application. On the created Confluence page a Confluence Jira macro will be inserted and in the created Jira issue there will be a field Description Page under Issue Links linking to the Confluence page where the issue was first created using the PTC.
Currently we only support one primary Jira Application Link
Currently not all Jira fields are supported (see Supported Jira Field-Types)
For the correct configuration of the Added Fields it is important that you insert the correct Jira field id. (Jira field id does not equal Jira field name). For more information on how to find the correct FieldId's, please refer to the Get Field IDs - via REST API
For some use case examples see Workflow with the PTC Create Issue Automation
Create Issue Automation workflow in the Placeholder Replace dialog
The Create Issue Automation macro will automatically load and prompt the user to fill out any Jira fields that are required for issue creation after selecting the project and issue type.
Also, fields that you have added in Add fields (User Added Fields) but do not belong to the creation of an issue will be removed.
On the other hand, fields that are required for creation (Jira Added Fields) are loaded into the Replace Placeholders dialog.
Parameter | Displayed in Placeholder Replace dialog | |
---|---|---|
Field Label | Input Type | |
Project Key | Cleaned Placeholder (without placeholder marker) If static: pre-selected if exists | Dropdown |
Issuetype ID | Cleaned Placeholder (without placeholder marker) If static: pre-selected if exists | Dropdown |
Issue Summary | Cleaned Placeholder (without placeholder marker) If static: Will be not displayed | Text Input |
User Added Fields | Cleaned Placeholder (without placeholder marker) If static: Will be not displayed | Depends on configuration |
Jira Added Fields | The label of added fields are always the Jira field id
| Depends on configuration |
Macro Parameters
Macro Parameters Tab - Configure Issue
Macro parameters should either be filled with one placeholder or a static value. If you configure a static value for the project or issue type those Dropdowns will not be editable in the Replace Placeholder dialog.
Note: If you are using placeholders you can configure your placeholders with the Default Value Macro (PRO) for more dynamic use of your PTC Templates.
Parameter | Description |
---|---|
Project Key required | The key of the project in which the issue should be created |
Issuetype ID required | The issue type id of the issue to be created (e.g 10100) |
Issue Summary required | The summary of the issue to be created |
Automation Required required | Set if the Jira Issue creation is required. If checked:
If unchecked:
|
Optional Parameter | |
Confluence Page Optional | Insert a placeholder to have a dropdown in the placeholder replacement dialog to select a Confluence Page, which will be linked to the new created issue. |
Issue Number placeholder optional | Insert a placeholder to have the placeholder be replaced by the issue number of the created issue. You can then use this placeholder in the other parts of the template and sub pages as usual. (e.g. JIRA-15 has issue number 15) |
Linked Issue Relationship optional | Insert a placeholder to have a dropdown in the Replace Placeholder dialog to select the relationship between the created issue and the issue you link to it. Note: This only works together with the Linked Issue Key parameter. e.g for clones insert “10001” and for is cloned by “10001:inward” |
Linked Issue Key optional | Insert a placeholder to replace it with an issue key to be linked to your newly created issue. Note: This only works together with the Linked Issue Relationship. |
Macro Parameters Tab - Add fields
In the Add fields section you can configure additional fields. Fields that are not required for issue creation but you’d like to fill out anyway.
As soon as you click the Add Field button, two new text fields and one check-box appear:
Jira Field ID
Jira Field Value
Required
Parameter | Description |
---|---|
(1) Jira Field id | Enter a valid Jira field id(see Get Jira Field ID) Note: The Jira field id is not the same as the Jira field name! (e.g. the Jira Field “Description” has field id “description”, custom fields usually have an id like “customfield_10101”) |
(2) Jira Field Value | Enter a placeholder which will be displayed in the Placeholder Replace dialog.
or
|
(3) Required | If checked:
If unchecked:
|
Self-resolving Jira Fields
Self-resolving Fields | |
---|---|
Reporter | The Reporter is automatically set to the user who instantiated the template page. |
Issue Links | An Issue Links with the name "Description Page" is created with a link to the PTC target page. |
Supported Jira Field-Types
Type | Name | Default Value Macro |
---|---|---|
Text Field | type: string | supported |
Number Field | type: number | supported |
Select List (single choice) | type: option | Only works with id of option |
Select List (multi choice) | type: array items : option | Only works with id of option and only one option as default |
e.g Epic Link | type: any | supported |
Date | type: date | supported |
Assignee | type: user | Not supported |
User Currently only works on Confluence 8.4 or higher versions | type: user | Not supported |
Component | type: component | |
Priority | type: priority | Only works with id of priority (see below on how to get the id of the priorities) |
Version (single choice) | type: version | Only works with id of version (see below on how to get the id of the priorities) |
Version (multi choice) | type: array items: version | Only works with id of version (see below on how to get the id of the priorities) |
Labels | type: array items: string | supported (split by comma for multiple labels as default) |
Get ids of priority for a project
Find out what priority ids can be used as default value. Open the following URL in your browser, making sure that you substitute <YOUR-JIRA-URL>
and <YOUR-PROJECT>
with your actual Jira Base URL and your Jira project.
https://<YOUR-JIRA-URL>/rest/api/2/project/<YOUR-PROJECT>/priorityscheme
Overview of all priorities:
https://<YOUR-JIRA-URL>/rest/api/2/priority
Get ids of version for a project
Find out what version ids can be used as default value. Open the following URL in your browser, making sure that you substitute <YOUR-JIRA-URL>
and <YOUR-PROJECT>
with your actual Jira Base URL and your Jira project.
https://<YOUR-JIRA-URL>/rest/api/2/project/<YOUR-PROJECT>/versions
Combination with PTC Placeholder Macro
A Create Issue Automation Macro can be combined with a PTC Placeholder Macro with following types.
Jira Field Type: Text Field
Placeholder Type Multiline: Allows user to insert a multi line value. e.g for description of issue
Placeholder Type Datapicker: Allows user to select a value from an external Datasource