Wikia

Request Tracker Wiki

Watchlist Recent changes

AutoCcLastOwner

AutoCcLastOwner Edit

This scrip adds the previous owner of a ticket to the Cc list when the owner is changed.

Description: AutoCcOwner
Condition: On Owner Change
Action: User Defined
Custom action preparation code:
 my $last_id = $self->TransactionObj->OldValue;
 my $temp_user = RT::User->new();
 $temp_user->Load($last_id);
 my $last_email = $temp_user->EmailAddress();
 $self->TicketObj->AddWatcher( Type => "Cc",
                             Email => $last_email);
 return 1;

Custom action cleanup code:
 return 1;
Template: Global template: Blank

Automatically AdminCc last owner when owner changes to Nobody Edit

When someone moves tickets between queues, the owner may forcibly get changed to Nobody, and then the previous owner loses access to the ticket. This variant of the above scrip will detect this situation and automatically add that previous owner as an AdminCc.

Custom action preparation code:

# only act if the owner was changed to "Nobody"
 my $new_id = $self->TransactionObj->NewValue;
 return 1 unless ($new_id == $RT::Nobody->Id);
 
 # add the previous owner to the AdminCc list
 my $last_id = $self->TransactionObj->OldValue;
 my $temp_user = RT::User->new();
 $temp_user->Load($last_id);
 my $last_email = $temp_user->EmailAddress();
 $self->TicketObj->AddWatcher( Type => "AdminCc",
                             Email => $last_email);
 return 1;
 

Pages on Request Tracker Wiki

Add a Page
857pages on
this wiki

Latest Photos

Add a Photo
28photos on this wiki
See more >

Recent Wiki Activity

See more >

Around Wikia's network

Random Wiki