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
102f50dc
Commit
102f50dc
authored
Nov 04, 2012
by
Frank Becker
Committed by
Frédéric Buclin
Nov 04, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 741722: Product.get should include flag_types information
r=dkl a=LpSolit
parent
51381c02
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
108 additions
and
3 deletions
+108
-3
Product.pm
Bugzilla/WebService/Product.pm
+108
-3
No files found.
Bugzilla/WebService/Product.pm
View file @
102f50dc
...
...
@@ -209,7 +209,7 @@ sub _product_to_hash {
};
if
(
filter_wants
(
$params
,
'components'
))
{
$field_data
->
{
components
}
=
[
map
{
$self
->
_component_to_hash
(
$_
)
$self
->
_component_to_hash
(
$_
,
$params
)
}
@
{
$product
->
components
}];
}
if
(
filter_wants
(
$params
,
'versions'
))
{
...
...
@@ -226,8 +226,8 @@ sub _product_to_hash {
}
sub
_component_to_hash
{
my
(
$self
,
$component
)
=
@_
;
return
{
my
(
$self
,
$component
,
$params
)
=
@_
;
my
$field_data
=
{
id
=>
$self
->
type
(
'int'
,
$component
->
id
),
name
=>
...
...
@@ -243,7 +243,47 @@ sub _component_to_hash {
0
,
is_active
=>
$self
->
type
(
'boolean'
,
$component
->
is_active
),
flag_types
=>
{
bug
=>
[
map
{
$self
->
_flag_type_to_hash
(
$_
,
$params
)
}
@
{
$component
->
flag_types
->
{
'bug'
}}],
attachment
=>
[
map
{
$self
->
_flag_type_to_hash
(
$_
,
$params
)
}
@
{
$component
->
flag_types
->
{
'attachment'
}}],
}
};
return
filter
(
$params
,
$field_data
,
'component'
);
}
sub
_flag_type_to_hash
{
my
(
$self
,
$flag_type
,
$params
)
=
@_
;
my
$field_data
=
{
id
=>
$self
->
type
(
'int'
,
$flag_type
->
id
),
name
=>
$self
->
type
(
'string'
,
$flag_type
->
name
),
description
=>
$self
->
type
(
'string'
,
$flag_type
->
description
),
cc_list
=>
$self
->
type
(
'string'
,
$flag_type
->
cc_list
),
sort_key
=>
$self
->
type
(
'int'
,
$flag_type
->
sortkey
),
is_active
=>
$self
->
type
(
'boolean'
,
$flag_type
->
is_active
),
is_requestable
=>
$self
->
type
(
'boolean'
,
$flag_type
->
is_requestable
),
is_requesteeble
=>
$self
->
type
(
'boolean'
,
$flag_type
->
is_requesteeble
),
is_multiplicable
=>
$self
->
type
(
'boolean'
,
$flag_type
->
is_multiplicable
),
grant_group
=>
$self
->
type
(
'int'
,
$flag_type
->
grant_group_id
),
request_group
=>
$self
->
type
(
'int'
,
$flag_type
->
request_group_id
),
};
return
filter
(
$params
,
$field_data
,
'flag_type'
);
}
sub
_version_to_hash
{
...
...
@@ -469,6 +509,68 @@ and then secondly by their name.
C<boolean> A boolean indicating if the component is active. Inactive
components are not enabled for new bugs.
=item C<flag_types>
A hash containing the two items C<bug> and C<attachment> that each contains an
array of hashes, where each hash describes a flagtype, and has the
following items:
=over
=item C<id>
C<int> Returns the ID of the flagtype.
=item C<name>
C<string> Returns the name of the flagtype.
=item C<description>
C<string> Returns the description of the flagtype.
=item C<cc_list>
C<string> Returns the concatenated CC list for the flagtype, as a single string.
=item C<sort_key>
C<int> Returns the sortkey of the flagtype.
=item C<is_active>
C<boolean> Returns whether the flagtype is active or disabled. Flags being
in a disabled flagtype are not deleted. It only prevents you from
adding new flags to it.
=item C<is_requestable>
C<boolean> Returns whether you can request for the given flagtype
(i.e. whether the '?' flag is available or not).
=item C<is_requesteeble>
C<boolean> Returns whether you can ask someone specifically or not.
=item C<is_multiplicable>
C<boolean> Returns whether you can have more than one flag for the given
flagtype in a given bug/attachment.
=item C<grant_group>
C<int> the group id that is allowed to grant/deny flags of this type.
If the item is not included all users are allowed to grant/deny this
flagtype.
=item C<request_group>
C<int> the group id that is allowed to request the flag if the flag
is of the type requestable. If the item is not included all users
are allowed request this flagtype.
=back
=back
=item C<versions>
...
...
@@ -501,6 +603,9 @@ 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.
=item In Bugzilla B<4.4>, C<flag_types> was added to the fields returned
by C<get>.
=back
=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