Sender to Owner

Is there a simple way to make the sender of an emailed ticket the owner upon
receipt instead of “Nobody”?

Joel Hartshorn
Internet Engineer/New Media
The Seattle Times Company
206 464 2323
nwsource.com | seattletimes.com

smime.p7s (3.28 KB)

Is there a simple way to make the sender of an emailed ticket the owner upon
receipt instead of “Nobody”?
I don’t really understand your question, but if you look on the wiki,
there’s a Scrip that will make any AdminCC acting on a ticket the
owner of the ticket. It seems similar to what you’re asking for.

Cambridge Energy Alliance: Save money. Save the planet.

Is there a simple way to make the sender of an emailed ticket the owner upon
receipt instead of “Nobody”?

Joel Hartshorn
Internet Engineer/New Media
The Seattle Times Company
206 464 2323
nwsource.com | seattletimes.com

That assumes that the sender is a privileged user, right?

We use the following code to make the sender of any FOLLOWUP to a ticket
the owner, if it’s unowned. I bet changing ‘Correspond’ to ‘Create’ would
do what you want.:

Custom condition:

my $txn = $self->TransactionObj;
return 0 unless $txn->Type eq ‘Correspond’;

my $ticket = $self->TicketObj;
return 0 if $ticket->OwnerObj->id != $RT::Nobody->id;

my $actor = $txn->CreatorObj;
return 0 if $actor->id == $RT::SystemUser->id;

return 0 unless $actor->PrincipalObj->HasRight(
Object => $ticket,
Right => ‘OwnTicket’,
);
return 1;

Custom prepare:

$self->{‘set_owner_to’} = $self->TransactionObj->CreatorObj->id;
return 1;

Custom commit:

my ($status, $msg) = $self->TicketObj->SetOwner( $self->{‘set_owner_to’} );
unless ( $status ) {
$RT::Logger->error(“Couldn’t set owner: $msg”);
return 0;
}
return 1;