[rt-users] timezone and custom Subject lines

Ruslan Zakirov ruslan.zakirov at gmail.com
Thu Apr 30 06:20:08 EDT 2009

On Thu, Apr 30, 2009 at 7:24 AM, erik tapang <erik.tapang at gmail.com> wrote:
> i've setup RT 3.8.2 on RHEL5.3 u3 64-bit and the setup is working fine. just
> needed some help/tips on "minor" issues.
> 1. {$Transaction->CreatedAsString}  and {$Ticket->Created}
> use different timezones. the latter is 8-hours behind.
> I have this in my RT_SiteConfig.pm:
> Set($Timezone , 'Asia/Singapore');
> right now i'm  using {$Transaction->CreatedAsString} to
>  show when the ticket was created in newly created tickets.
> what's the difference betwen the two (for newly
> created tickets)?

$Ticket->Created returns internal version that is UTC, you can use
$ticket->CreatedObj that returns a RT::Date object, so
$Ticket->CreatedObj->AsString. See more details on formatters in
RT::Date library.

> 2.   how to change the Subject line of  messages to the format
> used by our current support system.
> the format i need:
> QUEUE-MM-TicketId
> (MM is the month - 04 for April, 05 for May etc.)
> right now i'm stuck with:
> [NETWORK #46]
> i'm checking http://wiki.bestpractical.com/view/SendEmail
> and from the archive
> http://www.gossamer-threads.com/lists/rt/users/72259?search_string=sub%20SetSubjectToken%20;#72259
>  BUT he had problems with the email replies and had no response to his post.
> many thanks for any help/tips.

You can not do that without some code: in all templates you should use
something like Subject: [{...} {...} #{$Ticket->id}]...

And have to adjust regular expression in the config to match all
possible variants. If you don't do this then outgoing emails will have
two [...] blocks: yours and default. Also, replies to old tickets may
start generate new tickets.

Read http://wiki.bestpractical.com/view/RenameInstance

> erik
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
> Community help: http://wiki.bestpractical.com
> Commercial support: sales at bestpractical.com
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
> Buy a copy at http://rtbook.bestpractical.com

Best regards, Ruslan.

More information about the rt-users mailing list