<div>I can't get this to work. Coould you give me a hand?</div>
<div>thanks<br><br></div>
<div class="gmail_quote">On Mon, Nov 2, 2009 at 9:15 AM, Emmanuel Lacour <span dir="ltr"><<a href="mailto:elacour@easter-eggs.com">elacour@easter-eggs.com</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div>
<div></div>
<div class="h5">On Wed, Oct 28, 2009 at 09:02:09AM -0400, Juan N. DLC wrote:<br>> Hi to all,<br>><br>> I want to know if someone have a scrip that make a ticket get the priority<br>> and duedate from the queue is moving to.<br>

><br>> ej.<br>><br>> Ticket#001 in queue#1 with duedate 1/priority 3<br>><br>> Ticket#001 have now a dudedate1 and priority 3<br>><br>> when the Ticket#001 is moved to queue#2 with duedate 3 / priority 1 - The<br>

> ticket still have the queue#1 duedate/priority settings.<br>><br>> Can some one be so kind to point me to the right direction here or can give<br>> me a scrip for this.<br>><br><br></div></div>You have to create a scrip "On queue change", in this scrip, get the new<br>

queue<br><br>something like this:<br><br>my $queue_id = $self->TransactionObj->NewValue;<br>my $queue = RT::Queue->new( $RT::SystemUser );<br>$queue->Load($queue_id);<br><br>get values for duedate and priority:<br>

<br>$queue->DefaultDueIn;<br>$queue->InitialPriority;<br><br>use those values to set them on the ticket:<br><br># Priority<br>$self->TicketObj->SetPriority($queue->InitialPriority);<br><br># Due Date<br>my $due_date = RT::Date->new($RT::SystemUser);<br>

$due_date->Set(Format => 'ISO', Value => $self->TicketObj->Due);<br>$due_date->AddDays($queue->InitialPriority);<br>$self->TicketObj->SetDue($due_date->ISO);<br><br>_______________________________________________<br>

<a href="http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users" target="_blank">http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users</a><br><br>Community help: <a href="http://wiki.bestpractical.com/" target="_blank">http://wiki.bestpractical.com</a><br>

Commercial support: <a href="mailto:sales@bestpractical.com">sales@bestpractical.com</a><br><br><br>Discover RT's hidden secrets with RT Essentials from O'Reilly Media.<br>Buy a copy at <a href="http://rtbook.bestpractical.com/" target="_blank">http://rtbook.bestpractical.com</a><br>

</blockquote></div><br>