[rt-users] 3.6.1 Search - highest priority tickets for my department
Jared Hanks
jmhanks1373 at hotmail.com
Wed Oct 4 15:02:59 EDT 2006
I upgraded from 3.4.3 to 3.6.1 and found the way the Homepage searches are
done are is different between the two versions. In 3.4.3 I had a custom
search for "Highest priority tickets in my department". In 3.4.3 I created
a local/html/Elements/MyGroupTickets with the following:
------------------------------------------
<&|/Elements/TitleBox,
title => loc('[_1] highest priority tickets in my department',
$rows),
title_href => "Search/Results.html".$QueryString &>
<& /Elements/TicketList,
Format => "'<a
href=\"$RT::WebPath/Ticket/Display.html?id=__id__\">__id__</a>/TITLE:#', '<a
href=\"$RT::WebPath/Ticket/Display.html?id=__id__\">__Subject__</a>/TITLE:Subject',
Priority, QueueName, ExtendedStatus, LastUpdated",
Query => $Query,
OrderBy => 'Priority',
Order => 'DESC',
Rows => $rows,
ShowNavigation => 0
&>
</&>
<%init>
my $rows = $RT::MyTicketsLength;
my $UserObjId = $session{'CurrentUser'}->Id;
my $UserObj = RT::User->new(RT::CurrentUser->new($RT::SystemUser));
my $UserLoaded = $UserObj->Load($UserObjId);
my $MyGroupObj = $UserObj->OwnGroups;
my $MyFirstGroupObj = $MyGroupObj->Next;
my $MyFirstGroupObjId = $MyFirstGroupObj->Id;
my $MyFirstGroupObjName = $MyFirstGroupObj->Name;
my $Query = " Queue = '$MyFirstGroupObjName' AND ( Status = 'new' OR Status
= 'open' OR Status = 'stalled')";
my $QueryString = "";
$QueryString = '?' . $m->comp('/Elements/QueryString',
Query => $Query,
Order => 'DESC',
OrderBy => 'Priority') if ($Query);
</%init>
-----------------------------------------
and in share/html/index.html I have the following snippet:
...
<& /Elements/ListActions, actions => \@results &>
<TABLE BORDER=0 WIDTH=100%>
<TR VALIGN=TOP>
<TD WIDTH=70% class="boxcontainer">
<& /Elements/MyTickets &>
<BR>
<& /Elements/MyRequests &>
<BR>
<& /Elements/MyGroupTickets &>
</TD>
<TD class="boxcontainer">
<& /Elements/Quicksearch &>
</TD>
</TR>
</TABLE>
<%init>
...
In 3.6.1, I've done the same as I did in 3.4.3, except instead of putting <&
/Elements/MyGroupTickets &> in index.html I put it in Elements/MyRT to look
like this...
<table border="0" width="100%">
<tr valign="top">
<td width="70%" class="boxcontainer">
% for my $portlet (@{$portlets->{body}}) {
<% _show($portlet) %>
<br />
% }
%#GAH!
<& /Elements/MyGroupTickets &>
</td>
<td class="boxcontainer">
% for my $portlet (@{$portlets->{summary}}) {
<% _show($portlet) %>
<br />
% }
</td>
</tr>
</table>
<%INIT>
-----------
I am able to get the query title to show up on the homepage, but the
actual query itself doesn't show up. I am able to click on the link and the
query will show up on the next page (like a normal search built through the
Search Builder).
How can I get my MyGroupTickets query to show up on the Homepage for
everyone?
Any help is greatly appreciated.
Thanks,
Jared
_________________________________________________________________
Be seen and heard with Windows Live Messenger and Microsoft LifeCams
http://clk.atdmt.com/MSN/go/msnnkwme0020000001msn/direct/01/?href=http://www.microsoft.com/hardware/digitalcommunication/default.mspx?locale=en-us&source=hmtagline
More information about the rt-users
mailing list