X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FTicket%2FElements%2FShowRequestorTickets;h=0908a32659b88cf6d92de9ddafe413e3c2e63175;hp=1213d3d504a21449a2c35db5ec0b25be8449d85b;hb=44dd00a3ff974a17999e86e64488e996edc71e3c;hpb=919e930aa9279b3c5cd12b593889cd6de79d67bf diff --git a/rt/share/html/Ticket/Elements/ShowRequestorTickets b/rt/share/html/Ticket/Elements/ShowRequestorTickets index 1213d3d50..0908a3265 100644 --- a/rt/share/html/Ticket/Elements/ShowRequestorTickets +++ b/rt/share/html/Ticket/Elements/ShowRequestorTickets @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2019 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -45,31 +45,21 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} - - <&|/l, $Rows, $Description &>This user's [_1] highest priority [_2] tickets: - - +<& /User/Elements/TicketList, + User => $Requestor, + conditions => $conditions, + Rows => $Rows, + Title => $Title, + WatcherTypes => ['Requestor'], + Format => => RT->Config->Get('MoreAboutRequestorTicketListFormat'), + &> <%INIT> -my $sql = "Requestor.id = ". $Requestor->id; -if (@$conditions) { - $sql .= " AND (".join( " OR ", map $_->{cond}, @$conditions).")"; -} -my $tickets = RT::Tickets->new( $session{'CurrentUser'} ); -$tickets->FromSQL( $sql ); -$tickets->RowsPerPage( $Rows ); -$tickets->OrderBy( FIELD => 'Priority', ORDER => 'DESC' ); +my $Title = loc("This user's [_1] highest priority [_2] tickets", $Rows, $Description ); -my $url = RT->Config->Get('WebPath') . '/Search/Results.html?'; - $url .= $m->comp('/Elements/QueryString', - Query => $sql, - OrderBy => 'Priority', - Order => 'DESC' ); +$m->callback( CallbackName => 'ModifyTitle', + %ARGS, + Title => \$Title +); <%ARGS> $Requestor => undef