Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Use of User Macros in a Confluence page to set a variable that JQL queries would get

Sergio Montávez
Contributor
April 10, 2019

Hi,

I need to create several Filters with the same ID (but different JQL queries) to be shown in the same Confluence page. I would like to set the ID (manually) through the Confluence page so the Filters automatically gets the value from it and I thought about using User Macros, but haven't found it in the documentation, is this a feasible idea?

This would be the picture:

Confluence page

A variable $filter_id exists in the page and is set by the user, i.e.:

 $filter_id = 123

 

Filters gadget in the same Confluence page

Filter A:

id = $filter_id AND Sprint = 32

Filter B:

id = $filter_id AND Sprint = 33

Filter C:

id = $filter_id AND "Issue Type" = Bug

 

I don't want to create another filter containing the id because this ends up doubling the amount of Filters and it's not scalable.

 

Thanks a lot!

1 answer

0 votes
Diego
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 11, 2019

Hey there!

Sergio, this is quite an interesting objective you have in hands!

Some time ago, other admins have achieved this here with the Community. You can check their (quite complex) outcome here:

Can I use a variable with a macro? I am trying to create a custom template and use variables and a JIRA macro together.

The solution was provided by another admins there on that thread. It is very well documented on his reply though, worth a check!

Hopefully this helps you out Sergio. Let us know.

Anna Melnikova
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 11, 2019

Hi Diego,

Thanks for link, but none of the offered solutions works in Cloud. How can we pass variables in macros withing Cloud version of Confluence?

Andy Ades July 29, 2020

Was a solution ever found for Cloud?

Sergio Montávez
Contributor
January 27, 2021

Not that I am aware of, sorry.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events