2

We recently migrated from Spiceworks to RT4. In Spiceworks, you could set it to where it auto assigns a ticket upon an tech's reply or use email tags to assign it to another tech.

Is there a way to accomplish this functionality in RT4?

I assume some perl is involved and I would like to get the web portal to auto assign an owner upon a reply at a minimum.

EDIT:

Assigning owner on comment solved by adding a new global script:

Condition: On Correspond
Action: User Defined
Template: Blank
Stage: TransCreate

And by placing this code in "Custom action preparation code:"

my $Actor = $self->TransactionObj->CreatorObj->Id;
if( $Actor != $self->TicketObj->OwnerObj->Id ) { 
$RT::Logger->info("Auto assign ticket #". $self->TicketObj->id ." to user #". $Actor ); 
my ($status, $msg) = $self->TicketObj->SetOwner( $Actor );
unless( $status ) { die "Error: $msg"; 
}
} 
return 1;

One of the caveats I encountered was that if the creator of the ticket was a tech, it would assign the ticket to nobody. Worked if the commentor was another tech.

The email commands were solved by Nathan C's post.

HopelessN00b
  • 53,385
  • 32
  • 133
  • 208
AWippler
  • 1,055
  • 1
  • 12
  • 32

2 Answers2

2

There's an extension to allow this: http://search.cpan.org/dist/RT-Extension-CommandByMail/

Installs on RT4 and should work out of the box.

Nathan C
  • 14,901
  • 4
  • 42
  • 62
  • That helps with the email side, but what about the web side? – AWippler Jun 18 '13 at 19:03
  • Something like this? http://requesttracker.wikia.com/wiki/SetOwnerAndQueueBySubject Note that searching for "requesttracker autoassign" returns quite a few other results too. – Nathan C Jun 18 '13 at 19:05
2

To assign owner on reply you can create a scrip and have it run on Correspond or Comment or both. For the scrip action, you can see an example of setting owner on the community RT wiki. Variations are to only set it if the current owner is 'Nobody'. You can add more debug statements while experimenting to see what's happening. Make sure you set your log level to 'debug' so you see the messages.

Jim Brandt
  • 280
  • 1
  • 4
  • This link you shared had the code I needed. Updating my ticket with edits on how I resolved it and marking yours as the solution since it had answered my initial question. – AWippler Jun 19 '13 at 15:47