PostmasterFollowUpState not working

Moderator: crythias

Locked
kuerp01
Znuny newbie
Posts: 13
Joined: 04 May 2012, 21:24
Znuny Version: 3.1.10

PostmasterFollowUpState not working

Post by kuerp01 »

Hi Everybody,

I tried to set the Attribute Ticket -> Core::PostMaster -> PostmasterFollowUpState to our custom state 'work in progress'.
Even though the State is configured, incoming mails, which are appended to a ticket, change the ticket state to new.

Best Regards

Stephan
OTRS 3.1.10 using MySQL
CentOS release 6.2
LDAP Agent Authentication
kuerp01
Znuny newbie
Posts: 13
Joined: 04 May 2012, 21:24
Znuny Version: 3.1.10

Re: PostmasterFollowUpState not working

Post by kuerp01 »

Has nobody else experienced this issue?
OTRS 3.1.10 using MySQL
CentOS release 6.2
LDAP Agent Authentication
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: PostmasterFollowUpState not working

Post by crythias »

Version?
Do the logs indicate that the state isn't available and therefore new?
kuerp01 wrote:change the ticket state to new.
The code is:

Code: Select all

    my $State = $Self->{ConfigObject}->Get('PostmasterFollowUpState') || 'open';
    if (
        $Ticket{StateType} =~ /^close/
        && $Self->{ConfigObject}->Get('PostmasterFollowUpStateClosed')
        )
    {
        $State = $Self->{ConfigObject}->Get('PostmasterFollowUpStateClosed');
    }
    if ( $GetParam{'X-OTRS-FollowUp-State'} ) {
        $State = $GetParam{'X-OTRS-FollowUp-State'};
    }

    if ( $Ticket{StateType} !~ /^new/ || $GetParam{'X-OTRS-FollowUp-State'} ) {
        $Self->{TicketObject}->TicketStateSet(
            State => $GetParam{'X-OTRS-FollowUp-State'} || $State,
            TicketID => $Param{TicketID},
            UserID   => $Param{InmailUserID},
        );
        if ( $Self->{Debug} > 0 ) {
            print "State: $State\n";
        }
    }
Essentially, followups will only apply if the ticket isn't new, or X-OTRS-FollowUp-State exists.
A Customer who sends "another" email won't change the ticket from new to 'work in progress' just because she's persistent. A ticket will become "open" upon Agent (human) response to ticket. (not note).
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
kuerp01
Znuny newbie
Posts: 13
Joined: 04 May 2012, 21:24
Znuny Version: 3.1.10

Re: PostmasterFollowUpState not working

Post by kuerp01 »

Hi crythias,

we use Version 3.1.10 of OTRS.

The history shows these actions:

Image

The ticket had the status "Work in Progress" before the mail was forwarded to the ticket. Then the status was changed to new, even though, my sysconfig has these settings:

Code: Select all

grep PostmasterFollowUpState  *
ZZZAAuto.pm:$Self->{'PostmasterFollowUpState'} =  'open';
ZZZAuto.pm:$Self->{'PostmasterFollowUpState'} =  'new';
Thanks in Advance!
OTRS 3.1.10 using MySQL
CentOS release 6.2
LDAP Agent Authentication
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: PostmasterFollowUpState not working

Post by jojo »

as the sysconfig states the follow up state is new:

Code: Select all

ZZZAuto.pm:$Self->{'PostmasterFollowUpState'} =  'new';
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
kuerp01
Znuny newbie
Posts: 13
Joined: 04 May 2012, 21:24
Znuny Version: 3.1.10

Re: PostmasterFollowUpState not working

Post by kuerp01 »

jojo wrote:as the sysconfig states the follow up state is new:

Code: Select all

ZZZAuto.pm:$Self->{'PostmasterFollowUpState'} =  'new';
Hi jojo,

I'm a litte confused right now, because the sysconfig web interface doesn't say so (see attachment).

Does the ZZZAuto.pm has higher "priority" than ZZZAAuto.pm?

Best regards

Stephan
You do not have the required permissions to view the files attached to this post.
OTRS 3.1.10 using MySQL
CentOS release 6.2
LDAP Agent Authentication
CSL
Znuny expert
Posts: 159
Joined: 11 Nov 2011, 19:27
Znuny Version: 3.0.11

Re: PostmasterFollowUpState not working

Post by CSL »

ZZZAAuto.pm is the file that comes with OTRS and doesn't change except during upgrades. It holds the default values for the settings in sysconfig.

ZZZAuto.pm is created when you first change a sysconfig setting. It holds only your modified settings that are different from those in ZZZAAuto.pm.

When you use the 'reset' arrow icon in sysconfig, it deletes your modified setting from ZZZAuto.pm. This means the system will then look in ZZZAAuto.pm for the setting instead, and will use the default.

You should see your modified settings inside ZZZAuto.pm. If you don't, check the log to make sure there are no permissions errors complaining that it can't write to ZZZAuto.pm.
Backend: OTRS 3.0.11 RedHat Enterprise Linux 6.2, Apache, MySQL with replication
Frontend: OTRS 3.0.11 RedHat Enterprise Linux 6.2 with SELinux, Apache SSL
kuerp01
Znuny newbie
Posts: 13
Joined: 04 May 2012, 21:24
Znuny Version: 3.1.10

Re: PostmasterFollowUpState not working

Post by kuerp01 »

I've changed the configuration entries to work in progress and executed otrs.RebuildConfig.pl afterwards:

