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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Execute Dynamic JIra query from confluence cloud

Hi ,

We have JIRA and Confluence Cloud versions.

Im using JIRA issue macros to display all the tickets in sprint.

From Confleunce Cloud , how can I execute a dynamic JIRA query with parameters that i can set outside of the query ?

i.e instead of hardcoding the sprint id in a query like  "Sprint=521 and issuetype=story" can i first set the value for a parameter in confluence as ActiveSprint=521  and then run the query to dynamically pick the value for sprint at the time of execution like 'Sprint=$ActiveSprint$ and issuetype=Story' ?

Today I have almost 40 queries in a dashboard that i need to update everyu 2 weeks with new sprint id.


Im open to using 3rd party add ons as well.

I googled abt this and all i could find was answers for Confluence server and not Confluence cloud.






2 answers

Hi Sanji - You could try using the openSprints() search function in the JQL queries in your issue macros:

issuetype = story AND sprint in openSprints()

This should return a list of stories in your current active sprint(s), so you don't need to change the sprint ID every time. 

This will only display issues in an active sprint, so issues allocated to a sprint which has not yet started won't be displayed.

Another option would be to save a filter in JIRA which returns all issues in a particular sprint:

Sprint = 521

Note the filter id when you save it, then you can refer to this saved filter in your 40 queries.

For example, if the filter ID of the search above is 10200, you can do the following to display all stories in sprint 521:

filter = 10200 AND issuetype = story

And the following to display all bugs:

filter = 10200 AND issuetype = bug

Doing this means you only have to update the sprint ID in one place to change the results of all 40 queries that refer to it.

Thanks a lot for the quick response Sam !!

The example I gave was to explain the usage of a variable in the query.

Let me explain my real issue:

- Need to show the scope of whole year in current sprint(S), next sprint(S), next month(M), month after(M), Quarter(Q)  Half (H) 


Our sprints are 2 weeks each

The way im doing it now is by 1 jira query for each.

i.e 1 query for current sprint

1query for next sprint

1 query for next month (actually the 2 sprints for that month)

etc for rest of the MQH

All the above ive create a table in confluence page with 6 columns and each results are shown in seperate columns using jiraissues macro.

Now this is for just 1 product with its own board and sprints (Sprint ids)

I have to create 12 wiki pages for each products (meaning i have to replicate the queries with product and sprintid's deifferent)

Our cross functional teams and management were pretty happy with this dashboard (since they werent getting any visibility to Engineering plans), but now comes the problem of scaling it maintaining it.

If I had the option to run the query based on runtime parameters, then I could have setup the data in a seperate location where i just have to change the values.

Im open to any other option to report the same content even 3rd party tools either in confluence cloud or jira cloud.



Same problem here! Trying to create snapshots of product requirements for individual releases (fixVersion field in Jira), for separate components. 

I would love to be able to use Confluence variables and directly inject them in a given Jira macro table. 

Is it possible at all in Jira / Confluence Cloud?

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Confluence

Table Row Highlighter - CSS Hack

(Said in an infomercial voice) Has this ever happened to you? You are on a Zoom/Teams call, looking at a large table, and people are confused where on the table you are pointing (insert video of real...

250 views 0 3
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you