Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-64143

The JQL "watcher != user" and "watcher not in" are not working.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Low
    • None
    • None
    • JQL
    • None

    Description

      NOTE: This bug report is for JIRA Server. Using JIRA Cloud? See the corresponding bug report.

      Summary

      The JQL searches "watcher !=" and "watcher not in" are not working properly, they will return only issues where there is a watcher and it's not the user.

      Steps to Reproduce

      1. Create a new project (ex: TEST)
      2. Create a new issue (ex: TEST-1)
      3. Create two users, admin1 and admin2
      4. Perform the JQL search: project = TEST and watcher != admin1, it will not return any issue.
      5. Add admin2 as watcher in TEST-1.
      6. Perform the JQL search: project = TEST and watcher != admin1, it will return the issue TEST-1.

      Expected Results

      The JQL "watcher != user" should return all issues where the user is not a watcher.

      Actual Results

      The JQL "watcher != user" only returns issues where the user is not a watcher and there is at least one watcher. Issues

      Details

      When we define a user as a watcher, we actually create a relationship, that is an entry in the userassociation table of the type WatchIssue. So when we tell Jira watcher != currentUser() what it does is search relationships of watchers that don't match the current user.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              aschneider@atlassian.com Adalberto Schneider
              Votes:
              16 Vote for this issue
              Watchers:
              14 Start watching this issue

              Dates

                Created:
                Updated: