Search Show Results

Hi!

I have a new question. i make search tickets with status, for
example, “resolved” and in Show Results tab i see this ticket.
But in second row in Created caption there is time when ticket
was created. For example, 7 days ago. But i want to see exact
data, for example: 16 Marth 2005. Is it possible?

WBR, Krasavin Andrey

In your RT_SiteConfig.pm, change ‘CreatedRelative’ to ‘Created’ under
Set ($DefaultSearchResultFormat

DB

Krasavin Andrey wrote:

Drew Barnes wrote:

In your RT_SiteConfig.pm, change ‘CreatedRelative’ to ‘Created’ under
Set ($DefaultSearchResultFormat

Thanx! But i still have some question about it:

  1. May i change format of data on Day.Month.Year.Time
  2. Where i can read about CreatedRelative option?
  3. May i change ralative data on HomePage too?

WBR, Krasavin Andrey

Krasavin Andrey wrote:

Thanx! But i still have some question about it:

  1. May i change format of data on Day.Month.Year.Time

Check this in your RT_SiteConfig.pm:

{{{ RT Date Handling Options (for Time::ParseDate)

Set this to 1 if your local date convention looks like “dd/mm/yy”

instead of “mm/dd/yy”.

Set($DateDayBeforeMonth , 1);

  1. Where i can read about CreatedRelative option?

Not sure about reading more. The difference between Created and
CreatedRelative (AFAIK) is that Created is the date/time of the update,
and CreatedRelative is how long ago the update was.

  1. May i change ralative data on HomePage too?

I’m assuming you mean the MyRequests and MyTickets parts of index.html.
Copy /Elements/MyTickets and /Elements/MyRequests over to your local
tree and modify them the same way as the RT_SiteConfig.pm file in my
previous posting.

DB

  1. May i change ralative data on HomePage too?

i’ll try to explain what i want. At Homepage at newest unowned
tickets at created option theri is data in relative format. But i
want exact data too. Is it possible too?

WBR, Krasavin Andrey

Drew Barnes wrote:

  1. May i change format of data on Day.Month.Year.Time

Check this in your RT_SiteConfig.pm:

{{{ RT Date Handling Options (for Time::ParseDate)

Set this to 1 if your local date convention looks like “dd/mm/yy”

instead of “mm/dd/yy”.

Set($DateDayBeforeMonth , 1);

I tried “1” and “0” but result was equal :(. Bug?

  1. Where i can read about CreatedRelative option?
    Not sure about reading more. The difference between Created and
    CreatedRelative (AFAIK) is that Created is the date/time of the update,
    and CreatedRelative is how long ago the update was.

i mean where do you know from about these options generally?

  1. May i change ralative data on HomePage too?

I’m assuming you mean the MyRequests and MyTickets parts of index.html.
Copy /Elements/MyTickets and /Elements/MyRequests over to your local
tree and modify them the same way as the RT_SiteConfig.pm file in my
previous posting.

Ok. Thanx. I’ll try to do it.

WBR, Krasavin Andrey

Krasavin Andrey wrote:

  1. May i change format of data on Day.Month.Year.Time

Check this in your RT_SiteConfig.pm:

{{{ RT Date Handling Options (for Time::ParseDate)

Set this to 1 if your local date convention looks like “dd/mm/yy”

instead of “mm/dd/yy”.

Set($DateDayBeforeMonth , 1);

I tried “1” and “0” but result was equal :(. Bug?

Did you restart apache?

Not sure about reading more. The difference between Created and
CreatedRelative (AFAIK) is that Created is the date/time of the
update, and CreatedRelative is how long ago the update was.

i mean where do you know from about these options generally?

I believe you can see a list of them in /Elements/RT__Ticket/ColumnMap.
I’m not sure if there is much description there.

Drew Barnes wrote:

I tried “1” and “0” but result was equal :(. Bug?
Did you restart apache?

Yes, of cause!

i mean where do you know from about these options generally?
I believe you can see a list of them in /Elements/RT__Ticket/ColumnMap.
I’m not sure if there is much description there.

Thanx very much! I’ll see this file surely.

WBR, Krasavin Andrey

Drew Barnes wrote:

I tried “1” and “0” but result was equal :(. Bug?
Did you restart apache?

Yes, of cause!

Now i have date format like “Wed Marth 16 18:48:14 2005”. But i
want format like “16 Marth 2005 18:48:14” Is it possible?

WBR, Krasavin Andrey

At Wednesday 3/16/2005 10:41 AM, Krasavin Andrey wrote:

Now i have date format like “Wed Marth 16 18:48:14 2005”. But i
want format like “16 Marth 2005 18:48:14” Is it possible?

You can add your own date format by adding a callback - here’s an example
that enables a short date format (MM/DD/YYYY) and an ISO date format for
Created:

This needs to go in a callback file named:

$RT_HOME/local/html/Callbacks//Elements/RT__Ticket/ColumnMap/ColumnMap

%# BEGIN callback file

<%ARGS>
$COLUMN_MAP => undef
</%ARGS>

<%init>
$COLUMN_MAP->{‘CreatedShort’} = {
title => ‘Created’,
attribute => ‘Created’,
value => sub {
my ($date, $time) = split(’ ‘, $_[0]->CreatedObj->ISO);
my ($y, $m, $d) = split (’-', $date);

         return "$m/$d/$y";
     }
 };

$COLUMN_MAP->{‘CreatedISO’} = {
title => ‘Created’,
attribute => ‘Created’,
value => sub { return $_[0]->CreatedObj->ISO }
};

</%init>

%# END callback file

Steve

Stephen Turner wrote:

This needs to go in a callback file named:

$RT_HOME/local/html/Callbacks//Elements/RT__Ticket/ColumnMap/ColumnMap

What do you mean under “site-specific-string”? i created file

$RT_HOME/local/html/Callbacks/RT/Elements/RT__Ticket/ColumnMap/ColumnMap

as you said. Restart htppd but i have no changes in RT. My date
format is like “Wed Marth 16 18:48:14 2005” :(.

Where was i wrong?

WBR, Krasavin Andrey

Hello,

try
$RT_HOME/local/html/Callbacks/MyCallbacks/Elements/RT__Ticket/ColumnMap/ColumnMap

How do I set-up the “site-specific-string”?
Anthony LeongOn Thu, 17 Mar 2005, Krasavin Andrey wrote:

Stephen Turner wrote:

This needs to go in a callback file named:

$RT_HOME/local/html/Callbacks//Elements/RT__Ticket/ColumnMap/ColumnMap

What do you mean under “site-specific-string”? i created file

$RT_HOME/local/html/Callbacks/RT/Elements/RT__Ticket/ColumnMap/ColumnMap

as you said. Restart htppd but i have no changes in RT. My date
format is like “Wed Marth 16 18:48:14 2005” :(.

Where was i wrong?


WBR, Krasavin Andrey


The rt-users Archives

RT Administrator and Developer training is coming to your town soon! (Boston, San Francisco, Austin, Sydney) Contact training@bestpractical.com for details.

Be sure to check out the RT Wiki at http://wiki.bestpractical.com

At Thursday 3/17/2005 03:17 AM, Krasavin Andrey wrote:

Stephen Turner wrote:

This needs to go in a callback file named:
$RT_HOME/local/html/Callbacks//Elements/RT__Ticket/ColumnMap/ColumnMap

What do you mean under “site-specific-string”? i created file

The string can be anything you want, I believe. See the Callbacks and
Comments sections at:

http://wiki.bestpractical.com/index.cgi?CleanlyCustomizeRT

Steve

Ok. After long searching in mailing list I founded that next
solution is working:

I made changes in /usr/lib/rt/RT/Date.pm at “AsString” section:

return $self->loc("[_1] [_2] [_3] [_4] [_5]:[_6]:[7]",
$self->GetWeekday($wday), $mday, $self->GetMonth($mon),
($year+1900), map {sprintf “%02d”, $
} ($hour, $min, $sec));

but i still doubtful about is it right way?

WBR, Krasavin Andrey

Hopefully you copied that to your local tree, as that will be
overwritten when and if you upgrade.

DB

Krasavin Andrey wrote:>On Thu, Mar 17, 2005 at 11:17:24AM +0300, Krasavin Andrey wrote:

Ok. After long searching in mailing list I founded that next
solution is working:

I made changes in /usr/lib/rt/RT/Date.pm at “AsString” section:

return $self->loc("[_1] [_2] [_3] [_4] [_5]:[_6]:[7]",
$self->GetWeekday($wday), $mday, $self->GetMonth($mon),
($year+1900), map {sprintf “%02d”, $
} ($hour, $min, $sec));

but i still doubtful about is it right way?

Drew Barnes wrote:

Hopefully you copied that to your local tree, as that will be
overwritten when and if you upgrade.

Yes, I copied Date.pm to my local tree but i still see relative
data format like “5 days ago” in RTFM at Quick Search tab for any
article :(. So, i think that date format for RTFM define
somewhere else but where?

WBR, Krasavin Andrey

Yes, I copied Date.pm to my local tree but i still see relative
data format like “5 days ago” in RTFM at Quick Search tab for any
article :(. So, i think that date format for RTFM define
somewhere else but where?

I don’t remember where you copied this in the local tree, but RTFM has its
own subdirectories separate from RT (lib/RT/FM and share/html/RTFM). Your
local tree should match that structure (and you’ll have to look there in
order to modify elements).

Russell Mosemann, Ph.D. * Computing Services * Concordia University, Nebraska
“Finding the right person is like finding a parking spot. All of the
good ones are taken, and the rest are either handicapped or too far away.”