JQL query to fetch issuetype story, task, bug for one project from list of projects based on labels

Sadhana Viswanathan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 24, 2024

Hi all,

I'm using this JQL query to fetch stories, bugs & tasks for a list of projects:

issuetype in (story, Bug, Task) AND project in ("Project1", "Project2", "Project3", "Project4") AND status in (done, DONE) AND resolved >= startOfDay(-730) ORDER BY resolved Desc


but I want to fetch only those stories, bugs & tasks for Project3 that has labels "label1" & "label2"
I know I can independently fetch it by using:

issuetype in (story, Bug, Task) AND project = "Project3" AND labels in (labe1, label2) AND status in (done, DONE) AND resolved >= startOfDay(-730) ORDER BY resolved Desc

How can I merge these two queries into one?

Thank you in advance!!

2 answers

1 accepted

1 vote
Answer accepted
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 24, 2024

Hello @Sadhana Viswanathan 

Welcome to the Atlassian community.

Try this:

issuetype in (story, Bug, Task) AND (project in ("Project1", "Project2", "Project4") or (project = "Project3" AND labels in (labe1, label2))) AND status in (done, DONE) AND resolved >= startOfDay(-730) ORDER BY resolved Desc

 

Sadhana Viswanathan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 24, 2024

Thank you, Trudy!! worked for me :) 

0 votes
karim -Atlassway-
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
May 29, 2024

Hi @Sadhana Viswanathan ,

 

Using Colored Label Manager you can visualize your labels with at-a-glance quickness to save time and avoid mistake - Make your issues more colorful

Allow your team to define their labels, cleanup and organize them quickly with bulk powerful functionality .

Issue by labels report.png

Karim 

Atlassway Team

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events