Suppressing notification to subscribers for closed Tickets

English! place to talk about development, programming and coding
Post Reply
Pirx Danford
Znuny newbie
Posts: 4
Joined: 08 Oct 2010, 10:08
Znuny Version: 2

Suppressing notification to subscribers for closed Tickets

Post by Pirx Danford »

Assumed you have Tickets that only go into your ticket system for documentation purposes and they are within a queue that also receives important tickets.
So there are agents that have that queue on subscription.
These agents will receive notifications even when a ticket is already created in a closed state.

As there is no configuration setting for this you can either define a different queue for the closed tickets,
or you can hack the file in Kernel/System/Ticket/Article.pm
Search for "UserSendNewTicketNotification" and right below the line containing it add

Code: Select all

            $Self->{DBObject}->Prepare( SQL => "SELECT ticket_state_type.name FROM ticket_state_type,ticket_state,ticket WHERE ticket_state.type_id=ticket_state_type.id AND ticket_state.id=ticket_state_id AND ticket.id=" . $Param{TicketID} );
            my @Skip_Check = $Self->{DBObject}->FetchrowArray();
            next if $Skip_Check[0] eq 'closed';
This will skip notification of subscribed agents for all tickets that are already in a state that is closed.
Using OTRS 2.4.7 on Ubuntu 10.04 LTS
Post Reply