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

Execute Dynamic JIra query from confluence cloud

Sanju Nair April 22, 2017

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.

 

-Sanju

 

 

 

2 answers

0 votes
Ora Zyto June 6, 2019

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?

0 votes
Sam Hall
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 23, 2017

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.

Sam Hall
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 23, 2017

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.

Sanju Nair April 23, 2017

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) 

i.e SSMMQH

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.

-Sanju

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events