[rt-users] Status changed from Resolved to Open during reply?
Ruslan U. Zakirov
Ruslan.Zakirov at acronis.com
Wed Oct 13 07:44:45 EDT 2004
Kent wrote:
> On Tue, 12 Oct 2004 10:33:59 -0500, Kent <drizit at gmail.com> wrote:
>
>>>On Mon, 11 Oct 2004 16:52:04 -0400, Jesse Vincent
>>><jesse at bestpractical.com> wrote:
>>>
>>>
>>>>Because you've got an "OnCorrespond, Open ticket" scrip. It's not done
>>>>"in the user's process". It's done by the business logic.
>>
>>In an effort to fix my logic I have copied AutoOpen.pm to my
>>local/RT/Action directory and made the following changes to it listed
>>below. I am trying to make it so a correspondence from the WebUI or
>>Email does not re-open the ticket if CurrentUser=Owner.
>
>
> I finally figured out the proper syntax for this.
:)
use next
$self->TicketObj->Owner == $self->TransactionObj->Creator
faster and less chances to get error
> For all those interested here is the change to allow AutoOpen to NOT
> open a resolved ticket if the person doing the update is the current
> owner. You do need to restart apache after making the changes.
>
> Thanks go to Ruslan and Jesse for pointing me in the right direction.
>
> # {{{ sub Prepare
> sub Prepare {
> my $self = shift;
>
> # if the ticket is already open or the ticket is new and the
> message is more mail from the
> # requestor, don't reopen it.
> if ( ( $self->TicketObj->Status eq 'open' )
> || ( ( $self->TicketObj->Status eq 'new' )
> && $self->TransactionObj->IsInbound )
> ) {
>
> return undef;
> - }
> - else {
> - return (1);
> }
>
> + #If status is resolved and actor is owner don't open.
> + if ( ( $self->TicketObj->Status eq 'resolved' )
> + && ( $self->TicketObj->OwnerObj->Name eq
> &self->TransactionObj->CreatorObj->Name )
> + ) {
> + return undef;
> + }
>
> + #Nothing matched. Exit OK
> + return (1);
> }
> # }}}
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Be sure to check out the RT wiki at http://wiki.bestpractical.com
More information about the rt-users
mailing list