summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2007-08-08 20:07:35 +0200
committerlpsolit%gmail.com <>2007-08-08 20:07:35 +0200
commit8d9074a59f0bfa4b79256e5524a447397e3490de (patch)
tree3ba3a4277bd23f977bf22f7eb9ad8daff5c9fee8 /Bugzilla
parenta33a5f6ed8bf4f8c20ccad3d4cc379059cdc2fbd (diff)
downloadbugzilla-8d9074a59f0bfa4b79256e5524a447397e3490de.tar.gz
bugzilla-8d9074a59f0bfa4b79256e5524a447397e3490de.tar.xz
Bug 376061: Changing the requestee of a flag should not change the requester if the one doing the change is the requestee himself - Patch by Frédéric Buclin <LpSolit@gmail.com> r=myk a=LpSolit
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Flag.pm12
1 files changed, 10 insertions, 2 deletions
diff --git a/Bugzilla/Flag.pm b/Bugzilla/Flag.pm
index 19ecf7fa9..a6914a661 100644
--- a/Bugzilla/Flag.pm
+++ b/Bugzilla/Flag.pm
@@ -763,6 +763,14 @@ sub modify {
notify($flag, $bug, $attachment);
}
elsif ($status eq '?') {
+ # If the one doing the change is the requestee, then this means he doesn't
+ # want to reply to the request and he simply reassigns the request to
+ # someone else. In this case, we keep the requester unaltered.
+ my $new_setter = $setter;
+ if ($flag->requestee && $flag->requestee->id == $setter->id) {
+ $new_setter = $flag->setter;
+ }
+
# Get the requestee, if any.
my $requestee_id;
if ($requestee_email) {
@@ -782,11 +790,11 @@ sub modify {
SET setter_id = ?, requestee_id = ?,
status = ?, modification_date = ?
WHERE id = ?',
- undef, ($setter->id, $requestee_id, $status,
+ undef, ($new_setter->id, $requestee_id, $status,
$timestamp, $flag->id));
# Now update the flag object with its new values.
- $flag->{'setter'} = $setter;
+ $flag->{'setter'} = $new_setter;
$flag->{'status'} = $status;
# Send an email notifying the relevant parties about the request.