summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Bugzilla/Bug.pm6
-rw-r--r--Bugzilla/WebService/Bug.pm6
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;