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
f11a85e9
Commit
f11a85e9
authored
Sep 03, 2012
by
Reed Loden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 781075 - Add WebService support for accessing a user's saved reports
[r=LpSolit a=LpSolit]
parent
f9ed0c05
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
9 deletions
+41
-9
User.pm
Bugzilla/WebService/User.pm
+41
-9
No files found.
Bugzilla/WebService/User.pm
View file @
f11a85e9
...
...
@@ -221,6 +221,7 @@ sub get {
if
(
Bugzilla
->
user
->
id
==
$user
->
id
)
{
$user_info
->
{
saved_searches
}
=
[
map
{
$self
->
_query_to_hash
(
$_
)
}
@
{
$user
->
queries
}];
$user_info
->
{
saved_reports
}
=
[
map
{
$self
->
_report_to_hash
(
$_
)
}
@
{
$user
->
reports
}];
}
push
(
@users
,
filter
(
$params
,
$user_info
));
...
...
@@ -348,11 +349,20 @@ sub _group_to_hash {
sub
_query_to_hash
{
my
(
$self
,
$query
)
=
@_
;
my
$item
=
{
id
=>
$self
->
type
(
'int'
,
$query
->
id
),
name
=>
$self
->
type
(
'string'
,
$query
->
name
),
url
=>
$self
->
type
(
'string'
,
$query
->
url
),
id
=>
$self
->
type
(
'int'
,
$query
->
id
),
name
=>
$self
->
type
(
'string'
,
$query
->
name
),
query
=>
$self
->
type
(
'string'
,
$query
->
url
),
};
return
$item
;
}
sub
_report_to_hash
{
my
(
$self
,
$report
)
=
@_
;
my
$item
=
{
id
=>
$self
->
type
(
'int'
,
$report
->
id
),
name
=>
$self
->
type
(
'string'
,
$report
->
name
),
query
=>
$self
->
type
(
'string'
,
$report
->
query
),
};
return
$item
;
}
...
...
@@ -812,19 +822,40 @@ C<int> An integer id uniquely identifying the saved search.
C<string> The name of the saved search.
=item
url
=item
query
C<string> The CGI parameters for the saved search.
=back
=item saved_reports
C<array> An array of hashes, each of which represents a user's saved report and has
the following keys:
=over
=item id
C<int> An integer id uniquely identifying the saved report.
=item name
C<string> The name of the saved report.
=item query
C<string> The CGI parameters for the saved report.
=back
B<Note>: If you are not logged in to Bugzilla when you call this function, you
will only be returned the C<id>, C<name>, and C<real_name> items. If you are
logged in and not in editusers group, you will only be returned the C<id>, C<name>,
C<real_name>, C<email>, C<can_login>, and C<groups> items. The groups returned are
filtered based on your permission to bless each group.
The C<saved_searches>
item is only returned if you are querying your own account,
even if you are in the editusers group.
The C<saved_searches>
and C<saved_reports> items are only returned if you are
querying your own account,
even if you are in the editusers group.
=back
...
...
@@ -857,10 +888,11 @@ function.
=item C<group_ids> and C<groups> were added in Bugzilla B<4.0>.
=item C<include_disabled>
added in Bugzilla B<4.0>. Default behavior
for C<match> has changed to only returning
enabled accounts.
=item C<include_disabled>
was added in Bugzilla B<4.0>. Default
behavior for C<match> was changed to only return
enabled accounts.
=item C<groups> and C<saved_searches> added in Bugzilla B<4.4>.
=item C<groups>, C<saved_searches>, and C<saved_reports> were added
in Bugzilla B<4.4>.
=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