summaryrefslogtreecommitdiffstats
path: root/extensions/MyDashboard
diff options
context:
space:
mode:
authorDavid Lawrence <dkl@mozilla.com>2015-03-30 16:43:50 +0200
committerDavid Lawrence <dkl@mozilla.com>2015-03-30 16:43:50 +0200
commitf45322b31e660ce344cd2859e56f4a2f129eefa5 (patch)
treea51e639ae6400721555e1372a613e17e22b3eebd /extensions/MyDashboard
parent926e010ef373d0d9421754c81917ab9ca4bd3469 (diff)
downloadbugzilla-f45322b31e660ce344cd2859e56f4a2f129eefa5.tar.gz
bugzilla-f45322b31e660ce344cd2859e56f4a2f129eefa5.tar.xz
Bug 1141770: merge_users.pl fails if the two accounts have accessed the same bug and is in the bug_interest table
Diffstat (limited to 'extensions/MyDashboard')
-rw-r--r--extensions/MyDashboard/Extension.pm10
1 files changed, 10 insertions, 0 deletions
diff --git a/extensions/MyDashboard/Extension.pm b/extensions/MyDashboard/Extension.pm
index d79e3e2ec..97b1d9d14 100644
--- a/extensions/MyDashboard/Extension.pm
+++ b/extensions/MyDashboard/Extension.pm
@@ -235,4 +235,14 @@ sub bug_end_of_update {
}
}
+sub merge_users_before {
+ my ($self, $args) = @_;
+ my $old_id = $args->{old_id};
+ my $dbh = Bugzilla->dbh;
+
+ # If the bug_interest table has both the source user
+ # and destination user, then we remove the old user entry.
+ $dbh->do("DELETE FROM bug_interest WHERE user_id = ?", undef, $old_id);
+}
+
__PACKAGE__->NAME;