[rt-users] "Forward" to 3rd party patch

Scott A. McIntyre scott at xs4all.nl
Wed Apr 17 04:55:19 EDT 2002


Hi all,

> action to each transaction. This allows you to forward a transaction onto a
> third party. If the third party happens to have permission to correspond on
> the ticket, then they'll be able to reply straight back into RT. 

Very cool patch that I know a lot of people have been looking for.
However, it doesn't actually work for me and I'm not seeing any logical
reason why not. 

The scripactions and scripconditions tables have been updated, and
indeed, both are visible in Scrips (is this required for Forwarding to
work, by the way?  That you need a OnForward condition, with the right
template, etc?  Tried it, no effect, indeed, it breaks with not being
able to find the RT::Conditition::Forward module)

The [Forward] tag appears, and indeed, it takes the address in the
update page, but submission returns back to the ticket with no mail
being generated and no updates having taken place (that is, no "Ticket
forwarded by <user> to <address>")

> -	else {
> +	} elsif ($args{ARGSRef}->{'UpdateType'} eq 'forward') {

(from Web.pm)

In the latest rt, this syntax has changed slightly:

            } elsif ( $trans_type eq 'Correspond' && $trans_flag >= 0 )

And so on...I've tried this in both fashions, in the hopes of getting
forwarding to work, no joy.
 

> +		( ForwardTo => $args{ARGSRef}->{'ForwardTo'},
> +		  BccMessageTo => $args{ARGSRef}->{'UpdateBcc'},
> +		  MIMEObj => $Message,
> +		  TimeTaken => $args{ARGSRef}->{'UpdateTimeWorked'});
> +	    push(@{$args{Actions}}, $Description);
> +	} else {
>  	    push(@{$args{'Actions'}}, "Update type was neither correspondence nor comment. Update not recorded");
>  	}
>      }

Curiously, and perhaps this is where I'm going wrong still, I needed an
additional closing brace within ProcessUpdateMessage() or Apache
wouldn't start.  This makes the relevant bit:

            if ( $trans_type eq 'Comment' && $trans_flag >= 0 ) {
                my ( $Transaction, $Description ) = $args{TicketObj}->Comment(
                    CcMessageTo  => $args{ARGSRef}->{'UpdateCc'},
                    BccMessageTo => $args{ARGSRef}->{'UpdateBcc'},
                    MIMEObj      => $Message,
                    TimeTaken    => $args{ARGSRef}->{'UpdateTimeWorked'}
                );
                push ( @{ $args{Actions} }, $Description );
            } elsif ( $trans_type eq 'Correspond' && $trans_flag >= 0 ) { 
	        my ( $Transaction, $Description ) = $args{TicketObj}->Correspond(
                    CcMessageTo  => $args{ARGSRef}->{'UpdateCc'},
                    BccMessageTo => $args{ARGSRef}->{'UpdateBcc'},
                    MIMEObj      => $Message,
                    TimeTaken    => $args{ARGSRef}->{'UpdateTimeWorked'}
                );
                push ( @{ $args{Actions} }, $Description );
            } elsif ($args{ARGSRef}->{'UpdateType'} eq 'forward') {
                my ( $Transaction, $Description) = $args{TicketObj}->Forward(
                 ForwardTo      => $args{ARGSRef}->{'ForwardTo'},
                 BccMessageTo   => $args{ARGSRef}->{'UpdateBcc'},
                 MIMEObj        => $Message,
                 TimeTaken      => $args{ARGSRef}->{'UpdateTimeWorked'});
               push( @{ $args{Actions} }, $Description);
           } else {
            push ( @{ $args{'Actions'} }, "Update type was neither correspondence nor comment nor forward. Update not recorded");
        }
   }
}

}


I've been staring at the function for a few hours, so I may be missing
something obvious.  I've also tried the elsif as:

            } elsif ( $trans_type eq 'forward') {

and
 
            } elsif ( $trans_type eq 'forward' && $trans_flag >=0 ) {

Also, no change in actually forwarding.

Sorry for the braindeadness of the question, I know the solution is
close (and yes, I've restarted apache), but not quite close enough.

Any thoughts on the obvious, or non-obvious, would be appreciated.  This
is for rt-2-0-13, by the way.


Thanks,

Scott





More information about the rt-users mailing list