diff options
author | Dylan William Hardison <dylan@hardison.net> | 2014-09-09 16:32:40 -0400 |
---|---|---|
committer | Dylan William Hardison <dylan@hardison.net> | 2014-09-09 16:32:40 -0400 |
commit | 961fb4f72ecf393bcac58d69da1ac1509413179e (patch) | |
tree | 1a9672ee50c65f84e93f1bca800577e4bd8c688c /Bugzilla/Bug.pm | |
parent | e181022c27b291b845f029f0e8f25748cad8495f (diff) | |
download | bugs-961fb4f72ecf393bcac58d69da1ac1509413179e.tar bugs-961fb4f72ecf393bcac58d69da1ac1509413179e.tar.gz bugs-961fb4f72ecf393bcac58d69da1ac1509413179e.tar.bz2 bugs-961fb4f72ecf393bcac58d69da1ac1509413179e.tar.xz bugs-961fb4f72ecf393bcac58d69da1ac1509413179e.zip |
Bug 1053513 - remove last-visited entries when a user removes involvement from a bug
r/a=glob
Diffstat (limited to 'Bugzilla/Bug.pm')
-rw-r--r-- | Bugzilla/Bug.pm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index d03c63768..223ca1ae0 100644 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -1134,6 +1134,13 @@ sub update { $self->update_user_last_visit($user, $delta_ts); } + # If a user is no longer involved, remove their last visit entry + my $last_visits = + Bugzilla::BugUserLastVisit->match({ bug_id => $self->id }); + foreach my $lv (@$last_visits) { + $lv->remove_from_db() unless $lv->user->is_involved_with_bug($self); + } + # Update bug ignore data if user wants to ignore mail for this bug if (exists $self->{'bug_ignored'}) { my $bug_ignored_changed; |