How to write JQL query for jira board with multiple projects

Ludmila Baklanova March 17, 2020

Hello, Can someone please help me to write a jql query for project. 

The scenario is this: I have a project, created board with including 2 different projects in it, then I need to filter by epic name's so they will appear in the board which I just created. 

Is that possible?

Thank you for help! 

Luda 

 

3 answers

1 accepted

3 votes
Answer accepted
edwin vasquez
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.
March 17, 2020

Hello @Ludmila Baklanova 

If I understand your question correctly, then yes this is possible.

If you already have the board displaying the issues from two projects if not then use a query similar to this for the board filter.

project in (TestProject,TestProject2)

Then you can just switch the swimlanes to Epics.

swimlanes.pngI hope this answers your question. If not, let me know.

Ludmila Baklanova March 17, 2020

Thank you, the board already have all issues. Now I need to have a query that only show 2 epics from all. One from one project and the other from another. 

Is this possible? So I do not have to view all of the issues from two projects. 

Also, do you know if its possible to query for label as well? 

 

Thank you in advance. 

Luda

edwin vasquez
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.
March 17, 2020

Try this below for your board filter and then change the swim lanes to view by Epic. 

 

(Project = project1 and “epic name” = Epic1) or (Project = project2 and “epic name” = Epic2)
Like pavenegas likes this
Ludmila Baklanova March 17, 2020

hmmm after doing this - Project = CPE and “epic name” = "WatchTower-Trust Site" OR "Project" = "TACO" AND “epic name” = "Outage Prevention"

It still not giving me the green light. Is it something am I doing not correct?

edwin vasquez
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.
March 17, 2020

Did you use the parentheses like in my example?

Ludmila Baklanova March 17, 2020

yes and that did not work, so I change it. Is that not correct? 

Ludmila Baklanova March 17, 2020

Screen Shot 2020-03-17 at 3.06.38 PM.png

edwin vasquez
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.
March 17, 2020
(project = CPE and "epic name" = "watchtower-trust site") or ( project = TACO and "epic name" = "outage prevention")

try this. 

Like Michał Panasiewicz likes this
Ludmila Baklanova March 17, 2020

ok :) it worked. But will it show all the stories under them? or is it only epics? 

edwin vasquez
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.
March 17, 2020

It will show all issues. If you want them sorted by Epics, change the swim lanes to Epics.

If this has answered your question, please mark it as answer.

Ludmila Baklanova March 17, 2020

one last question - is it possible to add to this filter additional labels?

edwin vasquez
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.
March 17, 2020

Yes, you should be able to add or remove as much as you need to make the query work for you.

Ludmila Baklanova March 17, 2020

thank you bunches!

0 votes
ANISH TANEJA November 27, 2023

Hello,

I have a follow up question on this - 

I have one project - ABC and another project - XYZ

so, a epic gets created under project ABC with user stories (mix of ABC user stories and XYZ user stories)

I want to filter out XYZ user stories under ABC epic.

If someone can guide me how to filter these issues?
Thanks

Melody KirkWagner April 8, 2024

I'm sure you've solved this by now, but perhaps someone else hasn't. You can create a component or a label that you filter by for the stories you want to keep, or the ones you want to filter out. You can add a digit to the Summaries -- you'll just need to have some identifier that you can filter in or out. It might be a pain to set up, but you'll know what to do going forward.

When I get into a situation where I can't do a complex query to get what I want without adding a parameter (and I'm not convinced that you can't do it, but it's not coming to me right now), I do this:

project = x AND issuetype= story

Then I choose Bulk Change All. I check to ones that I want to filter on and add the filter key (label, component, whatever. Obviously won't work for summary) to all of them at once. Do the reverse (Select All, then unselect the ones you don't want to change)  if that is what let's check the fewest boxes.

0 votes
Ludmila Baklanova April 22, 2021

Hello Edwin, can I ask you for help. I need to write a query to gather view on one board with 2 projects but same label in both projects. 

Thank you, 

Luda 

Yuliia_Borivets__SaaSJet_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
April 26, 2021

Hi @Ludmila Baklanova 

You may try the following query:

Project in (Project1, Project2) AND labels in () order by created DESC

The other option, if you found some issues with JQL, you can try Dynamic filters: JQL Replacer add-on. It is developed by my team to simplify advanced searches. It's easy to set data with the help of visual composer as shown below. 2021-04-26_12-43-34.png

As result, you've got issues with the required label for 2 projects.

2021-04-26_12-45-25.png

Hope it helps.

Kind regards

Suggest an answer

Log in or Sign up to answer