[rt-users] Approvals not working with 3.4rc6

Joop van de Wege JoopvandeWege at mococo.nl
Thu Feb 3 08:38:17 EST 2005


Hello List,

I'm currently implenting Approvals and following the instructions at the
Wiki and mailinglist I'm having a problem which I think is really a bug
in RT.
Configuration:
RT3.4rc6, RTFM 2.04, Oracle9i, perl 5.8.6, fastcgi apache 1.3.31

Like a lot of people I couldn't get approvals to work and after adding a
couple of debug statements to CreateTickets.pm I found an error in de
logfiles which pointed me to the fact that my template was wrong. I had
forgotten to start with an empty line.
After that it still didn't work and the logs show the following:
[Thu Feb  3 13:08:44 2005] [debug]: In Parse (/opt/rt_test/rt3.4rc6/local/lib/RT/Action/CreateTickets.pm:760)
[Thu Feb  3 13:08:44 2005] [debug]: Content: 
===Create-Ticket: codereview
Subject: Code review for {$Tickets{'TOP'}->Subject}
Depended-On-By: {$Tickets{'TOP'}->Id}
Type: approval
Queue: ___Approvals
Content: Someone has created a ticket. you should review and approve it, 
ENDOFCONTENT

 (/opt/rt_test/rt3.4rc6/local/lib/RT/Action/CreateTickets.pm:768) 

Now I didn't spot it right away but after adding a bit more debugging I
found something interesting, look closely at this:
[Thu Feb  3 13:42:18 2005] [debug]: T-A ===T-A (/opt/rt_test/rt3.4rc6/local/lib/RT/Action/CreateTickets.pm:770) 

This is produced by the following lines I added to CreateTicket.pm
     $t=substr( $args{'Content'}, 0, 3 );
     $RT::Logger->debug("$t ===" . $t);
 I know, my perl sucks but it gave me the clue I needed and I don't
understand why not more people are having problems because the
substr(..0,3) takes the first 3 characters from the template but ignores
the fact that the very first line is either empty or contains a MIME
object (header) which is the true for my case in the latter example. The
first piece of log is without RT-Attach-Message:Yes.

So if I use a template without a MIME header and thus starts with an
empty line and I change the substr(..,0,3) to substr(..,1,3) then RT
starts creating approval tickets.

Anyone knows whats going on? This is a plain rt3.4rc6 install (test). I
looked and in my 3.2.1 (old) and 3.2.2 (current production) installs the
code is identical.

Joop

-- 
Joop van de Wege <JoopvandeWege at mococo.nl>




More information about the rt-users mailing list