%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2019 Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<span class="label">
- <a href="<% $url %>"><&|/l, $Rows, $Description &>This user's [_1] highest priority [_2] tickets</&>:</a>
-</span>
-<ul>
-%while (my $w=$tickets->Next) {
-%my $uri = RT::URI->new( $session{'CurrentUser'} );
-%$uri->FromObject($w);
-<li class="value"><& /Elements/ShowLink, URI => $uri &></li>
-%}
-</ul>
+<& /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
+);
</%INIT>
<%ARGS>
$Requestor => undef