[rt-users] How can I stop the owner opening a ticket on correspondence?

Justin Hayes justin.hayes at orbisuk.com
Mon Jul 2 13:47:27 EDT 2007


RT 3.6.3

Currently whenever anyone corresponds on a ticket and the ticket is  
not open say 'stalled' for example the Ticket gets reopened (by lib/ 
RT/Action/AutoOpen.pm').

Is there a way to stop it from doing this if the creator of the  
transaction is the owner of the ticket? My guys add responses to  
tickets and want to be able to do this without reopening.

prepare in AutoOpen does the following to check if the creator of the  
transaction is the requestor:

return undef if $status eq 'new' && $self->TransactionObj->IsInbound;

IsInbound looks like (in Transaction_Overlay.pm)

sub IsInbound {
     my $self = shift;
     $self->ObjectType eq 'RT::Ticket' or return undef;
     return ( $self->TicketObj->IsRequestor( $self->CreatorObj- 
 >PrincipalId ) );
}

so I created:

sub IsOwnerTransaction {
     my $self = shift;
     $self->ObjectType eq 'RT::Ticket' or return undef;
     return ( $self->TicketObj->IsOwner( $self->CreatorObj- 
 >PrincipalId ) );
}

and put the following in prepare in AutoOpen.pm:

return undef if $self->TransactionObj->IsOwnerTransaction;

However now nothing reopens my ticket whether it's the owner or not.

Maybe there's an easier way, or my IsOwnerTransaction function is  
wrong. Any help appreciated.....

Justin
------------------------------------------------------
Justin Hayes
Support Manager
justin.hayes at orbisuk.com



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20070702/6fc4d3bd/attachment.htm>


More information about the rt-users mailing list