Error in Template?

Hi,

Being new to RT I hope this is the right place.

I get the following error from RT
Ver: RT.1.3.70 (from CVS)

The status change template appears to be broken …

http://changed to protect guilty/Ticket/Display.html?id=12 http://rt.ifl.net///Ticket/Display.html?id=12

Program fragment at line 6 delivered error ``Can’t call method “Content” on an undefined value’’

Which I presume comes from the status changed template:

{$Transaction->Message()->First()->Content()}

This occurs on any status change using scrip:

OnStatus NotifyRequestor with template StatusChange
Not being too familiar with the underlying bits and pieces of RT and
it’s perl
variable structure can anyone help?

Cheers
Mark

Mark Vevers. mark@ifl.net / mvevers@rm.com
Internet Backbone Engineering Team
Internet for Learning, Research Machines Plc
Tel: +44 1235 823380, Fax: +44 1235 823424

Mark vevers mark@ifl.net writes:

(in RT 1.3.70)

The status change template appears to be broken…

Indeed, it is. The problem is that a given transaction
doesn’t necessarily have any content-- a status change
like “take”, “open”, etc.

The default template doesn’t take that into account.

Go to Administration->Global->Scrips->7/StatusChange,
and add a condition to the Scrip. In the example which
follows, if there’s no content to the transaction, the
template doesn’t try to include it:

|Subject: Status Changed to: {$Transaction->NewValue}
|
|
|{$RT::WebURL}/Ticket/Display.html?id={$Ticket->id}
|
|{$Transaction->Message()->First()->Content() if
$Transaction->|Message()->First()}

That cleared up the problem here.

— Russ McFatter [russ@intranet.com]