Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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

Filters: watchers where current user is not an assignee - returning incorrect results

I am attempting to create a filter that will show all tickets I am watching, but am not assigned to. I know that I am watching six tickets on my company's JIRA system, and I know I am assigned to only one of those tickets.

This Query works as expected:
watcher = currentUser() ORDER BY updatedDate DESC 
=> Results in six tickets

This Query Works as expected:
watcher = currentUser() AND assignee = currentUser() ORDER BY updatedDate DESC
=> Finds one ticket that I am watching and assigned to

This Query does not work:
watcher = currentUser() AND assignee != currentUser() ORDER BY updatedDate DESC
=> Finds ONE ticket, there are four missing tickets

I noticed there is one difference between the four tickets that were not found and the one ticket that was found. The ticket that was returned has a user assigned to it, all the other users are unassigned.


I have attempted these variations:
watcher = currentUser() AND assignee not in (currentUser()) ORDER BY updatedDate DESC
issue in watchedIssues() AND assignee not in (currentUser()) ORDER BY updatedDate DESC
issue in watchedIssues() AND assignee != currentUser() ORDER BY updatedDate DESC
issue in watchedIssues() AND NOT assignee = currentUser() ORDER BY updatedDate DESC

All of these variations give me the same results.

My company is currently using JIRA v6.3.1.

UPDATE:

I have tried this search too:

watcher = currentUser() AND assignee is EMPTY ORDER BY updatedDate DESC
=> Results in the four unassigned tickets
watcher = currentUser() AND assignee is EMPTY AND NOT assignee = currentUser() ORDER BY updatedDate DESC
=> No tickets

I think I am getting closer but it seams like I am still missing something.

3 answers

1 accepted

6 votes
Answer accepted

This seams to work, the comparator was the important piece that I was missing.

watcher = currentUser() AND (assignee is EMPTY OR assignee != currentUser()) ORDER BY updatedDate DESC

It seems like a bug that "assignee != currentUser()" does not cover assignee is EMPTY... logically if assignee is EMPTY, it's also != currentUser().

Agreed Dave H.  "assignee is EMPTY" shouldn't be necessary but at least the filter works correctly now.  Thanks ckdesigns!

if you think of EMPTY as NULL, it would make sense that NULL does not return as "not equal to" a value since there is nothign to compare. It's not uncommon in languages. 

EMPTY is unassigned

Thank you so much, so happy I finally found this query!!!! 

Same with the Watcher.

(watcher != currentUser() OR watcher = empty)

did the trick for me. Just having the watcher != currentUser() gives me empty filters

Thank you! This is exactly what I was looking for! 

Thank you! This has been a great help!

Suggest an answer

Log in or Sign up to answer
TAGS

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