[rt-users] Showing Custom Field in Queue view
Bart Reynaerts
Bart.Reynaerts at intellect.be
Wed Jun 11 07:39:45 EDT 2008
RT 3.6.1
Additional statuses are created in RT_config.pm
at the section:
@ActiveStatus = qw(new open testing stalled) unless @ActiveStatus;
@InactiveStatus = qw(resolved closed rejected deleted) unless
@InactiveStatus;
- testing and closed are the additional statuses
To make them appear in the web interface check out the files:
"path_to_RT/html/Elements/" Quicksearch and QueueSummary
When looking inside you'll see the sections concerning the ticket
status.
Quicksearch:
<& /Elements/QueueSummary,
cache => 'quick_search_queues',
queue_filter => sub { $_->CurrentUserHasRight('ShowTicket') &&
!exists $unwanted->{$_->Name} },
conditions => [ {cond => "Status = 'new'", name => loc ('new') },
{cond => "Status = 'open'", name => loc ('open') },
{cond => "Status = 'stalled'", name => loc ('stalled') },
{cond => "Status = 'testing'", name => loc ('testing') }] &>
</&>
QueueSummary:
</tr>
% my $i;
% for my $queue (@queues) {
% $i++;
% my $queue_cond = "Queue = '$queue->{Name}' AND ";
% my $all_q = $queue_cond . "(Status = 'open' OR Status = 'new' OR
Status = 'stalled' OR Status = 'testing')";
<tr class="<% $i%2 ? 'oddline' : 'evenline'%>" >
<td><a href="<% $RT::WebPath%>/Search/Results.html?Query=<%$all_q%>"
title="<% $queue->{Description} %>"><%$queue->{Name}%></a></td>
The part with testing is an additional status to display
Now you have to change RT at a glance.
- Login as RT administrator.
- At the right of the bar just below "RT at a glance" is a link
"Edit".
- Click on it. A new screen appears.
- Click now on "Current search" at the left just below "RT at a
glance".
- You arrive at "Customize Current Search".
- Click on: You can also edit the predefined search itself: Search -
Current search.
- You will see now the Query Builder. Add the status to the query
and save it at "RT System's saved searches".
It is possible you need to try out this. I had problems getting
it right but suddenly it worked.
Changing the "10 highest priority tickets I own" and "10 newest unowned
tickets" views is similar to the way described here above.
To activate the made changes restart the apache server.
(/etc/init.d/apache2 restart) (Might not be necessary)
These changes are for all queues.
For the closed status no additional changes are made since changing a
ticket to this status will make it invisible anyway.
This status is used with custom scrips to send mail.
In the example below a Global approach is used.
Create first a Global Template:
- Name: StatusChangedToClosed
- Description: Status Changed To Closed
- Content:
RT-Attach-Message: yes
The status of this ticked has changed to closed.
Meaning no more action will be taken on this ticket.
This ticket won't be visible anymore.
{$RT::WebURL}Ticket/Display.html?id={$Ticket->id}
Create then the Global scrip:
- Description: StatusChangedToClosed
- Condition: User Defined
- Action: User Defined
- Template: Global template: StatusChangedToClosed
- Custom condition: return(0) unless (
lc($self->TransactionObj->NewValue) eq "closed" );
- Custom action preparation code:
# Now magically turn myself into a Requestor Notify object...
require RT::Action::Notify; bless($self, 'RT::Action::Notify');
$self->{Argument} = 'Owner, Requestor, Cc, AdminCc';
$self->Prepare;
return 1;
- Custom action cleanup code: "never needed"
To make them active restart the Apache server (/etc/init.d/apache2
restart) (Might not be necessary)
To compile this mini "How to" several Internet sources have been
consulted,
Emmanuel Lacour pointed me in the direction of changing "RT at a glance"
and others, which I should mention but I can't retrieve them anymore.
Thank's to everyone and good luck.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20080611/aefdd0ac/attachment.htm>
More information about the rt-users
mailing list