Skip to main content
Skip table of contents

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.


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

  • Jira Added Fields are required for the issue creation. The PTC resolves these fields on his own and will load them into the Replace Placeholder dialog.

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:

  • The user is not able to instantiate the template without creating a Jira Issue

If unchecked:

  • The user has the choice to select a toggle button Create Jira Issue to skip the Jira Issue creation in the Relace Placeholder dialog. If the issue creation is skipped the Jira issue will not be created and there will not be a Confluence Jira macro on the created page.

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

Added Jira Field with fieldId and placeholder as value | Image

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

  • Set a static value. The static value will be inserted as value and not displayed in the Replace Placeholder dialog.

(3) Required

If checked:

  • The user has to fill out the input field before template instantiation

If unchecked:

  • The input field can be empty and will be ignored in the Jira Issue Creation.

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

(tick) supported

Number Field

type: number

(tick) supported

Select List (single choice)

type: option

(warning) Only works with id of option

Select List (multi choice)

type: array

items : option

(warning) Only works with id of option and only one option as default

e.g Epic Link

type: any

(tick) supported

Date

type: date

(tick) supported

Assignee

type: user

(error) Not supported

User

(warning) Currently only works on Confluence 8.4 or higher versions

type: user

(error) Not supported

Component

type: component

Priority

type: priority

(warning) Only works with id of priority (see below on how to get the id of the priorities)

Version (single choice)

type: version

(warning) Only works with id of version

(see below on how to get the id of the priorities)

Version (multi choice)

type: array

items: version

(warning) Only works with id of version

(see below on how to get the id of the priorities)

Labels

type: array

items: string

(tick) 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.

CODE
https://<YOUR-JIRA-URL>/rest/api/2/project/<YOUR-PROJECT>/priorityscheme

Overview of all priorities:

CODE
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.

CODE
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

JavaScript errors detected

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

If this problem persists, please contact our support.