Re: [rt-users] Is it possible to change the date format for some specific searches

2014-12-12 Thread Alex Peters
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

<%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;
}
};


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

http://requesttracker.wikia.com/wiki/CleanMasonCache

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  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).
>
> ' href="__WebPath__/Ticket/Display.html?id=__id__">__id__/TITLE:#',
> ' href="__WebPath__/Ticket/Display.html?id=__id__">__Subject__/TITLE:Subject',
> Owner,
> *'__LastUpdated__/TITLE:MAJ'*
>
>
> Gaston
> 514.823-7202
>


[rt-users] Is it possible to change the date format for some specific searches

2014-12-04 Thread Gaston Huot
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