From 324f00d76a2f33421c047d4e86a17bb6fa34b416 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Wed, 18 Jun 2014 11:46:04 +0800 Subject: Bug 1026862: updating a bug via an api or bulk bug update clears the mentor field --- extensions/Review/Extension.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/Review/Extension.pm b/extensions/Review/Extension.pm index ac7cb7233..4fd32e3bd 100644 --- a/extensions/Review/Extension.pm +++ b/extensions/Review/Extension.pm @@ -178,7 +178,7 @@ sub object_end_of_create { if (_is_countable_flag($object)) { $self->_log_flag_state_activity($object, $object->status); } - elsif ($object->isa('Bugzilla::Bug')) { + elsif ($object->isa('Bugzilla::Bug') && exists Bugzilla->input_params->{bug_mentors}) { my ($new, $new_users) = _new_users_from_input('bug_mentors'); _update_users($object, [], $new_users); } @@ -222,7 +222,7 @@ sub object_end_of_update { _adjust_request_count($object, +1); } } - elsif ($object->isa('Bugzilla::Bug')) { + elsif ($object->isa('Bugzilla::Bug') && exists Bugzilla->input_params->{bug_mentors}) { my ($new, $new_mentors) = _new_users_from_input('bug_mentors'); my $old = join(", ", map { $_->login } @{ $old_object->mentors }); if ($old ne $new) { -- cgit v1.2.3-24-g4f1b