From 984348dbea43263372f84fd4d9cf2a56f6a6112f Mon Sep 17 00:00:00 2001 From: Frédéric Buclin Date: Mon, 2 Aug 2010 03:34:14 +0200 Subject: Bug 583622: email_in.pl doesn't let me set timetracking fields r/a=mkanat --- Bugzilla/Bug.pm | 6 ------ Bugzilla/WebService/Bug.pm | 6 +++++- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index 6638573c6..b9fffe779 100644 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -3731,12 +3731,6 @@ sub map_fields { } $field_values{$field_name} = $params->{$field}; } - - # This protects the WebService Bug.search method. - unless (Bugzilla->user->is_timetracker) { - delete @field_values{qw(estimated_time remaining_time deadline)}; - } - return \%field_values; } diff --git a/Bugzilla/WebService/Bug.pm b/Bugzilla/WebService/Bug.pm index 625ca2541..8558e04f7 100644 --- a/Bugzilla/WebService/Bug.pm +++ b/Bugzilla/WebService/Bug.pm @@ -405,7 +405,11 @@ sub search { $params = Bugzilla::Bug::map_fields($params); delete $params->{WHERE}; - + + unless (Bugzilla->user->is_timetracker) { + delete $params->{$_} foreach qw(estimated_time remaining_time deadline); + } + # Do special search types for certain fields. if ( my $bug_when = delete $params->{delta_ts} ) { $params->{WHERE}->{'delta_ts >= ?'} = $bug_when; -- cgit v1.2.3-24-g4f1b