Skip to content

Commit

Permalink
Support TimeWorker/TimeWorkedDate columns in transaction search results
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnavy committed Dec 17, 2024
1 parent 672294e commit dec25db
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions share/html/Elements/RT__Transaction/ColumnMap
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,19 @@ my $COLUMN_MAP = {
attribute => 'TimeTaken',
value => sub { return $_[0]->TimeTaken() },
},
TimeWorker => {
title => 'Time Worker', # loc
attribute => 'TimeWorker',
value => sub {
return '' unless $_[0]->TimeWorker;
return \( $m->scomp( "/Elements/ShowUser", User => $_[0]->TimeWorkerObj ) );
},
},
TimeWorkedDate => {
title => 'Time Worked Date', # loc
attribute => 'TimeWorkedDate',
value => sub { return $_[0]->TimeWorkedDateAsString() },
},
Description => {
title => 'Description', # loc
value => sub { my $html = $_[0]->BriefDescriptionAsHTML(); return \$html },
Expand Down
2 changes: 1 addition & 1 deletion share/html/Search/Elements/BuildFormatString
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ my @fields;
if ( $Class eq 'RT::Transactions' ) {
$Format ||= RT->Config->Get('TransactionDefaultSearchResultFormat')->{$ObjectType};

@fields = qw( id ObjectId ObjectType ObjectName Type Field TimeTaken
@fields = qw( id ObjectId ObjectType ObjectName Type Field TimeTaken TimeWorker TimeWorkedDate
OldValue NewValue ReferenceType OldReference NewReference
Created CreatedRelative CreatedBy Description Content PlainContent HTMLContent
TicketId TicketSubject TicketQueue TicketStatus TicketOwner TicketCreator
Expand Down

0 comments on commit dec25db

Please sign in to comment.