Creating a new report

Hi,

    I wanted to create a new report which lists tickets worked on

in the last 2 week interval (and if I get this working, reports that
lists tickets in most recently worked order). I am using RT 3.6.1.

    What I am looking for are hints/examples;  I am assuming I can

create this report as a HTML::Mason file. I am looking at
html/Tools/Reports/ResolvedByOwner.html, which gives graphs and a
summary, but not links to the tickets themselves. Can I just
construct a Query and pass it to /Elements/TicketList ?

    Is there an introduction to the Mason components present? The

comments in /Elements/* seem to be mostly copyright notices. At this
point, after a very superficial scan of the sources, I am planning on
programming by example and combining /Tools/Reports/* and
/Search/Results.html along with custom queries.

    Thanks for any help,

    manoj 

I always have fun because I’m out of my mind!!!
Manoj Srivastava srivasta@acm.org http://www.golden-gryphon.com/
1024D/BF24424C print 4966 F272 D093 B493 410B 924B 21BA DABB BF24 424C

Hi,

    Since there was no response, I'm following up to my own mail:

The following in
/usr/local/share/request-tracker3.6/Tools/Reports/Active.html does
the trick. I also had to modify the tabs file to add the new report
/usr/local/share/request-tracker3.6/Tools/Reports/Elements/Tab

    manoj

<%args>
$Query => undef
$Format => undef
$HideResults => 0
$Rows => undef
$Page => 1
$Order => undef
$OrderBy => undef
$NumDays => 14
</%args>
<%init>
my $title = loc(“Active tickets, grouped by queue”);
$Order ||= ‘ASC|DESC’;
$OrderBy = ‘Queue|LastUpdated’;
$Rows ||= 50;
</%init>

<& /Elements/Header, Title => $title &>
<& /Tools/Reports/Elements/Tabs, current_tab => ‘Tools/Reports/Active.html’, Title => $title &>

% my %hiddens = (Query => $Query, Format => $Format, Rows => $Rows, OrderBy => $OrderBy, Order => $Order, HideResults => $HideResults, Page => $Page, NumDays => $NumDays );

Tickets with activity in <%$NumDays%> days

% $Query = "LastUpdated > '$NumDays days ago'";

<& /Elements/TicketList,
Query => $Query,
AllowSorting => 1,
OrderBy => $OrderBy,
Order => $Order,
Rows => $Rows,
Page => $Page,
Format => $Format,
BaseURL => $RT::WebPath.“/Tools/Reports/Active.html?”
&>



<&|/l&>Number of Days in report:

<& /Elements/Submit&>

Advice to young men: Be ascetic, and if you can’t be ascetic, then at
least be aseptic.
Manoj Srivastava srivasta@acm.org http://www.golden-gryphon.com/
1024D/BF24424C print 4966 F272 D093 B493 410B 924B 21BA DABB BF24 424C