From 02f040862148243081d016cb33161f9033bab95c Mon Sep 17 00:00:00 2001 From: Frédéric Buclin Date: Tue, 27 Sep 2011 13:12:21 +0200 Subject: Bug 655652: Remove "internals" field from Product.get r=glob a=LpSolit --- Bugzilla/WebService/Product.pm | 44 +++++++++++++++++++++++++++++++++--------- 1 file changed, 35 insertions(+), 9 deletions(-) (limited to 'Bugzilla/WebService') diff --git a/Bugzilla/WebService/Product.pm b/Bugzilla/WebService/Product.pm index a355e63d9..842657575 100644 --- a/Bugzilla/WebService/Product.pm +++ b/Bugzilla/WebService/Product.pm @@ -122,11 +122,13 @@ sub _product_to_hash { my ($self, $params, $product) = @_; my $field_data = { - internals => $product, id => $self->type('int', $product->id), name => $self->type('string', $product->name), description => $self->type('string', $product->description), 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), }; if (filter_wants($params, 'components')) { $field_data->{components} = [map { @@ -146,6 +148,20 @@ 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 { @@ -333,6 +349,20 @@ C A description of the product, which may contain HTML. C A boolean indicating if the product is active. +=item C + +C The name of the default milestone for the product. + +=item C + +C Indicates whether the UNCONFIRMED bug status is available +for this product. + +=item C + +C Contains the classification C, C, C +and C as keys. + =item C C An array of hashes, where each hash describes a component, and has the @@ -386,12 +416,6 @@ following items: C, C and C. C An array of hashes, where each hash describes a milestone, and has the following items: C, C and C. -=item C - -B - -An internal representation of the product. - =back Note, that if the user tries to access a product that is not in the @@ -407,8 +431,10 @@ is returned. =item In Bugzilla B<4.2>, C was added as an input parameter. -=item In Bugzilla B<4.2> C, C, and C -were added to the fields returned by C. +=item In Bugzilla B<4.2>, C, C, C, +C, C and C were added to +the fields returned by C as a replacement for C, which has +been removed. =back -- cgit v1.2.3-24-g4f1b