Since it is not possible to enter an invalid query string in the Confluence JIRA Macro, we have introduced the PTC JIRA Macro. It extends the Confluence Jira Macro by allowing an invalid query string, which can be replaced in a second step.
How to Use
Place the PTC JIRA Macro on the page you want your final Confluence JIRA Macro to appear
Enter the query string with placeholders as "query string" parameter
example: “project = __jira project number__” or when checking the Single issue box: “__jira project number__”
Check the checkbox Single Issue if you use a JIRA single issue
If your JQL string returns multiple issues and you have Single Issue checked, you will get a table
Place a regular Confluence JIRA Macro inside the body of the PTC JIRA Macro
Enter any valid query string
When instantiating the page. The placeholder can be replaced with a valid Query String in the replace dialog.
Replacement example: DESKPTC
Single Issue will lead to a Jira Macro with a single issue displayed in the new created page.
Multiple Issues will lead to a table containing all issues that are in this project.
Upon creation, the PTC JIRA Macro gets completely removed, leaving only the Confluence JIRA Macro with the updated query string of the PTC JIRA Macro.
The query string of the Confluence JIRA Macro is completely ignored in this process. However, the display settings of the Confluence JIRA Macro are retained.
(enter query string with placeholders)
Multiple Issues by JQL (Single Issue unchecked)
project = __jira project number__
Single Issue by key (Single Issue checked)
Check when using a JIRA single issue
Insert only a placeholder into the Query String