]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 583622: email_in.pl doesn't let me set timetracking fields
authorFrédéric Buclin <LpSolit@gmail.com>
Mon, 2 Aug 2010 01:36:05 +0000 (03:36 +0200)
committerFrédéric Buclin <LpSolit@gmail.com>
Mon, 2 Aug 2010 01:36:05 +0000 (03:36 +0200)
r/a=mkanat

Bugzilla/Bug.pm
Bugzilla/WebService/Bug.pm

index 3c7eb3d5c26df41e0745e3c1a31e1f9bdae0f722..bcc7b2aeb05b87833cc42814ec6721838c72bdc9 100644 (file)
@@ -3725,12 +3725,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;
 }
 
index fd680b9bbc8a40d2010d42f1fc4d10e3ca549a4c..6e76313d9ddeb7a526fdb13ec6b429fc8912d2cb 100644 (file)
@@ -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;