Edgewall Software

Changes between Version 2 and Version 3 of CookBook/Configuration/Reports


Ignore:
Timestamp:
Mar 22, 2010, 3:16:49 PM (14 years ago)
Author:
mpotter@…
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • CookBook/Configuration/Reports

    v2 v3  
    7373     (CASE status
    7474}}}
     75
     76== Non Ticket Reports ==
     77
     78SQL reports do not have to be limited to tickets.  They can report on revisions, wiki pages, or user activity.
     79
     80=== User Changesets ===
     81The follow report will lists all of the changes for the current user, or add "?USER=''user''" to the end of the URL to report on another user.
     82{{{
     83!#sql
     84SELECT
     85   "changeset" AS _realm, rev as id,
     86   time AS date, time,
     87   SUBSTR(message, 1, 80 )AS message
     88FROM revision
     89WHERE author='$USER'
     90ORDER BY time DESC
     91}}}
     92This report only gives the first 80 characters of the check-in message.  To give the full message, make the following change:
     93{{{
     94#!diff
     95--- Report.sql
     96+++ Report.sql
     97@@ -1,7 +1,7 @@
     98  SELECT
     99     "changeset" AS _realm, rev as id,
     100     time AS date, time,
     101-    SUBSTR(message, 1, 80 )AS message
     102+    message AS _message_
     103  FROM revision
     104  WHERE author='$USER'
     105  ORDER BY time DESC
     106}}}
     107=== Wiki Changes ===
     108This reports the wiki pages ever modified by the current user, or add "?USER=''user''" to the end of the URL to report on another user.  Version is the highest version that the user modified.
     109{{{
     110#!sql
     111SELECT
     112   "wiki" AS _realm,
     113   name AS id,
     114   max(version) AS Version,
     115   time AS date, time,
     116   comment
     117FROM wiki
     118WHERE author='$USER'
     119GROUP BY name
     120}}}
     121For wiki pages that were last modified by the current user:
     122{{{
     123#!sql
     124SELECT
     125   "wiki" AS _realm,
     126   wiki.name AS id,
     127   time AS date, time,
     128   comment
     129FROM wiki,
     130 (SELECT max(version) AS maxVer, name
     131  FROM wiki
     132  GROUP BY name) maxResults
     133WHERE wiki.name = maxResults.name
     134 AND version = maxVer
     135 AND author = '$USER'
     136ORDER BY wiki.name
     137}}}