[rt-users] scripts REALLY fail in 3.6.x

Sven Sternberger sven.sternberger at desy.de
Thu Aug 10 11:43:32 EDT 2006


After 2 hours of debugging I found the "bug". 

Example:

===Create-Ticket: NOC-Net
Queue: testq-noc
Subject: CC_BringInto: NOC-Net/{$Tickets{"TOP"}->Subject}
Requestor: sven.sternberger at desy.de
Depended-On-By: Operating-Master
Content: 
{ &getParentCF(); }
{ &getParentHistory(); }
ENDOFCONTENT

This piece of code worked in 3.0 and don't in 3.6

1. An empty line after content seems to cause the parser to think there
is no content.

2. (And this is the ugly part) The function getParentHistory returns a 
text block which starts with the word "Subject" due to 1. the block
is not recognized as content. The effect is the strange subject 
like "Array(02x456)"

Workaround:
Alter the template:
Content: { &getParentCF(); }
{ &getParentHistory(); }
ENDOFCONTENT

It would be nice if the template parser would be a little bit smarter 
at this point, but at the end it isn't a real bug.

regards!

sven

On Wed, 2006-08-09 at 13:31 -0400, Drew Barnes wrote:
> A lot has changed between 3.0.12 and 3.6.1  You probably need to rewrite 
> your template as some syntax has no doubt changed.  I would be very 
> hesitant to call this a bug.
> 
> Indeed, the default autoreply template which seems to work for me uses 
> {$Ticket->Subject} and not {$Tickets{"TOP"}->Subject}.  Perhaps this is 
> where you should start?
> 
> 
> 
> Sven Sternberger wrote:
> > Hello!
> >
> > I already send this bug, but I don't get an answer and it still
> > doesn't work in rt3.6.1
> >
> > I use the Action "Create Tickets", and defined a Template which works
> > fine in 3.0.12 but after migration in 3.6 it fails. The subject of the
> > new tickets is not set correctly
> >
> > The resulting tickets gets subjects like "ARRAY(0xa41bae8)", 
> >
> > the corresponding code in the Template is
> >   
> > Subject: CC_BringInto: NOC-Net/{$Tickets{"TOP"}->Subject}
> > <<
> >
> > In the log file of rt I see:
> > [warning]: Attempt to use reference as lvalue in substr
> > at /usr/lib/perl5/site_perl/5.8.5/DBIx/SearchBuilder/Record.pm line 981.
> > <<
> > I use RT3.6.1/mysql on a RHEL4.2 (compatible) machine.
> >
> > best regards!
> >
> > sven
> >
> > _______________________________________________
> > 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
> >   
> 




More information about the rt-users mailing list