[rt-users] "Forward" to 3rd party patch
Jan Okrouhly
okrouhly at civ.zcu.cz
Wed Apr 17 09:32:00 EDT 2002
On Wed, 17 Apr 2002, Scott A. McIntyre wrote:
> 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)
Isn't here missing something like insert_condition_OnForward.pl
containing something like (taken from my own very similar version, so
letter-case can be different;-):
my @ScripConditions = (
{
Name => 'OnForward',
Description => 'When a message is forwarded',
ApplicableTransTypes => 'Forward',
ExecModule => 'AnyTransaction',
},
);
> 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
>
>
> _______________________________________________
> rt-users mailing list
> rt-users at lists.fsck.com
> http://lists.fsck.com/mailman/listinfo/rt-users
>
Jan Okrouhly
---------------------------------------\-\-\+\-\-\---okrouhly at civ.zcu.cz---
Laboratory for Computer Science | phone: (420 19) 7491588
University of West Bohemia | location: Univerzitni 22
Americka 42, 306 14 Pilsen, Czech Republic | room: UI404
------------------------------------------73!-de-OK1INC at OK0PPL.#BOH.CZE.EU-
More information about the rt-users
mailing list