Closed Bug 781075 Opened 12 years ago Closed 12 years ago

Add WebService support for accessing a user's saved reports

Categories

(Bugzilla :: WebService, enhancement)

4.2.1
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 4.4

People

(Reporter: reed, Assigned: reed)

References

Details

Attachments

(1 file, 2 obsolete files)

Attached patch patch - v1 (untested) (obsolete) — Splinter Review
Do the same thing as bug 697224 but for the new saved reports feature (bug 319598).

Only question: Should this be called 'saved_reports' or just 'reports'?
Attachment #649943 - Flags: review?(LpSolit)
(In reply to Reed Loden [:reed] from comment #0)

> Only question: Should this be called 'saved_reports' or just 'reports'?

saved_reports IMO since we already have saved_searches and should be consistent.
Comment on attachment 649943 [details] [diff] [review]
patch - v1 (untested)

Review of attachment 649943 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good and tests were successful. r=dkl
Attachment #649943 - Flags: review+
Flags: approval?
Comment on attachment 649943 [details] [diff] [review]
patch - v1 (untested)

For the same reason as in bug 697224 (which has been backed out), it's not acceptable to let all users have access to this information. Even admins cannot get it from the UI. This information should only be accessible if you query your own account.
Attachment #649943 - Flags: review?(LpSolit) → review-
Flags: approval?
Attached patch patch - v2 (untested) (obsolete) — Splinter Review
Attachment #649943 - Attachment is obsolete: true
Attachment #653097 - Flags: review?(LpSolit)
Comment on attachment 653097 [details] [diff] [review]
patch - v2 (untested)

>         url  => $self->type('string', $query->url),

>+        query => $self->type('string', $report->query),

For consistency, both should use the same name. I prefer query than url, so let's fix _query_to_hash() and its doc to specify query instead.


> 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>, 

This doc must be fixed to also list saved_reports as being only returned when querying your own account.


>-=item C<groups> and C<saved_searches> added in Bugzilla B<4.4>.
>+=item C<saved_searches> and C<saved_reports> added in Bugzilla B<4.4>.

As said on IRC already, groups has indeed been added in 4.4, so there is no reason to remove it.


r=LpSolit with all these comments fixed.
Attachment #653097 - Flags: review?(LpSolit) → review+
Flags: approval4.4+
Flags: approval+
Keywords: relnote
Flags: testcase?
Attached patch patch - v3Splinter Review
Attachment #653097 - Attachment is obsolete: true
Attachment #657898 - Flags: review+
Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/trunk/
modified Bugzilla/WebService/User.pm
Committed revision 8380.

Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/4.4/
modified Bugzilla/WebService/User.pm
Committed revision 8378.
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
About QA tests:

As we cannot create saved reports using the WebServices, I can only check that they aren't leaked to other users. But I cannot check that the correct data is returned (or I would have to mix a Selenium and a WS test script).

Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/qa/4.4/
modified t/webservice_user_get.t
Committed revision 233.
Flags: testcase? → testcase+
Added to the relnotes for 4.4.
Keywords: relnote
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: