[SOLVED]Configure no state change on FollowUp

Moderator: crythias

Post Reply
Herr_K
OTRS newbie
Posts: 8
Joined: 29 Jul 2009, 09:11
OTRS Version?: 3.0.8

[SOLVED]Configure no state change on FollowUp

Post by Herr_K » 24 Aug 2011, 12:11

Hello OTRS community,

I do not want Tickets to get re-opened every time a user sends a "Thank You, it works" as an answer to my Ticket response. Prior to updating to v3 this could be accomplished by setting 'Ticket -> Core::PostMaster -> PostmasterFollowUpStateClosed' to 'closed'. Since I use v3, this does not work any more. Setting PostmasterFollowUpStateClosed to 'closed' is not possible any more, as it will only acceppt 'closed successful' or 'closed unsuccsessful'. Unfortunately this obvioiusly won't produce the behaviour I am intending.

How can I disable any state change for follow ups via email? I already tried commenting out the whole "#set state"-section in Kernel/System/PostMaster/followUp.pm. While this leads to the desired effect, that the ticket state remains unchanged, it also prevents AgentFollowUpNotifications from being sent (a corellation which I don't understand at all).

Does anyone have a hint?
Last edited by Herr_K on 24 Aug 2011, 18:44, edited 1 time in total.
OTRS 3.0.8 and MySQL on Win2003 R2
ITSM 3.0.4

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

Re: Configure no state change on FollowUp when state is 'clo

Post by crythias » 24 Aug 2011, 16:39

Yes.
http://forums.otrs.org/viewtopic.php?f= ... 221#p39971 talks about this for normal states.

Code: Select all

    <ConfigItem Name="PostmasterFollowUpStateClosed" Required="0" Valid="0">
        <Description Translatable="1">Defines the state of a ticket if it gets a follow-up and the ticket was already closed.</Description>
        <Group>Ticket</Group>
        <SubGroup>Core::PostMaster</SubGroup>
        <ValidateModule>Kernel::System::SysConfig::StateValidate</ValidateModule> <-- Remove this line
        <Setting>
            <String Regex="">open</String>
        </Setting>
    </ConfigItem>
Backup Ticket.xml, remove the ValidateModule line, save it.
in SysConfig, type $Ticket{State} instead of open.
Save it.

Let me know if this works or doesn't.

Edit: "closed" isn't a state. It's a state type. That's why it didn't validate.
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

Herr_K
OTRS newbie
Posts: 8
Joined: 29 Jul 2009, 09:11
OTRS Version?: 3.0.8

Re: Configure no state change on FollowUp when state is 'clo

Post by Herr_K » 24 Aug 2011, 17:24

That seems to be a reasonable way. Putting $Ticket{State} in PostmasterFollowUpStateClosed works after removing the line from Ticket.xml. The state now remains unchanged after a follow up as well but again no agent notification is sent. otrs.log says:

Code: Select all

Wed Aug 24 16:56:39 2011][Error][Kernel::System::State::StateGet][247] State '$Ticket{State}' not found!
[Wed Aug 24 16:56:39 2011][Error][Kernel::System::Ticket::TicketStateSet][5526] Need StateID or State!
[Wed Aug 24 16:56:39 2011][Notice][Kernel::System::PostMaster::FollowUp::Run] FollowUp Article to Ticket [2011082310000108] created (TicketID=5635, ArticleID=23579). ,[Wed Aug 24 16:56:39 2011][Notice][Kernel::System::MailAccount::POP3::Fetch] POP3: Fetched 1 email(s) from helpdesk/mail.mydomain.local.
OTRS 3.0.8 and MySQL on Win2003 R2
ITSM 3.0.4

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

Re: Configure no state change on FollowUp when state is 'clo

Post by crythias » 24 Aug 2011, 17:34

That means it's apparently not working.

Then you might want to modify Kernel/System/PostMaster/FollowUp.pm file
http://forums.otrs.org/viewtopic.php?f=62&t=6066

Code: Select all

    my $State = $Self->{ConfigObject}->Get('PostmasterFollowUpState') || 'open';
    if (
        $Ticket{StateType} =~ /^close/
        && $Self->{ConfigObject}->Get('PostmasterFollowUpStateClosed')
        )
    {
        #comment or remove this $State = $Self->{ConfigObject}->Get('PostmasterFollowUpStateClosed');
        $State = $Ticket{State};
    }
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

Herr_K
OTRS newbie
Posts: 8
Joined: 29 Jul 2009, 09:11
OTRS Version?: 3.0.8

Re: Configure no state change on FollowUp when state is 'clo

Post by Herr_K » 24 Aug 2011, 18:05

Ok. I reversed the changes in Ticket.xml, edited the FollowUp.pm accordingly and set PostmasterFollowUpStateClosed back to 'open' in the config (which should not do anything either after the changes done to FollowUp.pm, if I understand correctly).

