[SOLVED] Prevent reopening of old tickets

Moderator: crythias

Post Reply
jrmarques
Znuny newbie
Posts: 9
Joined: 23 Jul 2019, 12:32
Znuny Version: 6.5.1
Real Name: J R Marques

[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
Znuny guru
Posts: 3224
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

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 11 (Test)
Znuny 7.x latest version testing auf Debian 11

-- 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
Znuny newbie
Posts: 9
Joined: 23 Jul 2019, 12:32
Znuny Version: 6.5.1
Real Name: J R Marques

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
Znuny newbie
Posts: 9
Joined: 23 Jul 2019, 12:32
Znuny Version: 6.5.1
Real Name: J R Marques

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: 10169
Joined: 04 May 2010, 18:38
Znuny 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 6.0.x (private/testing/public) on Linux with MySQL database.
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
Znuny newbie
Posts: 9
Joined: 23 Jul 2019, 12:32
Znuny Version: 6.5.1
Real Name: J R Marques

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: 10169
Joined: 04 May 2010, 18:38
Znuny 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 6.0.x (private/testing/public) on Linux with MySQL database.
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
Administrator
Posts: 3934
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
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
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
jrmarques
Znuny newbie
Posts: 9
Joined: 23 Jul 2019, 12:32
Znuny Version: 6.5.1
Real Name: J R Marques

Re: Prevent reopening of old tickets

Post by jrmarques »

Hi Roy.

Which add-on do I need?

Thanks in advance.
jrmarques
Znuny newbie
Posts: 9
Joined: 23 Jul 2019, 12:32
Znuny Version: 6.5.1
Real Name: J R Marques

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
Znuny newbie
Posts: 9
Joined: 23 Jul 2019, 12:32
Znuny Version: 6.5.1
Real Name: J R Marques

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: 10169
Joined: 04 May 2010, 18:38
Znuny 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 6.0.x (private/testing/public) on Linux with MySQL database.
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
Znuny newbie
Posts: 9
Joined: 23 Jul 2019, 12:32
Znuny Version: 6.5.1
Real Name: J R Marques

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