%# <&|/l&>No search to operate on. <&|/l&>Simple Query:

<&|/l&>Advanced Query - <&|/l&>Tracker <%PERL> { local *RT::Tickets::_BuildJoins = sub { my $self = shift; my $joins = $self->DBIx::SearchBuilder::_BuildJoins(@_); return " $joins , Queues ticketQueue "; }; local *RT::Tickets::_WhereClause = sub { my $self = shift; my $clause = $self->DBIx::SearchBuilder::_WhereClause(@_); $clause =~ s/\s*WHERE\s*//i; return "WHERE ( $clause ) ". "AND main.Queue = ticketQueue.id ". "AND ticketQueue.Disabled = 0"; }; $session{'tickets_rows_per_page'} = 25; $m->comp('/Work/Search/index.html', %ARGS, NoUI => 1, TicketRow => '/Foundry/Search/TicketRow'); } <%INIT> $Query =~ s/^\s+|\s+$//g; if (length($Query) and $SearchType =~ /^(?:Project|User|Ticket|Simple|Advanced)$/) { my $List = $m->comp($SearchType, Query => $Query); if ($List) { return $m->comp('/Foundry/Trove/List', ARGS => \%ARGS, Begin => $Begin, List => $List) if $SearchType eq 'Project'; return $m->comp('/Foundry/Project/Tracker/List', List => $List, Begin => $Begin, URL => '/Foundry/Project/Tracker/Display.html', Hide => '!', ARGS => \%ARGS) if $SearchType eq 'Ticket'; return $m->comp('/Foundry/User/List', ARGS => \%ARGS, Begin => $Begin, List => $List) if $SearchType eq 'User'; return $m->print(loc("Under Construction.")) unless $SearchType eq 'Simple'; } return if defined $List; return $m->print(loc("Cannot find any matching items.")); } <%ARGS> $SearchType => 'Project' $Query => '' $Begin => 0