Again, closed Tickets remain closed on a FollowUp but no AgentNotification is being sent.

This time I don't get any errors in otrs.log though.

But I don't quite understand, what requirements must be met for a notification to be sent. If I get a FollowUp for an open Ticket now, notifiacations are being sent, btw.
OTRS 3.0.8 and MySQL on Win2003 R2
ITSM 3.0.4

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

Re: Configure no state change on FollowUp when state is 'clo

Post by crythias » 24 Aug 2011, 18:27

Kernel/System/Ticket/Article.pm will not send a notification if the ticket is closed

Code: Select all

sub SendAgentNotification {
...
    return if $Ticket{StateType} eq 'closed'; #line 2204

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

Herr_K
OTRS newbie
Posts: 8
Joined: 29 Jul 2009, 09:11
OTRS Version?: 3.0.8

Re: Configure no state change on FollowUp when state is 'clo

Post by Herr_K » 24 Aug 2011, 18:44

Indeed. After commenting out that line, everything seems to work like intended for me. Thank you! This was bugging me all day long.

(Although I am wondering, how this all (including notifications for closed tickets) worked in v2.3.4 just by putting "closed" into PostmasterFollowUpStateClosed.)
OTRS 3.0.8 and MySQL on Win2003 R2
ITSM 3.0.4

sciolto
OTRS newbie
Posts: 16
Joined: 04 Oct 2010, 09:19
OTRS Version?: 2.4.7

Re: [SOLVED]Configure no state change on FollowUp

Post by sciolto » 29 Nov 2011, 11:49

Hi I had a similar request from a customer:

"Accept follow ups only for open tickets, create a new ticket from follow up on closed tickets".

All I did was change a boolean AND in an OR:

~[otrs]/Kernel/System/Postmaster.pl:~268

Change this:

Code: Select all

if ( $FollowUpPossible =~ /new ticket/i && $State{TypeName} =~ /^close/i ) {
To this:

Code: Select all

if ( $FollowUpPossible =~ /new ticket/i || $State{TypeName} =~ /^close/i ) {
:o
Several OTRS 2.4 and 3.0 installations. All on CentOS /w Apache & MySql.

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

Re: [SOLVED]Configure no state change on FollowUp

Post by crythias » 29 Nov 2011, 17:29

You don't need to do that. Just change the queue settings.

If the followup type is new ticket AND the ticket is closed, it creates a new ticket. That's supposed to happen. Otherwise the followup type in the queue is "possible" if you want to follow up on closed ticket.
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

sciolto
OTRS newbie
Posts: 16
Joined: 04 Oct 2010, 09:19
OTRS Version?: 2.4.7

Re: [SOLVED]Configure no state change on FollowUp

Post by sciolto » 29 Nov 2011, 17:41

crythias wrote:You don't need to do that. Just change the queue settings.

If the followup type is new ticket AND the ticket is closed, it creates a new ticket. That's supposed to happen. Otherwise the followup type in the queue is "possible" if you want to follow up on closed ticket.
But if the queue setting is "new ticket", there won't be no follow up on any ticket in the queue right? I need follow ups to be possible only for open tickets (or better: not for closed tickets).
Several OTRS 2.4 and 3.0 installations. All on CentOS /w Apache & MySql.

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

Re: [SOLVED]Configure no state change on FollowUp

Post by crythias » 29 Nov 2011, 17:51

sciolto wrote:But if the queue setting is "new ticket", there won't be no follow up on any ticket in the queue right? I need follow ups to be possible only for open tickets (or better: not for closed tickets).
In a word, No.

I have two sources for my response. The words
"Specifies if follow up to closed tickets would re-open the ticket, be rejected or lead to a new ticket."
and the code you modified.
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

SultanOfSwing
OTRS newbie
Posts: 22
Joined: 06 Nov 2013, 18:30
OTRS Version?: 4.0.10
Real Name: Fabian
Company: Company

Re: [SOLVED]Configure no state change on FollowUp

Post by SultanOfSwing » 14 Oct 2015, 17:06

Hi,

I was wondering if the problem with the "PostmasterFollowUpStateClosed" option has been fixed or if there is a more update-friendly way to set this up without fiddeling with the .pm-files.

What I want is the following:
I also want what Herr_K wants and that is not to have thank-you-mails mess up my ticket-states, but I still want my users to reopen a ticket via the customer-web-interface.
After quite a bit of research I found the "PostmasterFollowUpStateClosed" option today only to find that when I set it to "closed successful" (we don't do fancy statistics where we distinguish between successful and unsuccessful) and set the queue to followup possible that it still reopens the ticket.

Is there a more elegant way to do this?
OTRS 3.3.8
MySQL 5.5
Debian 7.4 64bit
FAQ- + Support-Package

Post Reply