summaryrefslogtreecommitdiffstats
path: root/Bugzilla/WebService
diff options
context:
space:
mode:
authorDavid Lawrence <dlawrence@mozilla.com>2011-09-30 23:50:01 +0200
committerDavid Lawrence <dlawrence@mozilla.com>2011-09-30 23:50:01 +0200
commit77f1cffd26e4e306b46558142a432acdbb67b9f1 (patch)
treee79f3e29d233c0afbc8c7928b408b8a6119847dc /Bugzilla/WebService
parentf6e81df17967ab414235bcc12d3432df69192f1a (diff)
parentf517974618ba835014e9d2a3565109af469f5d34 (diff)
downloadbugzilla-77f1cffd26e4e306b46558142a432acdbb67b9f1.tar.gz
bugzilla-77f1cffd26e4e306b46558142a432acdbb67b9f1.tar.xz
merged with bugzilla/4.2
Diffstat (limited to 'Bugzilla/WebService')
-rw-r--r--Bugzilla/WebService/Bug.pm4
-rw-r--r--Bugzilla/WebService/Product.pm48
2 files changed, 39 insertions, 13 deletions
diff --git a/Bugzilla/WebService/Bug.pm b/Bugzilla/WebService/Bug.pm
index da2393033..fb2b7b65d 100644
--- a/Bugzilla/WebService/Bug.pm
+++ b/Bugzilla/WebService/Bug.pm
@@ -204,7 +204,7 @@ sub _legal_field_values {
name => $self->type('string', $status->name),
is_open => $self->type('boolean', $status->is_open),
sort_key => $self->type('int', $status->sortkey),
- sortkey => $self->type('int', $status->sortkey), # depricated
+ sortkey => $self->type('int', $status->sortkey), # deprecated
can_change_to => \@can_change_to,
visibility_values => [],
});
@@ -218,7 +218,7 @@ sub _legal_field_values {
push(@result, {
name => $self->type('string', $value->name),
sort_key => $self->type('int' , $value->sortkey),
- sortkey => $self->type('int' , $value->sortkey), # depricated
+ sortkey => $self->type('int' , $value->sortkey), # deprecated
visibility_values => [
defined $vis_val ? $self->type('string', $vis_val->name)
: ()
diff --git a/Bugzilla/WebService/Product.pm b/Bugzilla/WebService/Product.pm
index 9aeb8597a..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 {
@@ -318,7 +334,7 @@ hashes. Each hash describes a product, and has the following items:
=item C<id>
-C<int> An integer id uniquely idenfifying the product in this installation only.
+C<int> An integer id uniquely identifying the product in this installation only.
=item C<name>
@@ -333,6 +349,20 @@ C<string> A description of the product, which may contain HTML.
C<boolean> A boolean indicating if the product is active.
+=item C<default_milestone>
+
+C<string> The name of the default milestone for the product.
+
+=item C<has_unconfirmed>
+
+C<boolean> Indicates whether the UNCONFIRMED bug status is available
+for this product.
+
+=item C<classification>
+
+C<hash> Contains the classification C<id>, C<name>, C<description>
+and C<sort_key> as keys.
+
=item C<components>
C<array> An array of hashes, where each hash describes a component, and has the
@@ -342,7 +372,7 @@ following items:
=item C<id>
-C<int> An integer id uniquely idenfifying the component in this installation
+C<int> An integer id uniquely identifying the component in this installation
only.
=item C<name>
@@ -386,12 +416,6 @@ following items: C<name>, C<sort_key> and C<is_active>.
C<array> An array of hashes, where each hash describes a milestone, and has the
following items: C<name>, C<sort_key> and C<is_active>.
-=item C<internals>
-
-B<UNSTABLE>
-
-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<names> was added as an input parameter.
-=item In Bugzilla B<4.2> C<components>, C<versions>, and C<milestones>
-were added to the fields returned by C<get>.
+=item In Bugzilla B<4.2>, C<classification>, C<components>, C<versions>,
+C<milestones>, C<default_milestone> and C<has_unconfirmed> were added to
+the fields returned by C<get> as a replacement for C<internals>, which has
+been removed.
=back