]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 689862: Fix Product.get to only return the Classification name,
authorTiago Mello <timello@gmail.com>
Sat, 15 Oct 2011 15:10:06 +0000 (12:10 -0300)
committerTiago Mello <timello@gmail.com>
Sat, 15 Oct 2011 15:10:06 +0000 (12:10 -0300)
instead of all the classification info.
r/a=LpSolit

Bugzilla/WebService/Product.pm

index 842657575aea124ebb00fc837200bff4d76a1985..3414be4fd53a02af51e2cb0a8461f1b82f2b0b8c 100644 (file)
@@ -128,7 +128,7 @@ sub _product_to_hash {
         is_active   => $self->type('boolean', $product->is_active),
         default_milestone => $self->type('string', $product->default_milestone),
         has_unconfirmed   => $self->type('boolean', $product->allows_unconfirmed),
-        classification => $self->_classification_to_hash($product->classification),
+        classification => $self->type('string', $product->classification->name),
     };
     if (filter_wants($params, 'components')) {
         $field_data->{components} = [map {
@@ -148,20 +148,6 @@ sub _product_to_hash {
     return filter($params, $field_data);
 }
 
-sub _classification_to_hash {
-    my ($self, $classification) = @_;
-    return {
-        id =>
-            $self->type('int', $classification->id),
-        name =>
-            $self->type('string', $classification->name),
-        description =>
-            $self->type('string' , $classification->description),
-        sort_key =>
-            $self->type('int', $classification->sortkey),
-    };
-}
-
 sub _component_to_hash {
     my ($self, $component) = @_;
     return {
@@ -360,8 +346,7 @@ for this product.
 
 =item C<classification>
 
-C<hash> Contains the classification C<id>, C<name>, C<description>
-and C<sort_key> as keys.
+C<string> The classification name for the product.
 
 =item C<components>