Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
720408cb
Commit
720408cb
authored
Sep 27, 2011
by
Frédéric Buclin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 655652: Remove "internals" field from Product.get
r=glob a=LpSolit
parent
67346e9e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
9 deletions
+35
-9
Product.pm
Bugzilla/WebService/Product.pm
+35
-9
No files found.
Bugzilla/WebService/Product.pm
View file @
720408cb
...
...
@@ -189,11 +189,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
{
...
...
@@ -213,6 +215,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
{
...
...
@@ -400,6 +416,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
...
...
@@ -453,12 +483,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
...
...
@@ -474,8 +498,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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment