<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1522" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>I'll be very interested in the answers or the
solution you get ..</FONT></DIV>
<DIV><FONT face=Arial size=2>Its all down to the order the update page
(Update.html) or (ModifyAll.html) excute things ..</FONT></DIV>
<DIV><FONT face=Arial size=2>In your case: it picks up the change of status and
excute all scrips related to this including moving to a different
queue=>Q2.</FONT></DIV>
<DIV><FONT face=Arial size=2>then it goes through the Queue name and
beacuse when you loaded update.html the ticket was in Q1, hence its that value
loaded into %ARGS->{Queue}</FONT></DIV>
<DIV><FONT face=Arial size=2>and so it assume you need a change of queue back to
Q1 ..</FONT></DIV>
<DIV><FONT face=Arial size=2>I have very similar problem (regarding owners) and
I am interested of how this can be resolved.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Regards;</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Roy</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=dev.crash@gmail.com href="mailto:dev.crash@gmail.com">David</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A
title=rt-users@lists.bestpractical.com
href="mailto:rt-users@lists.bestpractical.com">rt-users@lists.bestpractical.com</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Wednesday, October 26, 2005 7:05
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [rt-users] Change Queue Custom
Scrip - moves back to original queueafter webui reloads</DIV>
<DIV><BR></DIV>Greetings Everyone,<BR><BR>I have created a custom status that
I am trying to set a condition on to move tickets from one queue to
another. The code that I have used is....<BR><BR>Condition: On Status
Change<BR>Action: User Defined<BR><BR>Custom Condition: return 1;<BR>Custom
action preparation code: return 1;<BR>Custom action cleanup
code:<BR>#----------------------------------------------------------------<BR>my
$TargetQueueName = 'Queue2';<BR>my $NewStatus = 'PassToQueue2';<BR>if
(($self->TicketObj->Status eq "$NewStatus") &&
($self->TicketObj->QueueObj->Name ne "$TargetQueueName"))
{<BR> my $TicketObj =
$self->TicketObj;<BR> my $Id =
$TicketObj->Id;<BR> my $Status =
$TicketObj->Status;<BR> my $QueueName =
$TicketObj->QueueObj->Name;<BR><BR> if ($Status ne
$NewStatus) {<BR> my ($tstatus,
$tmsg) =
$TicketObj->SetStatus("$NewStatus");<BR>
$RT::Logger->info("Changing status of ticket #". $Id ." to ".
$NewStatus);<BR> unless ($tstatus)
{<BR> die
"Error: $tmsg";<BR>
}<BR> }<BR> if ($QueueName ne
$TargetQueueName) {<BR> my
($qstatus, $qmsg) =
$TicketObj->SetQueue("$TargetQueueName");<BR>
$RT::Logger->info("Moving Ticket #". $Id ." to ". $TargetQueueName ."
Queue.");<BR> unless ($qstatus)
{<BR> die
"Error: $qmsg";<BR>
}<BR> }<BR>}<BR>return
1;<BR>#----------------------------------------------------------------<BR><BR>The
ticket moves queues but when the web ui reloads it resets it back to the old
queue.<BR><BR>I appreciate all feedback ....<BR><BR>Thanks.<BR>David.<BR>
<P>
<HR>
<P></P>_______________________________________________<BR>http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users<BR><BR>Be
sure to check out the RT Wiki at http://wiki.bestpractical.com<BR><BR>Buy your
copy of our new book, RT Essentials, today! <BR><BR>Download a free sample
chapter from http://rtbook.bestpractical.com</BLOCKQUOTE></BODY></HTML>