Version 1 (modified by 8 years ago) (diff) | ,
---|
Reports
Instead of shipping it's own report module PeerReviewPlugin relies on Tracs reporting features by leveraging custom TracReports using data from PeerReviewPlugin.
These custom reports can be accessed from the regular Trac report page but they are also shown on the report page for reviews.
Note that when opening a report you are automatically redirected to the Trac report module.
Creating Reports
Displaying a report on the review report page
For reports to show up on the review page you must add the following wiki comment to the reports description.
{{{ #!comment codereview=1 }}}
Example report description:
{{{ #!comment codereview=1 }}} * Show all files with status ''approved'' sorted by name. Open [/peerreviewreport Codereview report page].
Provide links from report results
It is possible to directly link from report results to a referenced review or file. You need to set the realm
column in the report as explained in TracReports: Automatically formatted columns.
The following realms are available:
peerreview
peerreviewfile
In this example in each result row Id
directly links to the corresponding file page:
SELECT f.file_id AS id, f.review_id AS review_id, f.path AS path, f.hash AS hash, f.revision AS revision, f.status AS status, 'peerreviewfile' AS _realm, (SELECT COUNT(*) FROM peerreviewcomment AS c WHERE f.file_id = c.file_id) AS comments FROM peerreviewfile f WHERE f.status = 'approved' GROUP BY f.file_id ORDER BY f.path, f.revision