User cannot stop watching pages

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Problem

User tries to remove its on watch from a page from the "Manage Watchers" panel. The user is removed from the list, but appears again after closing the "Manage Watchers" panel and reopening it. The notifications from the watch keep being sent for the page. Please note that it happens even if the user is not watching a parent page or the space.

No error messages are displayed on the log files.

Diagnosis

Diagnostic Steps

  • Run query below and check if any results are returned:

    SELECT n.notificationid,
           n.username,
           n.creationdate,
           u.lower_username
    FROM NOTIFICATIONS n
    JOIN user_mapping u ON n.username=u.user_key
    WHERE n.username IN
        (SELECT user_key
         FROM user_mapping
         WHERE username IN
             (SELECT username
              FROM user_mapping
              GROUP BY username
              HAVING count(username) > 1)
           AND lower_username NOT IN
             (SELECT lower_user_name
              FROM cwd_user))
    ORDER BY u.username;

    In case there are results, check if the affected user is listed on the lower_username column.

Cause

There are multiple entries for the same username on database table user_mapping, but a single entry for this user on database table cwd_user. The watch is configured for an account that is not on cwd_user, therefore is not removed.

Workaround

  • Remove the watches for a user on a page by manually by running the query, replacing <username> by the correspondent value for the user obtained on the previous query, and <page_id> by the ID of the page to be unwatched:

    DELETE from NOTIFICATIONS where username ='<username>' AND contentid=<page_id>;


    Always back up your data before performing any modifications to the database. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.



Last modified on Dec 21, 2017

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.