Hi all,<br><br>I'm trying to automatically assign tickets whenever someone either <br><br>a) comments a ticket or alternatively,<br>b) responds to a ticket<br><br>The conditions are that the current owner is Nobody and the user cannot be user 'X' (my supervisor for instance, might post comments on a ticket first, but he's the boss and we want to exclude him from getting ownership.)  Here's the Scrip I put together thus far. If anyone can shed some light, that'd be great!
<br><br>PS: If there is a better forum for me to post this on, I'd be more than happy to not waste any of your bandwidth and go there.<br><br>Description: Ticket Auto Assign<br>Condition: On Comment (I'm not sure how to get On Comment AND On reply at the same time? Need two different Scrips?)
<br>Action: User Defined<br>Template: Global Template: Transaction (I'm not sure what this does, need to look it up on the Wiki)<br>Stage: Disabled (No idea what this one does either ..)<br>Custom Condition:<br>Custom Action Preparation Code:
<br><br>my $notOwner = "billybob"; # I don't want billybob to get assigned any tickets no matter if he replies first<br>my $Actor = $self->TransactionObj->Creator;<br><br>return 1 unless $self->TicketObj->Owner == $RT::Nobody->id;
<br>$RT::Logger->info("Auto assign ticket #". $self->TicketObj->id ." to user #". $Actor );<br>my ($status, $msg) = $self->TicketObj->SetOwner( $Actor ) unless $Actor == $notOwner;<br>unless ( $status ) {
<br>    $RT::Logger->error( "Impossible to assign the ticket to $Actor: $msg" );<br>    return undef;<br>}<br>return 1;<br>Custom action cleanup code: return 1;<br><br clear="all">This doesn't look to do the trick. Any suggestions again, would be more than appreciated.
<br><br>Thanks all!<br>-- <br>Steve