Defect #5678

Notifications maintained even after you remove a user.

Added by Alexey Kiryanov over 9 years ago. Updated over 4 years ago.

Status:ClosedStart date:2010-06-12
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Email notifications
Target version:-
Resolution:Cant reproduce Affected version:0.9.3

Description

I removed user from the member list but he still got e-mail notifications on the forum posts in that project (project wasn't public) with the text, of course.
I do understand that it's not really a defect, but deleting user from a private project I assume that he wouldn't be able to peek at any content within that project.

History

#1 Updated by Alexey Kiryanov over 9 years ago

forgot to mention:

Postgresql 8.1
ruby 1.8.7
Rails 2.3.5

#2 Updated by Felix Schäfer over 9 years ago

This is a defect alright, but it has already been tackled, see e.g. #3589. Can you give a way to reproduce this (and especially reproduce that yourself)? Please also give more info about your environment, see SubmittingBugs for what else we need.

#3 Updated by Alexey Kiryanov over 9 years ago

ok.

ruby script/about:

About your application's environment
Ruby version              1.8.7 (x86_64-linux)
RubyGems version          1.3.7
Rack version              1.0
Rails version             2.3.5
Active Record version     2.3.5
Active Resource version   2.3.5
Action Mailer version     2.3.5
Active Support version    2.3.5
Application root          /home/redmine
Environment               production
Database adapter          postgresql
Database schema version   20100221100219

About your Redmine plugins
Redmine Wiki Extensions plugin   0.2.2

PostgreSQL server isn't on the localhost.

Trying to reproduce it:
  1. Before I begin:
     select id, login from users order by id;
    id | login
    ----+--------
    1 | admin
    3 | fe328
    6 | user1
    select value from settings where name='notified_events';
    value
    ------------------------
    ---
    - issue_added
    - issue_updated
    - news_added
    - document_added
    - file_added
    - message_posted
    - wiki_content_added
    - wiki_content_updated
  2. Creating a project 'test' (private).
    testing:
    select id, name, is_public, status, lft, rgt from projects where name='test';
    id | name | is_public | status | lft | rgt
    ----+------+-----------+--------+-----+-----
    7 | test | f | 1 | 3 | 4
  3. Adding users to the project.
    testing:
    select user_id, project_id, mail_notification from members where project_id=7;
    user_id | project_id | mail_notification
    ---------+------------+-------------------
    3 | 7 | f
    6 | 7 | f
  4. Adding a board. (as fe328)
    testing:
    select * from boards where project_id=7;
    id | project_id | name | description | position | topics_count | messages_count | last_message_id
    ----+------------+------------+-------------+----------+--------------+----------------+-----------------
    11 | 7 | test forum | test | 1 | 0 | 0 |
  5. Adding a message. (as fe328)
    testing:
    select id, subject, author_id from messages where board_id=11;
    id | subject | author_id
    ----+---------------+-----------
    9 | test message. | 3
    select * from watchers where watchable_id=9;
    id | watchable_type | watchable_id | user_id
    ----+----------------+--------------+---------
    7 | Message | 9 | 3
  6. Replying to that message. (as user1)
    testing:
    select id, subject, author_id, replies_count from messages where board_id=11;
    id | subject | author_id | replies_count
    ----+-------------------+-----------+---------------
    9 | test message. | 3 | 1
    10 | RE: test message. | 6 | 0

    fe328 got a notification.
  1. Removing fe328 from the project. (as admin)
    testing:
    select user_id, project_id, mail_notification from members where project_id=7;
    user_id | project_id | mail_notification
    ---------+------------+-------------------
    6 | 7 | f
    select * from watchers where watchable_id=9;
    id | watchable_type | watchable_id | user_id
    ----+----------------+--------------+---------
    8 | Message | 9 | 6

    seems ok.
  1. Replying once again. (as user1)
    testing:
    select id, subject, author_id, replies_count from messages where board_id=11;
    id | subject | author_id | replies_count
    ----+-------------------+-----------+---------------
    9 | test message. | 3 | 2
    11 | RE: test message. | 6 | 0
    10 | RE: test message. | 6 | 0

    No notifications. Works just as it supposed to work.
  1. Replying once again. (as admin)
    testing:
    select id, subject, author_id, replies_count from messages where board_id=11;
    id | subject | author_id | replies_count
    ----+-------------------+-----------+---------------
    9 | test message. | 3 | 3
    12 | RE: test message. | 1 | 0
    11 | RE: test message. | 6 | 0
    10 | RE: test message. | 6 | 0
    select * from watchers where watchable_id=9;
    id | watchable_type | watchable_id | user_id
    ----+----------------+--------------+---------
    9 | Message | 9 | 1
    8 | Message | 9 | 6

    fe328 GOT notification
    Seams like this only happens if you post as administrator. But It's probably still wrong behavior.
NOTES:
  • SQL used only to view information. No alteration was made there.
  • Only related information displayed in SQL results (for example - the user list)

#4 Updated by Felix Schäfer over 9 years ago

The info and way to reproduce look good, I'll try to have a look later on.

#5 Updated by Felix Schäfer over 9 years ago

Alexey Kiryanov wrote:

  1. Replying once again. (as admin)
    testing:
    [...]
    fe328 GOT notification
    Seams like this only happens if you post as administrator. But It's probably still wrong behavior.

See if the user watches anything else, like the board or the project.

#6 Updated by Alexey Kiryanov over 9 years ago

Felix Schäfer wrote:

Alexey Kiryanov wrote:

  1. Replying once again. (as admin)
    testing:
    [...]
    fe328 GOT notification
    Seams like this only happens if you post as administrator. But It's probably still wrong behavior.

See if the user watches anything else, like the board or the project.

Nope.

select * from watchers;
id | watchable_type | watchable_id | user_id
----+----------------+--------------+---------
6 | Message | 5 | 1
8 | Message | 9 | 6
9 | Message | 9 | 1
(3 rows)

#7 Updated by Daniel Felix almost 7 years ago

  • Subject changed from notifications maintained even after you remove a user. to Notifications maintained even after you remove a user.
  • Status changed from New to Needs feedback

Can you confirm this bug? Is this still reproduceable in Redmine 2.2.1 and/or trunk?

The affected version is fairly outdated and the latest comment is more than 2 years ago.

#8 Updated by Alexey Kiryanov almost 7 years ago

I personaly won't be able to confirm this as I stoped using redmine (still enjoyed using it though)

#9 Updated by Toshi MARUYAMA almost 7 years ago

  • Category set to Email notifications

#10 Updated by Go MAEDA over 4 years ago

  • Status changed from Needs feedback to Closed
  • Resolution set to Cant reproduce

0.9.3 is very old and none can reproduce the problem now. Maybe fixed in #3589.
Closing.

Also available in: Atom PDF