Code: Select all

/opt/otrs/Kernel/Config/Files: grep PostmasterFollowUpState *
ZZZAAuto.pm:$Self->{'PostmasterFollowUpState'} =  'open';
ZZZAuto.pm:$Self->{'PostmasterFollowUpStateClosed'} =  'new';
ZZZAuto.pm:$Self->{'PostmasterFollowUpState'} =  'work in progress';
The ticker history still shows the change:

Code: Select all

StateUpdate      Old: "work in progress" New: "new"
FollowUp         FollowUp for [0183756]
OTRS 3.1.10 using MySQL
CentOS release 6.2
LDAP Agent Authentication
kuerp01
Znuny newbie
Posts: 13
Joined: 04 May 2012, 21:24
Znuny Version: 3.1.10

Re: PostmasterFollowUpState not working

Post by kuerp01 »

I've tried to further debug the issue by setting the Debug Level to 1. There is no Output in the apache error.log nor the otrs system log.
It almost seems as if the Module isn't used at all ...
# set state
my $State = $Self->{ConfigObject}->Get('PostmasterFollowUpState') || 'open';
if (
$Ticket{StateType} =~ /^close/
&& $Self->{ConfigObject}->Get('PostmasterFollowUpStateClosed')
)
{
$State = $Self->{ConfigObject}->Get('PostmasterFollowUpStateClosed');
}
if ( $GetParam{'X-OTRS-FollowUp-State'} ) {
$State = $GetParam{'X-OTRS-FollowUp-State'};
}

if ( $Ticket{StateType} !~ /^new/ || $GetParam{'X-OTRS-FollowUp-State'} ) {
$Self->{TicketObject}->TicketStateSet(
State => $GetParam{'X-OTRS-FollowUp-State'} || $State,
TicketID => $Param{TicketID},
UserID => $Param{InmailUserID},
);
if ( $Self->{Debug} > 0 ) {
print "State: $State\n";
}
}
OTRS 3.1.10 using MySQL
CentOS release 6.2
LDAP Agent Authentication
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: PostmasterFollowUpState not working

Post by crythias »

kuerp01 wrote:Does the ZZZAuto.pm has higher "priority" than ZZZAAuto.pm?
Items are parsed in alphabetical order, also, what is the state TYPE of "work in progress"?
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
kuerp01
Znuny newbie
Posts: 13
Joined: 04 May 2012, 21:24
Znuny Version: 3.1.10

Re: PostmasterFollowUpState not working

Post by kuerp01 »

The Type of "work in progress" is open.
OTRS 3.1.10 using MySQL
CentOS release 6.2
LDAP Agent Authentication
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: PostmasterFollowUpState not working

Post by crythias »

History won't change if you change config ...
You need to show the otrs system log of what happens to a ticket *right now* if the ticket is new, and followup (nothing should happen)
If the ticket is "open" and followup (probably should change to 'work in progress', though why should a customer's followup determine this?)
If the ticket is "work in progress" and followup.
If the ticket is "closed" and followup (currently, should be "new", though I'd lean toward "open" or a new state "reopened" of TYPE open.)
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
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: PostmasterFollowUpState not working

Post by crythias »

Btw, your original post has been answered by you.
kuerp01 wrote:Even though the State is configured, incoming mails, which are appended to a ticket, change the ticket state to new.

Code: Select all

grep PostmasterFollowUpState  *
ZZZAAuto.pm:$Self->{'PostmasterFollowUpState'} =  'open';
ZZZAuto.pm:$Self->{'PostmasterFollowUpState'} =  'new';
Au comes after AA, so that was the answer to your problem, which you fixed.
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
kuerp01
Znuny newbie
Posts: 13
Joined: 04 May 2012, 21:24
Znuny Version: 3.1.10

Re: PostmasterFollowUpState not working

Post by kuerp01 »

crythias wrote:Btw, your original post has been answered by you.
kuerp01 wrote:Even though the State is configured, incoming mails, which are appended to a ticket, change the ticket state to new.

Code: Select all

grep PostmasterFollowUpState  *
ZZZAAuto.pm:$Self->{'PostmasterFollowUpState'} =  'open';
ZZZAuto.pm:$Self->{'PostmasterFollowUpState'} =  'new';
Au comes after AA, so that was the answer to your problem, which you fixed.
I've changed the configuration to this:

Code: Select all

/opt/otrs/Kernel/Config/Files: grep PostmasterFollowUpState *
ZZZAAuto.pm:$Self->{'PostmasterFollowUpState'} =  'open';
ZZZAuto.pm:$Self->{'PostmasterFollowUpStateClosed'} =  'new';
ZZZAuto.pm:$Self->{'PostmasterFollowUpState'} =  'work in progress';
My ticket 0183756 was in Status "work in progress" (Type open).
When the Mail arrived, the status was changed to "new" (Type new). :?
OTRS 3.1.10 using MySQL
CentOS release 6.2
LDAP Agent Authentication
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: PostmasterFollowUpState not working

Post by crythias »

what does the log say?
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
Mofarocker33
Znuny newbie
Posts: 31
Joined: 03 Nov 2011, 12:24
Znuny Version: 5.0.11

Re: PostmasterFollowUpState not working

Post by Mofarocker33 »

If someone is searching this, the Solution for OTRS 5
Admin -> Sysconfig -> Ticket::Core
Image
Green == changed
Red == added

cheers
Locked