[rt-users] Modifying search results columns
Borut Mrak
b at aufbix.org
Tue Mar 13 22:06:56 EDT 2007
Hello,
I've got support people using RT only through the web interface. What
they're missing is an ability to see which tickets contain requestor
responses that have not been replied to yet.
I think the perfect solution would be to create a custom field that gets
set by a Scrip when a customer sends mail (create/correspond) and reset
when requestor does the same. That would take care of possible changes to
the ticket by our staff which would otherwise change the LastModifiedBy
ticket attribute.
To simplify things, I just want to have tickets marked somehow in the
search results, and it's enough if $Ticket->LastModifiedBy equals
$Ticket->Requestor for now.
So far, I've tried overriding html/Elements/RT__Ticket/ColumnMap by
copying it to local/html/Elements/RT__Ticket/ColumnMap.
What I have now is:
-- /usr/share/request-tracker3.6/html/Elements/RT__Ticket/ColumnMap
2007-03-13 20:06:42.000000000 -0500
+++ /usr/local/share/request-tracker3.6/html/Elements/RT__Ticket/ColumnMap
2007-03-13 20:52:16.000000000 -0500
@@ -128,7 +128,15 @@
},
Status => {
attribute => 'Status',
- value => sub { return loc($_[0]->Status) }
+ value => sub {
+ my $Ticket = shift;
+
+ my $ret = $Ticket->Status;
+ if ( $Ticket->Creator == $Ticket->LastUpdatedBy ) {
+ $ret .= "<b>(waiting)</b>";
+ }
+ return loc($ret);
+ }
},
Subject => {
attribute => 'Subject',
This works OK for most search results, except the ones on the MyRT page,
highest priority tickets I own and newest unowned tickets.
Oh, and the <b> does get escaped somehow. Any way to pass it off to the
browser as it is?
Maybe a better idea would be to create another column, which would also
make it possible to sort results on this condition. Thoughts?
regards,
Borut Mrak.
More information about the rt-users
mailing list