Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

So I am working on a pretty Complex filter and for some reason It is not filtering at all

Edited

Here is the JQL code I am Using:  project in ("Business Analytics") OR project in (IRR) And assignee is EMPTY AND statusCategory not in (Done) AND "Department[Short text]" ~ "Orientation & Student Success" OR "Department[Short text]" ~ "Diversity and Multicultural Affairs" OR "Department[Short text]" ~ "Career Services" OR "Department[Short text]" ~ "Academic Advising" OR "Department[Short text]" ~ "Thayne Center for Student Life, Leadership & Community Engagement" OR "Department[Short text]" ~ "TRIO & PACE Programs" AND labels in (internal-request, External-Request) AND reporter = 5b688af7304ed93c17e41c98   

 

For some reason it is Including Done and Assigned tickets,  Which the code above filters out  I am unable to share screenshots.  Is there anything wrong with the code up above that would be causing this, The reason why I'm not just clicking the Status Tab is because the code will be for a rally bot notification 

3 answers

1 accepted

5 votes
Answer accepted
Alex Community Leader Dec 03, 2021

Hi @Preston Hicks, and welcome to the community!

 

Based on your JQL, I am assuming you need to list issues within the following criteria:

  • Project in (Business Analytics ) OR
  • Project in (IRR ) AND
  • assignee = empty
  • statusCategory not in Done AND
  • Department[Short text] in (...)
  • labels in (internal-request, External-Request) AND
  • reporter = 5b688af7304ed93c17e41c98

If that is the case, you might need to add a couple of parentheses to complete the logic.

Ex:

project in ("Business Analytics") OR 
(project in (IRR) AND
assignee is EMPTY AND
statusCategory not in (Done) AND
("Department[Short text]" ~ "Orientation & Student Success" OR
"Department[Short text]" ~ "Diversity and Multicultural Affairs" OR
"Department[Short text]" ~ "Career Services" OR
"Department[Short text]" ~ "Academic Advising" OR
"Department[Short text]" ~ "Thayne Center for Student Life, Leadership & Community Engagement" OR
"Department[Short text]" ~ "TRIO & PACE Programs") AND
labels in (internal-request, External-Request) AND
reporter = 5b688af7304ed93c17e41c98 )

 

If your criteria are different, please share them so that I can think through them.

I hope it helps. If this answer helps solve the problem, please come back and mark this answer as solved to help other community members with the same challenge. If not, you are welcome to share your solution as well.

Cheers,

Alex

Thanks That slimmed it done by alot

1 vote
Robert Wen Community Leader Dec 03, 2021

hello @Preston Hicks !  Welcome to the Atlassian Community!

A couple of things I can see.

You can use in as an "implicit OR" to simplify a few things.

Some of these should probably be grouped together inside parentheses.  I think that's what's going on with your JQL and the logic.

Here's my cleanup:

project in ("Business Analytics", IRR)  AND assignee is EMPTY AND statusCategory != Done AND ("Department[Short text]" ~ "Orientation & Student Success" OR "Department[Short text]" ~ "Diversity and Multicultural Affairs" OR "Department[Short text]" ~ "Career Services" OR "Department[Short text]" ~ "Academic Advising" OR "Department[Short text]" ~ "Thayne Center for Student Life, Leadership & Community Engagement" OR "Department[Short text]" ~ "TRIO & PACE Programs") AND labels in (internal-request, External-Request) AND reporter = 5b688af7304ed93c17e41c98   

 

Good luck!

Hi @Preston Hicks -- Welcome to the Atlassian Community!

For a query like that, try splitting it apart and rebuilding it incrementally.  I suspect you have an order of precedence problem with your AND and OR expressions.

  • List all of the things true for everything you expect first
    • something AND somethingElse AND oneMoreThing
  • To ensure correct precedence, try formatting to separate the AND and OR clauses using parentheses
    • something AND somethingElse AND oneMoreThing AND (idea OR otherIdea)
  • For multiple cases, pick one of the cases, and get it working...
  • Wrap that with parentheses...
  • And then add the next case, also wrapped with parentheses

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
Community showcase
Published in Jira

Do you use Jira Cloud with Microsoft Teams?

Hi, Jira users! Do you use Jira alongside Microsoft Teams? We want to hear how you’ve used the power of Jira Cloud and Microsoft Teams (via the Jira Cloud for Microsoft Teams app) to achieve a team...

481 views 3 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you