Is it possible to use a variable in the Jira Issue/Filter macro?

I'm wondering if there is some workaround or another macro I can use instead of this one.

I want to use a variable ($variablename) in the template so the user needs to fill it out when he creates the page from the template.

Then I want to use this variable in the query in the "JIRA Issue/Filter" macro. But when I try it then the save button is grayed out because it has not resolved the query yet. It's not possible to resolve the query at this stage (when creating the template) because the variable has not been set yet.

The result is that I can't use this template globally because the query differ between confluence spaces.

Another related question. Is it not possible to predefine a variable with a value in the space.
The idea is to have a variable called $jiraProject and for each confluence space it points to different JIRA project key.
And then I can use that key in the query I mention above.

Regards,
Kristjan 

2 answers

The only way to accomplish this is with Confluence Blueprints which are created with the Atlassian SDK – They are fairly simple but involve Spring and Maven add-on development, as well as some HTML/javascript.

The built-in template variables will not work I do not believe.

Thanks Steve.

I might need to start looking at Blueprints smile

Steven Behnke Community Champion Aug 12, 2016

I'm becoming familiar myself so let me know if you have questions.

Hi Steve / Kristjan,

Did you get any solution to above problem. I too am facing similar problem. I want to fetch some data in multiple tables from JIRA using multiple "JIRA Issue/Filter" in my confluence template. And these resultant tables fetch different kinds of data for the same/ particular JIRA issue Id.  And when this template is used by users to create their documents, every user would need to display data for different JIRA issue id (which belongs to them). 

So either users punch in the JIRA issue id inside the JQL everytime, or we can use a variable where user provides their respective JIRA issue id only one time. And the rest all tables would pull data for that issue id at run time.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

380 views 21 10
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you