Home page Change

Hello everybody,

I have an easy, little, strange question:
I understood that the “newest unowned tickets” list in the start page includes mails to all queues. Is it possible to change the queues included in that list?

Thanks,
Paul

Cr�ez gratuitement votre Yahoo! Mail avec 100 Mo de stockage !
Cr�ez votre Yahoo! Mail

Le nouveau Yahoo! Messenger est arriv� ! D�couvrez toutes les nouveaut�s pour dialoguer instantan�ment avec vos amis.T�l�chargez GRATUITEMENT ici !

I understood that the “newest unowned tickets” list in the start page
includes mails to all queues. Is it possible to change the queues included
in that list?

Sure. Create <RT_DIR>/local/html/Elements if it doesn’t already exist.
Then use <RT_DIR>/share/html/Elements/MyRequests as a template.

Here’s how I did one for our network department.

<&|/Elements/TitleBox,
title => loc(“[_1] newest unowned tickets in Network Queues”, $rows),
title_href => “Search/Results.html”.$QueryString &>

% # print "Testing: ", $Query;

<& /Elements/TicketList,
Format => “‘<a
href="$RT::WebPath/Ticket/Display.html?id=id">id/TITLE:#’,
‘<a href="$RT::WebPath/Ticket/Display.html?id=id">Subject/TITLE:Subject’,
QueueN
ame, ExtendedStatus, CreatedRelative, '<A
HREF="$RT::WebPath/Ticket/Display.html?Action=Take&id=id">”.loc(‘Take’)."/TITLE: ’
",
Query => $Query,
OrderBy => ‘Created’,
Order => ‘DESC’,
ShowNavigation => 0,
Rows => $rows

    &>

</&>
<%init>
my $rows = $RT::MyRequestsLength;

my %NetworkQueues = (
‘network’ => 9,
‘network-circuit-order’ => 57,
‘network-emo’ => 37,
‘network-escalation’ => 15,
‘network-inventory’ => 49,
‘network-maintenance’ => 17,
‘network-port-capacity’ => 46,
‘network-problem’ => 47,
‘network-project-tasks’ => 48,
‘network-sales-order’ => 51,
‘network-verizon’ => 24,
);

my $Query = “Owner = ‘Nobody’ AND ( Status = ‘new’ OR Status = ‘open’)”;

my $Query = " ( Queue = ";
my $First = 1;

foreach ( keys %NetworkQueues ) {
$Query .= " OR Queue = " unless $First;
$Query .= $NetworkQueues{ $_ };
undef $First if $First;;
}
$Query .= " ) AND ( Status = ‘new’ OR Status = ‘open’)";

my $QueryString = ‘?’ . $m->comp(‘/Elements/QueryString’,
Query => $Query,
Order => ‘DESC’,
OrderBy => ‘Priority’) if ($Query);

</%init>

Then copy <RT_DIR>/share/html/index.html to <RT_DIR>/local/html and
modify the local dir copy.

I extended the MyRequests part a bit and added the lines:

% my $GroupObj = RT::Group->new( $session{ ‘CurrentUser’ } );
% my $PrincipalObj = RT::Principal->new( $session{ ‘CurrentUser’ } );
% $PrincipalObj->Load( $session{ ‘CurrentUser’ }->id );
% $GroupObj->LoadUserDefinedGroup( ‘Network’ );
% my $HasMember = $GroupObj->HasMemberRecursively( $PrincipalObj );
% unless ( $HasMember ) {
<& /Elements/MyRequests &>


% }
% if ( $HasMember ) {
<& /Elements/NetworkRequests &>
% }

Sort of a crappy way to do it, but it works fine.

Andy Harrison