How can I find only issues where I am not one of the watchers?

Using the advanced search feature in the Issues section, I want to find all issues where I am NOT listed as a watcher (there can be multiple) and where I have at some point been the assignee. I've tried this:

assignee was estrom BEFORE now() and status != Closed AND watcher != currentUser() ORDER BY status ASC, key ASC

but it's still returning issues where I am listed in the watcher field. Where am I going wrong?

6 answers

1 accepted

2 votes

Ah, good, then I think you just need to tweak the watcher != bit. I think that is being read as "the watcher is not the current user". Looks right at a glance (and it completely confused me on my first comment too), but thinking about it, I think that will only match cases where the current user is the *only* watcher.

I think it needs to be "key not in watchedIssues()", because that says "check each issue, get the list of watchers and drop it if the current user is in there".

Torturous to explain in English, but it probably makes perfect sense in logic/computer

3 votes

Try:

assignee was estrom and key not in watchedIssues() and status != Closed ORDER BY status ASC, key ASC

Damn, I think I am the only one seeing my answer. lol.

No, I see your answer. But it's the same as Nic's, and my conversation with him started before you posted your answer.

Vote up since you were first

I have converted his comment as an answer.

@Esther Do you still have your email notifications? ;) Anyways, Nic deserves it for the explanation he gives. He is the man!

0 votes

Um, I'm stuck. You say you want to find issues where you are not a watcher (before the JQL, which, incidentally, looks like it should work), then say that it's returning issues where you are not listed in the watcher field. That sounds correct? I suspect a typo here?

You're right, Nic - that was a typo. It's supposed to say that it's still returning issues where I AM listed as a watcher.

In the query above it schould be watcher not in (currentUser()) since watcher != currentUser() does not work

I was wrong:watcher != currentUser() is working . Had a typo in my query

Thanks, Nic. That worked. If you want to post as an actual answer, I'll accept it.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,802 views 11 18
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot