Auto-open tickets only for new tickets?

One of the complaints I’ve been getting about RT is that if you comment on a closed ticket, it re-opens it, when all you may be doing is adding information that should really be there.

Would the below “fix” work? Basically we still want to be able to auto-create tickets via e-mail submission, and talk to RT via e-mail, but if we add information to a resolved ticket (via web or e-mail) we want the ticket to stay resolved.

-Sheeri Kritzer

You’ll want to look around line 1750 of lib/RT/Ticket.pm for the
code that handles “Ticket auto-opened on incoming correspondence”.
if (
($TicketAsSystem->Status ne ‘open’) and
($TicketAsSystem->Status ne ‘new’)
) {

becomes

if (
    ($TicketAsSystem->Status ne 'open') and
    ($TicketAsSystem->Status ne 'new') and
    ($TicketAsSystem->Status ne 'stalled')
   ) { 

or possibly just
if ($TicketAsSystem->Status eq ‘resolved’) {

sheeri.kritzer@tufts.edu wrote:

Would the below “fix” work? Basically we still want to be able to
auto-create tickets via e-mail submission, and talk to RT via e-mail,
but if we add information to a resolved ticket (via web or e-mail)
we want the ticket to stay resolved.

If you want it to never auto-open, just comment out that code
entirely. If you still want stalled tickets to auto-open,

 if ($TicketAsSystem->Status eq 'stalled') {

should do the trick.

This really should be scrip-able. But I’d be quite
surprised if that wasn’t the plan for 2.2 :slight_smile:

Actually, you could pretty much scrip it now. Comment out
the code in question, and add some ScripActions… something
like

OnCorrespond OpenTicketIfResolved with template Blank
OnCorrespond OpenTicketIfStalled with template Blank
OnCorrespond OpenTicketIfStalled with template Blank

and maybe even a new ScripCondition for the original problem,

OnRequestorMail OpenTicket with template Blank

Quoting Phil Homewood pdh@snapgear.com:

If you want it to never auto-open, just comment out that code
entirely. If you still want stalled tickets to auto-open,

 if ($TicketAsSystem->Status eq 'stalled') {

should do the trick.

Hrm. It might be implicit in your answer, but what I want to know is:

If I code out the auto-opening functionality, will it still create new tickets
when it is e-mailed (without the [hostname.com #] subject line)?

Sheeri Kritzer

sheeri.kritzer@tufts.edu wrote:

Hrm. It might be implicit in your answer, but what I want to know is:

If I code out the auto-opening functionality, will it still create new tickets
when it is e-mailed (without the [hostname.com #] subject line)?

Yes. The auto-open code is just for status changes to open; it
doesn’t affect creation of tickets.