[rt-devel] Re: Open from Resolved

Cris Bailiff c.bailiff at awayweb.com
Thu Sep 6 03:49:50 EDT 2001


I found this in the archive:


-----Jesse said:
The code was in two places. It's now in one.  The current solution does
not require that the user has ModifyTicket.

The bit of logic I'm referring to is in Ticket->Correspond:

    # TODO this bit of logic should really become a scrip for 2.2
    if (($TransObj->IsInbound) and 
        ($self->Status ne 'open') and
        ($self->Status ne 'new')
       ) {
        
        my $TicketAsSystem = new RT::Ticket($RT::SystemUser);
        $TicketAsSystem->Load($self->Id);
        
        my $oldstatus = $TicketAsSystem->Status();
        $TicketAsSystem->__Set(Field => 'Status', Value => 'open');
        $TicketAsSystem->_NewTransaction 
          ( Type => 'Set',
            Field => 'Status',
            OldValue => $oldstatus,
            NewValue => 'open',
            Data => 'Ticket auto-opened on incoming correspondence'
          );
    }
----------

which is a start, but when I run this with a little debugging, I seem to
see that $sself->Status is undef when running from my incoming
rt-mailgate. I can't really see how the code ever gets it populated (not
a DBIx expert yet...).

Indeed, the ticket status seems to get picked up 'afresh' once inside
the if, so somethings amiss.

I'd really like to get this feature going again, after our recent
migration from rt1.0 (yesterday). All the other differences are
liveable, but this one could turn out painful..

Cris




More information about the Rt-devel mailing list