Steven,<br><br>I don't know if this idea will help, but we use a Custom Field we call "CFO-Org" and when someone sends in an email, CommandByMail allows us to set that field and we use that value against an array of possible values in a scrip to set the owner for the ticket. It's a variation of using a value in the Subject field, except that it's a Custom Field value set by using CommandByMail. Hope this helps.<br>
<br><br>Kenn<br>LBNL<br><br><div class="gmail_quote">On Wed, Sep 8, 2010 at 6:24 AM, Steven Platt <span dir="ltr"><<a href="mailto:Steven.Platt@hpa.org.uk">Steven.Platt@hpa.org.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi,<br>
<br>
I'm trying to achieve this using a chopped version of<br>
<a href="http://wiki.bestpractical.com/view/SetOwnerAndQueueBySubject" target="_blank">http://wiki.bestpractical.com/view/SetOwnerAndQueueBySubject</a> and some<br>
wisdom clipped from elsewhere in the wiki (some of the scrips pages, I<br>
forget exactly which), and here is what I have:<br>
<br>
Condition: On Create<br>
Action: User defined<br>
Template: Global template:blank<br>
Stage: TransactionCreate<br>
<br>
Custom prep code<br>
----------------<br>
<br>
$t_org = $self->TransactionObj->CreatorObj->__Value('Organization'); ##<br>
also tried $t_org = $self->TransactionObj->CreatorObj->Organization;<br>
if ( $t_org !~ /(VRD|GEZI)/i ) { return 0; }<br>
else { return 1; }<br>
<br>
<br>
Custom cleanup code<br>
-------------------<br>
<br>
$t_org = $self->TransactionObj->CreatorObj->__Value('Organization'); ##<br>
also tried $t_org = $self->TransactionObj->CreatorObj->Organization;<br>
if ( $t_org =~ /VRD/i ) { $newowner = "owner.a"; }<br>
if ( $t_org =~ /GEZI/i ) { $newowner = "owner.b"; }<br>
my $T_Obj = $self->TicketObj;<br>
<br>
$RT::Logger->info("Auto assign ticket #". $T_Obj->id ." to user #".<br>
$newowner );<br>
my ($status, $msg) = $self->TicketObj->SetOwner( $newowner );<br>
unless( $status ) {<br>
$RT::Logger->error( "Impossible to assign the ticket to $newowner:<br>
$msg" );<br>
return undef;<br>
}<br>
return 1;<br>
<br>
<br>
...but it appears to have no effect on the ticket whatsoever. Can anyone<br>
point me in the right direction?<br>
<br>
Also, I'm testing this by generating dummy tickets on our production<br>
(and only) instance of RT. This can't be the recommended method of scrip<br>
testing, can it!!<br>
<br>
TIA<br>
<br>
Steve<br>
HPA Bioinformatics<br>
UK<br>
-----------------------------------------<br>
**************************************************************************<br>
The information contained in the EMail and any attachments is<br>
confidential and intended solely and for the attention and use of<br>
the named addressee(s). It may not be disclosed to any other person<br>
without the express authority of the HPA, or the intended<br>
recipient, or both. If you are not the intended recipient, you must<br>
not disclose, copy, distribute or retain this message or any part<br>
of it. This footnote also confirms that this EMail has been swept<br>
for computer viruses, but please re-sweep any attachments before<br>
opening or saving. <a href="HTTP://www.HPA.org.uk" target="_blank">HTTP://www.HPA.org.uk</a><br>
**************************************************************************<br>
<br>
RT Training in Washington DC, USA on Oct 25 & 26 2010<br>
Last one this year -- Learn how to get the most out of RT!<br>
</blockquote></div><br>