[rt-users] Help with Scrip to move a ticket into a new queue
Gilbert Rebeiro
gilbert at dido.ca
Tue Aug 23 17:11:41 EDT 2011
Excellent,, , it worked.
Many thanks to all that helped.
On 23/08/2011 11:14 AM, Kenneth Crocker wrote:
> Gilbert,
>
> You might also want to remove the "return 1;" in the custom Condition
> code since you have already set the condition as "OnCreate". It isn't
> needed. I don't know if it messes anything up, but I wouldn't leave
> anything in a coded area that isn't needed.
>
> Hope this helps.
>
> Kenn
> LBNL
>
> On Tue, Aug 23, 2011 at 4:27 AM, Ruslan Zakirov <ruz at bestpractical.com
> <mailto:ruz at bestpractical.com>> wrote:
>
> You need 'return 1;' in preparation code.
>
> Regards, Ruslan. From phone.
>
> 23.08.2011 3:16 ???????????? "Gilbert Rebeiro" <gilbert at dido.ca
> <mailto:gilbert at dido.ca>> ???????:
>
> > Hi,
> >
> > I a queue called fr
> >
> > There is a simple autoreply that is bound to this queue.
> >
> > Scrip is setup:
> >
> > Condition: OnCreate
> > Action: User defined
> > Template: Autoreply
> > Stage: TransactionCreate
> > Custom condition: return 1;
> > Custom action preparation code:
> >
> > Custom action cleanup code:
> >
> > # Change queue
> > my $newqueue = "1.General";
> > my $T_Obj = $self->TicketObj;
> >
> > $RT::Logger->info("Auto assign ticket #". $T_Obj->id ." to queue
> #".
> > $newqueue );
> > my ($status, $msg) = $T_Obj->SetQueue($newqueue);
> > unless ($status) {
> > $RT::Logger->warning("unable to set new queue: $msg");
> > return undef;
> > }
> > return 1;
> >
> > It is not a typo "1.General" it is the proper name of the queue
> that I
> > want new tickets to be moved to.
> >
> >
> > Not sure what I am doing wrong but it doesn't work.
> > Can anyone tell me how to debug this?
> > Trace this?
> >
> > What am I doing wrong?
> >
> > Thanks,
> > Gilbert.
> > --------
> > RT Training Sessions
> (http://bestpractical.com/services/training.html)
> > * Chicago, IL, USA September 26 & 27, 2011
> > * San Francisco, CA, USA October 18 & 19, 2011
> > * Washington DC, USA October 31 & November 1, 2011
> > * Melbourne VIC, Australia November 28 & 29, 2011
> > * Barcelona, Spain November 28 & 29, 2011
>
> --------
> RT Training Sessions (http://bestpractical.com/services/training.html)
> * Chicago, IL, USA --- September 26 & 27, 2011
> * San Francisco, CA, USA --- October 18 & 19, 2011
> * Washington DC, USA --- October 31 & November 1, 2011
> * Melbourne VIC, Australia --- November 28 & 29, 2011
> * Barcelona, Spain --- November 28 & 29, 2011
>
>
>
>
> --------
> RT Training Sessions (http://bestpractical.com/services/training.html)
> * Chicago, IL, USA --- September 26& 27, 2011
> * San Francisco, CA, USA --- October 18& 19, 2011
> * Washington DC, USA --- October 31& November 1, 2011
> * Melbourne VIC, Australia --- November 28& 29, 2011
> * Barcelona, Spain --- November 28& 29, 2011
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20110823/56703240/attachment.htm>
More information about the rt-users
mailing list