[Rt-devel] RE: Modify Most due incidents
Juan Ramón Alfageme Mata
JRamon.Alfageme at alhambra-eidos.com
Mon Apr 11 10:19:20 EDT 2005
Finally I get it to work on my own, here is diff -u from original and modified DueIncidents element:
server:/opt/rt3/local/html/RTIR/Elements# diff -u ../../../../share/html/RTIR/Elements/DueIncidents DueIncidents
--- ../../../../share/html/RTIR/Elements/DueIncidents 2005-04-11 12:14:51.000000000 +0200
+++ DueIncidents 2005-04-11 15:54:20.000000000 +0200
@@ -28,21 +28,26 @@
Query => $Query,
QueryString => $QueryString,
Format => $Format,
- Rows => 10,
+ Rows => 10000,
+ OrderBy => $OrderBy,
&>
<& /Elements/TitleBoxEnd &>
<%INIT>
$Format = $RT::RTIRSearchResultFormats->{'DueIncidents'};
+my $todaydate = new RT::Date($session{CurrentUser});
+$todaydate ->Set( Format => 'unix', Value => time );
my $Query = "Queue = 'Incidents'";
if ($owner) {
$Query .= " AND (Owner = " . $owner->id . " OR Owner = 'Nobody')";
+} else {
+ $Query .= " AND Due < '" . $todaydate->ISO() . "'";
}
-$Query .= " AND " .
+$Query .= " AND " .
$m->comp('/RTIR/Elements/NewQuery',
Queue => 'Incidents',
states => [ 'new', 'open', 'stalled' ]);
@@ -59,9 +64,9 @@
</%INIT>
<%ARGS>
-$rows => 10
+$rows => 10000
$owner => undef
-$OrderBy => undef
+$OrderBy => 'Due'
$Format => undef
$QueryString => undef
</%ARGS>
server:/opt/rt3/local/html/RTIR/Elements#
It does three things, first order by Due, second get infinite number of tickets (10.000) and third in Most Due Incidents list get only tickets with Due date lower than current date.
Juan Ramón Alfageme Mata
+34 91 787 23 00 alhambra-eidos.com
More information about the Rt-devel
mailing list