Changes between Initial Version and Version 1 of PeerReviewPlugin/Reports


Ignore:
Timestamp:
May 3, 2016, 9:12:45 AM (8 years ago)
Author:
Cinc-th
Comment:

Created page about review reports

Legend:

Unmodified
Added
Removed
Modified
  • PeerReviewPlugin/Reports

    v1 v1  
     1= Reports
     2Instead of shipping it's own report module PeerReviewPlugin relies on Tracs reporting features by leveraging custom TracReports using data from PeerReviewPlugin.
     3
     4These custom reports can be accessed from the regular Trac report page but they are also shown on the report page for reviews.
     5
     6Note that when opening a report you are automatically redirected to the Trac report module.
     7
     8== Creating Reports
     9=== Displaying a report on the review report page
     10For reports to show up on the review page you must add the following wiki comment to the reports description.
     11{{{
     12{{{
     13#!comment
     14codereview=1
     15}}}
     16}}}
     17
     18Example report description:
     19{{{
     20{{{
     21#!comment
     22codereview=1
     23}}}
     24* Show all files with status ''approved'' sorted by name.
     25
     26Open [/peerreviewreport Codereview report page].
     27
     28}}}
     29=== Provide links from report results
     30It 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#Automaticallyformattedcolumns TracReports: Automatically formatted columns].
     31
     32The following realms are available:
     33* {{{peerreview}}}
     34* {{{peerreviewfile}}}
     35
     36In this example in each result row {{{Id}}} directly links to the corresponding file page:
     37{{{#!sql
     38SELECT f.file_id AS id, f.review_id AS review_id,
     39       f.path AS path, f.hash AS hash,
     40       f.revision AS revision, f.status AS status,
     41       'peerreviewfile' AS _realm,
     42       (SELECT COUNT(*) FROM peerreviewcomment AS c
     43        WHERE f.file_id = c.file_id) AS comments
     44FROM peerreviewfile f
     45WHERE f.status = 'approved'
     46GROUP BY f.file_id
     47ORDER BY f.path, f.revision
     48}}}