Keep the same state on FollowUp?

Moderator: crythias

Locked
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Keep the same state on FollowUp?

Post by crythias »

see this line (112?) in Kernel/System/PostMaster/FollowUp.pm?

Code: Select all

    my $State = $Self->{ConfigObject}->Get('PostmasterFollowUpState') || 'open';
I'm testing this change:

Code: Select all

    my $State = $Self->{ConfigObject}->Get('PostmasterFollowUpState') || $Ticket{State};
but I delete the word "open" in the configuration option:

Config Options: Ticket -> Core::PostMaster
PostmasterFollowUpState:
The state if a ticket got a follow-up.

I *think* this should work. I don't know if it will break anything. Does anyone else have the ability to tell me? Basically, the idea is (among other ideas) that if you have a pending reminder on a ticket, a followup could not force this ticket to be "open" instead of continuing to be pending.
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: Keep the same state on FollowUp?

Post by crythias »

I got feedback that typing $Ticket{State} instead of open in the Config Options: Ticket -> Core::PostMaster PostmasterFollowUpState: box above works without software change. YMMV.
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
elSascho
Znuny newbie
Posts: 4
Joined: 16 Nov 2010, 21:50
Znuny Version: 3.0.1

Re: Keep the same state on FollowUp?

Post by elSascho »

Hi, this is really nice. :-)
Normally, it's okay that the ticket is reopend on customer feedback.
But sometimes, I'd like to have "lock-close".
How could that be done?
Thanks for some hints. :-)
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Keep the same state on FollowUp?

Post by crythias »

You might want to look in the docs for ACLs. http://doc.otrs.org/3.0/en/html/acl.html
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
kelyne
Znuny newbie
Posts: 12
Joined: 22 Aug 2012, 13:21
Znuny Version: 3.1.7

Re: Keep the same state on FollowUp?

Post by kelyne »

Hi,

I know this is an old ticket but it is exactly the issues i would like to resolve.

I would like for follow-ups to leave the state unchanged.

I have tried the following but it has not worked(not sure if this is a dynamic change or do I need to rebuild config?):

my $State = $Self->{ConfigObject}->Get('PostmasterFollowUpState') || $Ticket{State};

I have also tried setting it through sysconfig but there seems to be error checking in place that only allows valid state types to be entered.

Any help would be greatly appreciated.

Cheers,
Keith

OTRS 3.1.7 OpenSuse 12.1
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Keep the same state on FollowUp?

Post by crythias »

kelyne wrote:

Code: Select all

my $State = $Self->{ConfigObject}->Get('PostmasterFollowUpState') || $Ticket{State};
If this is the line, you may want to uncheck PostmasterFollowUpState and therefore $Ticket{State} will win.
or change the line to simply:

Code: Select all

my $State = $Ticket{State};
Although, in retrospect, if you want to keep an item pending for a ticket, you may have better results by splitting the ticket and putting the pending state on the split ticket.

If you're looking at keeping a ticket "closed", you should look at the Queue's FollowUp (new, open, reject).
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
kelyne
Znuny newbie
Posts: 12
Joined: 22 Aug 2012, 13:21
Znuny Version: 3.1.7

Re: Keep the same state on FollowUp?

Post by kelyne »

Hi,

I don't seem to be able to uncheck PostmasterFollowUpState - tickbox is greyed out.

Yes, we want to keep the tickets closed but we also want the note added eg Out of office reply

As a test, I initially to set all queue followups to reject to see if that stopped the note being added but this functionality doesn't seem to work for me either- all follow ups were added.

Cheers,
Keith

OTRS 3.1.7 OpenSuse 12.1
rkekkar
Znuny newbie
Posts: 2
Joined: 13 May 2014, 05:50
Znuny Version: 3.2.12
Real Name: KBS Ramachandra
Company: Merit Systems Private Limited

Re: Keep the same state on FollowUp?

Post by rkekkar »

crythias wrote:I got feedback that typing $Ticket{State} instead of open in the Config Options: Ticket -> Core::PostMaster PostmasterFollowUpState: box above works without software change. YMMV.
Thanks. This is a neat solution.
dnaontec
Znuny newbie
Posts: 81
Joined: 03 Jul 2014, 16:08
Znuny Version: 5.0.3
Real Name: Deniz

Re: Keep the same state on FollowUp?

Post by dnaontec »

Hi

I know, this ticket is a bit older, but I got the problem, if I' m changing the PostmasterFollowUpState in the sysconfig to $Ticket{State} and save the change, the new PostmasterFollowUpState is "open" and not $Ticket{State}. So during the savement process the sysconfig is overwriting my entry with "open" so I got no chance to to have a PostmasterFollowUpState like $Ticket{State}. Its the same at Ticket::Frontend::CustomerTicketZoom###StateDefault. Any idea, why this is happening?

br
DNA
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Keep the same state on FollowUp?

Post by crythias »

First, this is an ancient topic, with several refined answers depending on the state to keep on followup.

If the ticket is closed, and you want to keep it closed, change the queue to follow-up reject.

If the ticket is pending and you want to keep it pending, try a generic agent with a notification event instead. Note that a customer interrupted pending for auto closed successful probably should simply be closed, except possibly OOO, though a workaround can be to trigger OOO with a reply/template then set pending separately.

Any other state keeps.
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
jbaptiste
Znuny advanced
Posts: 104
Joined: 01 Aug 2015, 03:45
Znuny Version: 6.0.x
Contact:

Re: Keep the same state on FollowUp?

Post by jbaptiste »

So in conclusion there's no easy way to maintain the current state when there's a follow up ? I have added some custom open states, the agent sets the state for example to "Demo in progress", but when the customer replies to the ticket email, the state is changed back to open. Looking at all the answers about this topic on the forum, the easier/less intrusive way of accomplishing this seems to be this one:

Modify Kernel/System/PostMaster/FollowUp.pm as described by crythias at the beginning of this thread, and set PostmasterFollowUpState's value with '$Ticket{State}' (without the quotes). This didn't work because it is not possible to change that value through sysconfig. The solution to this is described here, which is to edit Kernel/Config/Files/Ticket.xml, search for PostmasterFollowUpState and remove this line:

Code: Select all

   <ConfigItem Name="PostmasterFollowUpState" Required="1" Valid="1">
        <Description Translatable="1">Defines the state of a ticket if it gets a follow-up.</Description>
        <Group>Ticket</Group>
        <SubGroup>Core::PostMaster</SubGroup>
        <ValidateModule>Kernel::System::SysConfig::StateValidate</ValidateModule> #<---- Remove this line after backing up Ticket.xml 
        <Setting>
            <String Regex="">open</String>
        </Setting>
    </ConfigItem>
After this you can edit Ticket -> Core::PostMaster PostmasterFollowUpState value and set it to $Ticket{State}. This works, just tested it on 4.0.11.

I still would like to understand why this field is blocked and the change to open is forced, what's the logic behind that ? or it's just an old unaddressed bug ?
Want to run OTRS on docker ? checkout my OTRS on docker HOWTO | Project's github page
Locked