[SOLVED] Prevent reopening of old tickets

Moderator: crythias

Post Reply
jrmarques
OTRS newbie
Posts: 8
Joined: 23 Jul 2019, 12:32
OTRS Version?: 5.0.16

[SOLVED] Prevent reopening of old tickets

Post by jrmarques »

Our system currently uses "Follow up: possible" on all queues. This is what we are used to and normally plays out well. But, from time to time there is someone that reopens a 3 month old ticket.

Is there any way to prevent the reopening of tickets older than?

I suppose a possibility would be creating a duplicate set o queues where the follow-up is disallowed and create a generic agent action to move the old tickets to its twin queue. This is too messy for me.

Any thoughts?
Last edited by jrmarques on 07 Aug 2019, 09:09, edited 1 time in total.

wurzel
OTRS guru
Posts: 2937
Joined: 08 Jul 2010, 22:25
OTRS Version?: 6.0.x

Re: Prevent reopening of old tickets

Post by wurzel »

Hi,

use a "pending auto" state with the name "solved" or similar and set the queue follow up option on reject.

Flo
OTRS 8 SILVER (Prod)
OTRS 8 auf Debian 10 (Test)
    ((OTRS)) Community Edition 6.0.x, LAMP LIVE auf Debian 10

    -- Ich beantworte keine Forums-Fragen PN - No PN please

    I won't answer to unfriendly users any more. A greeting and regards are just polite.

    jrmarques
    OTRS newbie
    Posts: 8
    Joined: 23 Jul 2019, 12:32
    OTRS Version?: 5.0.16

    Re: Prevent reopening of old tickets

    Post by jrmarques »

    Hmmm... interesting. That would work but it would mean retrain all the agents and "loosing" the "Close" option in all the menus.

    Any other idea?

    I know some perl. I'm happy to change the code if anyone points me in the right direction.

    jrmarques
    OTRS newbie
    Posts: 8
    Joined: 23 Jul 2019, 12:32
    OTRS Version?: 5.0.16

    Re: Prevent reopening of old tickets

    Post by jrmarques »

    "I won't answer to unfriendly users any more. A greeting and regards are just polite."

    You're right.

    Hi

    Thanks in advance.

    crythias
    Moderator
    Posts: 10121
    Joined: 04 May 2010, 18:38
    OTRS Version?: 5.0.x
    Location: SouthWest Florida, USA
    Contact:

    Re: Prevent reopening of old tickets

    Post by crythias »

    Another option, perhaps: Creating an "Archive" queue.
    Generic agent: Ticket closed more than X days ago, move to Archive queue. This queue doesn't allow followup: possible.

    Test before production.
    OTRS 5.0.x (private/testing/public) on Linux with MySQL database. Also on github.
    Please edit your signature to include your OTRS version, Operating System, and database type.
    Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
    Need help? Before you ask

    jrmarques
    OTRS newbie
    Posts: 8
    Joined: 23 Jul 2019, 12:32
    OTRS Version?: 5.0.16

    Re: Prevent reopening of old tickets

    Post by jrmarques »

    "Creating an "Archive" queue."

    That's what I said in my initial question. In order not to loose the Queue statistics I would have to create an entire twin queue tree with no follow-up possible.

    Is there any simpler option?

    crythias
    Moderator
    Posts: 10121
    Joined: 04 May 2010, 18:38
    OTRS Version?: 5.0.x
    Location: SouthWest Florida, USA
    Contact:

    Re: Prevent reopening of old tickets

    Post by crythias »

    Simpler? I'm not sure what queue moves mean to your metrics.
    You're asking if it's simpler for database queries to be done for (an old) ticket before (during) processing of an incoming update to a ticket, rather than archive a ticket.

    No, you'd have to program it. Or react to it via Generic Agent, somehow, and I'm not certain the order of operations. Maybe generic agent closed time before 3 months ago change state to close, and also somehow do a notification on this.

    In theory, the easiest way to program this is hard code the query into
    https://github.com/OTRS/otrs/blob/rel-6 ... Up.pm#L170

    It's not the "right" way to do it, though, because it will get clobbered upon updates.

    https://github.com/OTRS/otrs/blob/rel-6 ... tReject.pm and/or https://github.com/OTRS/otrs/blob/rel-6 ... tyCheck.pm might give you more of a hint on how to build your own PostMaster PreFilter Module that checks the date (from TicketGet) before rejecting.
    OTRS 5.0.x (private/testing/public) on Linux with MySQL database. Also on github.
    Please edit your signature to include your OTRS version, Operating System, and database type.
    Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
    Need help? Before you ask

    root
    Moderator
    Posts: 2182
    Joined: 18 Dec 2007, 12:23
    OTRS Version?: 4/5/6
    Real Name: Roy Kaldung
    Company: Znuny Inc.
    Contact:

    Re: Prevent reopening of old tickets

    Post by root »

    Hi,

    The simplest method is to buy an existing feature add-on. Everything else needs some work.

    - Roy
    OTRS 5/6 CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

    Do you need professional services for the ((OTRS)) Community Edition? Check out https://www.znuny.com/

    jrmarques
    OTRS newbie
    Posts: 8
    Joined: 23 Jul 2019, 12:32
    OTRS Version?: 5.0.16

    Re: Prevent reopening of old tickets

    Post by jrmarques »

    Hi Roy.

    Which add-on do I need?

    Thanks in advance.

    jrmarques
    OTRS newbie
    Posts: 8
    Joined: 23 Jul 2019, 12:32
    OTRS Version?: 5.0.16

    Re: Prevent reopening of old tickets

    Post by jrmarques »

    In reply to crythias:
    "I'm not sure what queue moves mean to your metrics."

    We need to know what queue the ticket ended up in order to draw statistics on what areas are we getting more tickets (software, hardware, etc...). If we move all tickets to the same queue after 3 months we loose this statistics.

    I'll take a look at your suggestions.

    Thanks a lot.

    jrmarques
    OTRS newbie
    Posts: 8
    Joined: 23 Jul 2019, 12:32
    OTRS Version?: 5.0.16

    Re: Prevent reopening of old tickets

    Post by jrmarques »

    Hi crythias.

    I think I understand the Postmaster Filter Module option. The idea would be to write a new module that rejects the followups if they are for a ticket older than X days. This way I wouldn't loose things with an OTRS update.

    What I failed to find out was the order in which the Postmaster Filter Modules are executed. How do specify that my module should be executed prior to the FollowUp.pm module? Because if it gets executed after, the followup is already accepted and inserted in DB. Am I mistaken?

    Thanks in advance.

    crythias
    Moderator
    Posts: 10121
    Joined: 04 May 2010, 18:38
    OTRS Version?: 5.0.x
    Location: SouthWest Florida, USA
    Contact:

    Re: Prevent reopening of old tickets

    Post by crythias »

    I think it's either the numeric order in the .xml to register it or the ABC order in general.
    OTRS 5.0.x (private/testing/public) on Linux with MySQL database. Also on github.
    Please edit your signature to include your OTRS version, Operating System, and database type.
    Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
    Need help? Before you ask

    jrmarques
    OTRS newbie
    Posts: 8
    Joined: 23 Jul 2019, 12:32
    OTRS Version?: 5.0.16

    Re: [SOLVED] Prevent reopening of old tickets

    Post by jrmarques »

    I'm marking this as solved. Anyone wishing to do this has now a couple of routes to do it by configuration and pointers to creating a Postmaster Filter.

    I'll try to write this last one myself. If I find get it running, I'll post it here.

    Thank you all for your help.

    Post Reply