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
d8370a5a
Commit
d8370a5a
authored
Nov 01, 2006
by
mkanat%bugzilla.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 356816: Make the webservice able to list products
Patch By Mads Bondo Dydensborg <mbd@dbc.dk> r=mkanat, a=myk
parent
bd2d75cb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
72 additions
and
0 deletions
+72
-0
Product.pm
Bugzilla/WebService/Product.pm
+72
-0
No files found.
Bugzilla/WebService/Product.pm
View file @
d8370a5a
...
@@ -13,12 +13,32 @@
...
@@ -13,12 +13,32 @@
# The Original Code is the Bugzilla Bug Tracking System.
# The Original Code is the Bugzilla Bug Tracking System.
#
#
# Contributor(s): Marc Schumann <wurblzap@gmail.com>
# Contributor(s): Marc Schumann <wurblzap@gmail.com>
# Mads Bondo Dydensborg <mbd@dbc.dk>
package
Bugzilla::WebService::
Product
;
package
Bugzilla::WebService::
Product
;
use
strict
;
use
strict
;
use
base
qw(Bugzilla::WebService)
;
use
base
qw(Bugzilla::WebService)
;
use
Bugzilla::
Product
;
use
Bugzilla::
Product
;
use
Bugzilla::
User
;
# Get the ids of the products the user can search
sub
get_selectable_products
{
return
{
ids
=>
[
map
{
$_
->
id
}
@
{
Bugzilla
->
user
->
get_selectable_products
}]};
}
# Get the ids of the products the user can enter bugs against
sub
get_enterable_products
{
return
{
ids
=>
[
map
{
$_
->
id
}
@
{
Bugzilla
->
user
->
get_enterable_products
}]};
}
# Get the union of the products the user can search and enter bugs against.
sub
get_accessible_products
{
my
%
union
=
();
map
$union
{
$_
->
id
}
=
1
,
@
{
Bugzilla
->
user
->
get_selectable_products
};
map
$union
{
$_
->
id
}
=
1
,
@
{
Bugzilla
->
user
->
get_enterable_products
};
return
{
ids
=>
[
keys
%
union
]
};
}
sub
get_product
{
sub
get_product
{
my
$self
=
shift
;
my
$self
=
shift
;
...
@@ -34,3 +54,55 @@ sub get_product {
...
@@ -34,3 +54,55 @@ sub get_product {
}
}
1
;
1
;
__END__
=head1 NAME
Bugzilla::Webservice::User - The Product API
=head1 DESCRIPTION
This part of the Bugzilla API allows you to list the available Products and
get information about them.
=head1 METHODS
See L<Bugzilla::WebService> for a description of what B<STABLE>, B<UNSTABLE>,
and B<EXPERIMENTAL> mean, and for more information about error codes.
=head2 List Products
=over
=item C<get_selectable_products> B<UNSTABLE>
Description: Returns a list of the ids of the products the user can search on.
Params: none
Returns: A hash containing one item, C<ids>, that contains an array
of product ids.
=item C<get_enterable_products> B<UNSTABLE>
Description: Returns a list of the ids of the products the user can enter bugs
against.
Params: none
Returns: A hash containing one item, C<ids>, that contains an array
of product ids.
=item C<get_accessible_products> B<UNSTABLE>
Description: Returns a list of the ids of the products the user can search or
enter bugs against.
Params: none
Returns: A hash containing one item, C<ids>, that contains an array
of product ids.
=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