Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

JQL QUERY - Project key is turning up multiple projects in search results

Lily Bender January 24, 2024

When I enter the following query" Project = "Data Science" AND issuetype = "In-Service Bundle" OR issuetype = 10000 ORDER BY key ASC, assignee ASC

I receive results from projects that are not Data Science. My results are in the thousands. What happened? I tried using Key = DS instead of project and it said The issue key 'DS' for field 'Key' is invalid. Even though that is my project code.

2 answers

2 accepted

1 vote
Answer accepted
Bill Sheboy
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.
January 24, 2024

Hi @Lily Bender -- Welcome to the Atlassian Community!

Adding to the answers provided...I recommend looking at this free training from Atlassian on using JQL.  It will cover introductory concepts and how to answer business questions with JQL:

https://support.atlassian.com/jira-software-cloud/docs/what-is-advanced-search-in-jira-cloud/

https://university.atlassian.com/student/activity/1225443-intro-to-jql-in-jira-software-course-description

https://university.atlassian.com/student/path/849533-gain-project-insights-through-jql

Kind regards,
Bill

Lily Bender January 24, 2024

Thank you!

Like Bill Sheboy likes this
0 votes
Answer accepted
Uday Kiran Bhaviri
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.
January 24, 2024

Hi

Use the below query 

Project = "Data Science" AND (issuetype = "In-Service Bundle" OR issuetype = 10000) ORDER BY key ASC, assignee ASC

Regards

Uday

Lily Bender January 24, 2024

Ah that worked! Thank you so much. What do the parentheses do? For future reference. 

Uday Kiran Bhaviri
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.
January 24, 2024

Start learning the difference between AND and OR operators, then combine them and use them.. then you will get the idea how they work...

If you remove the parentheses the query is looking for the issues from

Project = "Data Science" AND issuetype = "In-Service Bundle"

OR

issuetype = 10000 ORDER BY key ASC, assignee ASC

In the second statement it is looking for issues where issue type 10000 so that's why you are getting records from multiple projects.

Suggest an answer

Log in or Sign up to answer