summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2013-01-21 23:36:36 +0100
committerDave Lawrence <dlawrence@mozilla.com>2013-01-21 23:36:36 +0100
commit9222cad6c1ee5bf6871112d27e8a4b08c208723c (patch)
treee8c861cc665a9d523e8e0ba9c636c51f5f66000e
parent3337e65897bff511a75f37761acb1632b034038f (diff)
downloadbugzilla-9222cad6c1ee5bf6871112d27e8a4b08c208723c.tar.gz
bugzilla-9222cad6c1ee5bf6871112d27e8a4b08c208723c.tar.xz
Bug 828127 - [Needinfo] One user can needinfo multiple times from the same person
r=glob
-rw-r--r--extensions/Needinfo/Extension.pm9
1 files changed, 9 insertions, 0 deletions
diff --git a/extensions/Needinfo/Extension.pm b/extensions/Needinfo/Extension.pm
index 98644f997..509b74fd4 100644
--- a/extensions/Needinfo/Extension.pm
+++ b/extensions/Needinfo/Extension.pm
@@ -107,6 +107,15 @@ sub bug_start_of_update {
$needinfo_flag->{requestee} = $needinfo_from;
}
+ # Find out if the requestee has already been used and skip if so
+ my $requestee_found;
+ foreach my $flag (@{ $type->{flags} }) {
+ next if $flag->requestee->login ne $needinfo_flag->{requestee};
+ $requestee_found = 1;
+ last;
+ }
+ next if $requestee_found;
+
if ($needinfo) {
push(@new_flags, $needinfo_flag);
last;