Multiple JQL queries in a single report

We have a requirement where we need to combine the results of multiple filters/jql's into a single report.

Is there a plugin available for the same? Could anyone please suggest how could we achieve this?

2 answers

0 votes

Depends on what kind od report you are looking for!.Checked the filter statistics gadget?

Unfortunately, this plugin won't help. Allow me to explain it further, suppose I have written one JQL for a jira project 'TEST One'.

eg. project = TO and issuetype = "Bug"

and another jql for another project 'Test Two'

eg. project = TT and issuetype = "Bug"

I want the results for both JQL's in a single report in Jira. Can I use a join?

No, you need to merge the two queries together.

Project in (TT, TO) and issuetype = "Bug"

Joe Wai Tye Atlassian Team Sep 22, 2013

I think both of those queries work, based on a quick test that I just did.

Not sure what kind of performance impact this may have, but why not "OR" everything together in a jql?

(project = TO and issuetype = "Bug") OR (project = TT and issuetype = "Bug")

Nick's query will work incase the jql's are similar and Florin's query should work for any jql combination I guess...thanks Jobin, Nic and Florin

The SQL for JIRA plugin is able to achieve it seamlessly as it fully supports JQL integrated with SQL. The SQL language supports the UNIION command for that. Ex:



select * from ISSUES where JQL = 'project = TO and issuetype = Bug'
select * from ISSUES where JQL = 'project = TT and issuetype = Bug'

alternatively you might want to combine both JQL queries within a single one only:

select * 
from ISSUES 
where JQL = '(project = TO and issuetype = Bug) 
              OR (project = TT and issuetype = Bug)'

both queries would provide the same result data. 



Thanks @Marketplace Expert
This did not work in my most recent attempts. 
Do you have a guide for users of the add-on or updated instructions on how to merge / unite complex JQL results ?

This part is pure SQL, therefore it is unmodified as it's part of the H2 core engine.

Perhaps there is some other error in your SQL+JQL query. (?)

Wow amazingly fast reply !
I actually found a very useful built-in function in JQL that allows this. 

For example:
filter = "Active Issues where currentUser in summary, description, comments"
OR filter = "Active Issues where Participant = Current User"
OR filter = "Active issues where Watcher = Current User"

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

1,100 views 4 9
Read article

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