Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Variables in macros in templates?

Faros65 February 24, 2022


We want to create a Confluence template for a page with various reporting info from one single Jira "initiative" item. The only thing that shall change betweeen the different to be created pages is the ID of the initiative in the JQLs within the macros.

Sadly, I haven't found out yet how to place a variable in a query within the "Jira issue" and "Jira chart" macros.

Can you please point me to the respective info?

Thanks in advance!


1 answer

0 votes
Srinatha T
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 24, 2022

Hi @Faros65 ,

Welcome to Atlassian community. 

I recommend you to go through this community post Insert-the-jira-issues-macro and below KB article


I hope above info help. Have a nice day.


Srinath T

Faros65 February 24, 2022

Hi Srinatha,


thanks for your answer. Unfortunately, neither of the two links above shows me how to put a variable into the macro. Only that I cannot add a variable to the "Create from template" button.

To be more precise with my requirement:

  • The page template has multiple "Jira issue" and "Jira chart" macros.
  • Each of these macros contains a JQL that retrieves the specific info related to the _same_ Jira item (plus some settings).

Example JQLs:

  • key = INI-123
  • project = "Milestone Management" and "Initiative of Milestone" = INI-123 order by "End Date"

This "INI-123" appears in all used macros on the page. What I now want for my template is to replace "INI-123" with a variable. When someone then creates a page from this template, he or she must provide the variable's value and all JQLs are automatically completed and call the correct info.

Any idea how I can achieve this?


Like Timothy Padgett likes this
Faros65 June 2, 2022

Obviously not :-(

Florian Müller August 3, 2022

Does anyone find a solution for this. We need them too.

Like Timothy Padgett likes this
Chris Iacovelli September 30, 2022

Same here, it would be great if we could inject info/page variables into a macro similar to the Add Page magro's use of %injectable%/

Like Timothy Padgett likes this
Stephen Ellwood January 13, 2023

Not sure what you can do with page variables but i have not found any way of using them usefully yet.

Anthony Pearson June 29, 2023

I have this issue in several contexts.

Where do we log feature requests?

Chris Iacovelli June 29, 2023

this link,, is along the same lines and the solution provided was to use the Source Editor to accomplish this.

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events