Is it possible to change the date format for some specific searches

Is it possible to change the date format for some specific searches (eg.
just the date without the time)? I don’t want to change the general option
(in user General preferences).

id/TITLE:#’,
Subject/TITLE:Subject’,
Owner,
LastUpdated/TITLE:MAJ’

Gaston
514.823-7202

If you’re willing to write some code, you could create a callback that
modifies the $COLUMN_MAP variable, which defines all of the different
column types and how they are prepared. You could then create a column
called “DueDate” which outputs just the date of the due date/time.

Create
$RTHOME/local/html/Callbacks/DueDate/Elements/RT__Ticket/ColumnMap/Once
with this content:

<%args>
$COLUMN_MAP
</%args>
<%init>
$COLUMN_MAP->{‘DueDate’} = {
title => ‘Due’, # loc
attribute => ‘Due’,
value => sub {
my $ticket = shift;
my $date = $ticket->DueObj;
return ‘’ if not $date->IsSet;
return $date->Date;
}
};
</%init>

Then, clear your Mason cache and restart your RT server:

You should now see a “DueDate” choice when building searches. The code can
be copied for other date/time values, or you could put a loop into the code
above.On 5 December 2014 at 01:41, Gaston Huot Gaston@huot.me wrote:

Is it possible to change the date format for some specific searches (eg.
just the date without the time)? I don’t want to change the general option
(in user General preferences).

id/TITLE:#’,
Subject/TITLE:Subject’,
Owner,
LastUpdated/TITLE:MAJ’

Gaston
514.823-7202