Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

JQL search for 'reporter' and 'watcher' ignores 'Project'

I'm trying to do a search that displays all active tickets the 'jira-customer-success' group has reported or is watching. 

My queries work for 'reporter' and 'watcher' separately, but when I combine them, I get hundreds of unexpected results of all different 'project' types, not just "Customer Engineering".

 

Member in the CSM group = Reporter <-- Working

project = "Customer Engineering" AND reporter in membersOf(jira-customer-success) AND status != Closed AND status != Closed AND status != Done

 

Member in the CSM group = Watcher <-- Working

project = "Customer Engineering" AND watcher in membersOf(jira-customer-success) AND status != Closed AND status != Closed AND status != Done

 

Member in the CSM group = Reporter OR Watcher <-- Doesn't Work

project = "Customer Engineering" AND reporter in membersOf(jira-customer-success) OR watcher in membersOf(jira-customer-success) AND status != Closed AND status != Closed AND status != Done

2 answers

2 accepted

3 votes
Answer accepted
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jul 06, 2021

Hi Edgar - Welcome to the Atlassian Community!

You probably just need to add some parentheses. Try this:

project = "Customer Engineering" AND (reporter in membersOf(jira-customer-success) OR watcher in membersOf(jira-customer-success)) AND status != Closed AND status != Closed AND status != Done

Hi John - Thanks for the welcome and the answer!  

Like John Funk likes this
2 votes
Answer accepted
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jul 06, 2021

Mixing and matching "or" with "and" confuses humans very easily.  You have to try to think about how the computer is reading it, and we don't instinctively see it the same way as them.

The answer with mixed and/or searches is almost always parentheses.  It's the grammar of searches to computers.

If you break down your query into clauses, just by line, it reads:

project = "Customer Engineering" AND reporter in membersOf(jira-customer-success)

OR watcher in membersOf(jira-customer-success) AND status != Closed AND status != Closed AND status != Done

The OR in the middle is breaking the search into two parts, each section of which is returning a lot more than you are really looking for.  So you get a list of everything matching both.

Try grouping the OR inside a people clause (note the bold on the () I added):

project = "Customer Engineering" AND (reporter in membersOf(jira-customer-success) OR watcher in membersOf(jira-customer-success)AND status != Closed AND status != Closed AND status != Done

Or, because I'm the type who optimises too much:

project = "Customer Engineering" AND (reporter in membersOf(jira-customer-success) OR watcher in membersOf(jira-customer-success)AND status NOT in (Closed, Done)

The computer does not know where you are drawing breath to pronounce your question in a way other (English speaking) humans would hear it.  We'd use commas more than parenthesis, but the punctuation really matters when you write it.  (Consider "Let's eat Grandma" vs "Let's eat, Grandma" for example)

Thanks for the great explanation on 'OR', it makes a lot of sense.  In my head, I was reading as reporter OR watcher, but I can now see how the computer can read it as 1st part of the string OR the 2nd part.  

Parentheses to save the day!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events