Keep state on reply

Moderator: crythias

Post Reply
dsekelybrs
Znuny newbie
Posts: 42
Joined: 30 Mar 2017, 19:37
Znuny Version: 6.0.33
Real Name: David Sekely

Keep state on reply

Post by dsekelybrs »

I am trying to set certain queues to keep the state when the user replies. But on the flip side I still want customers to be able to re-open a ticket that is closed by replying to an email from the ticket thread.

I was able to create a postmaster filter that kept the state by filtering the email address of the incoming ticket and changing the X-OTRS-FollowUp-State-Keep header to 1.

While this worked at keeping the state on replies it broke the ability for users to send a reply to re-open a closed ticket.

I then tried to create another filter that checked the state and if it was closed successful or closed unsuccessful it would change the state to Open. This did not work.

I searched the forum and most of the posts I found were for older versions and to modify back end files. Is there a better way to accomplish this?

Version 6.0.33
hkais
Znuny expert
Posts: 280
Joined: 16 Apr 2016, 08:55
Znuny Version: see in post
Real Name: Hans
Contact:

Re: Keep state on reply

Post by hkais »

can you elaborate the cases for what you need this feature? Maybe there are other options too
Elected 2022-06 as an IT Governance Portal Expert. The portal for Znuny, OTRS and OTOBO users
dsekelybrs
Znuny newbie
Posts: 42
Joined: 30 Mar 2017, 19:37
Znuny Version: 6.0.33
Real Name: David Sekely

Re: Keep state on reply

Post by dsekelybrs »

We have certain states that we want to keep tickets in until ready for the next state (wip, qa, ready for production). Every time there is a reply the state changes. We have to change it back every time and it’s becoming tedious.

On the flip side we still want the customer to be able to re-open the ticket when it is closed. This obviously will put it back in an open state which is fine.
hkais
Znuny expert
Posts: 280
Joined: 16 Apr 2016, 08:55
Znuny Version: see in post
Real Name: Hans
Contact:

Re: Keep state on reply

Post by hkais »

It looks to me you try to use znuny as an issue tracker. Maybe the wrong place to map such status?

Anyway to solve this I would do

- store the current status via Event (ArticleUpdate or ArticleCreate) based Generic Agent.
- on update/change I would persist the previous status in a TicketFreeText field
- now you can use a additional GA to run every N minutes to check if the previous ticket status and the current one. ANd you can now decide what to do

This is surely not the best way, but afaik it could solve your issue.

Maybe you can try to handle the requirement directly by even not needing the previous state if you can narrow the requirement to a specific event


You will surely come down to the requirement to have "NOT" definitions or "regex" for your needs in GA. Sadly both feature requests in the past have been rejected by the znuny dev team
Elected 2022-06 as an IT Governance Portal Expert. The portal for Znuny, OTRS and OTOBO users
root
Administrator
Posts: 3934
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Keep state on reply

Post by root »

dsekelybrs wrote: 20 May 2022, 21:24 I am trying to set certain queues to keep the state when the user replies. But on the flip side I still want customers to be able to re-open a ticket that is closed by replying to an email from the ticket thread.
Hi David,

This should do the trick:

1.) Create a new dynamic field for the ticket, type Statuschange
2.) Create a Generic Agent '1000 Reopen closed tickets
- Event TicketDynamicFieldUpdate_Statuschange
- Select Tickets => all closed states and Dynamic Field Statuschange=Yes
- Update ticket attributes => State to open
3.) Create a Generic Agent '1010 Reset DF Changestatus'
- Event TicketDynamicFieldUpdate_Statuschange
- Update ticket attributes => DF Statuschange to No
4.) Create a PostMaster filter '1000 Detect FollowUp'
- Configure to match every e-mail, sth. like MessageID with .+
- Set X-OTRS-FollowUp-DynamicField-FollowUpDetection to Yes
- Set X-OTRS-FollowUp-State-Keep to Yes

As always recommended: use a test system first

- 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 ?
dsekelybrs
Znuny newbie
Posts: 42
Joined: 30 Mar 2017, 19:37
Znuny Version: 6.0.33
Real Name: David Sekely

Re: Keep state on reply

Post by dsekelybrs »

Is this in addition to the previous response from hkais?

root wrote: 23 May 2022, 20:15
dsekelybrs wrote: 20 May 2022, 21:24 I am trying to set certain queues to keep the state when the user replies. But on the flip side I still want customers to be able to re-open a ticket that is closed by replying to an email from the ticket thread.
Hi David,

This should do the trick:

1.) Create a new dynamic field for the ticket, type Statuschange
2.) Create a Generic Agent '1000 Reopen closed tickets
- Event TicketDynamicFieldUpdate_Statuschange
- Select Tickets => all closed states and Dynamic Field Statuschange=Yes
- Update ticket attributes => State to open
3.) Create a Generic Agent '1010 Reset DF Changestatus'
- Event TicketDynamicFieldUpdate_Statuschange
- Update ticket attributes => DF Statuschange to No
4.) Create a PostMaster filter '1000 Detect FollowUp'
- Configure to match every e-mail, sth. like MessageID with .+
- Set X-OTRS-FollowUp-DynamicField-FollowUpDetection to Yes
- Set X-OTRS-FollowUp-State-Keep to Yes

As always recommended: use a test system first

- Roy
hkais
Znuny expert
Posts: 280
Joined: 16 Apr 2016, 08:55
Znuny Version: see in post
Real Name: Hans
Contact:

Re: Keep state on reply

Post by hkais »

no suggestion of root is more specific, you shall try his given path.

Would be great if you could share results later.
Elected 2022-06 as an IT Governance Portal Expert. The portal for Znuny, OTRS and OTOBO users
dsekelybrs
Znuny newbie
Posts: 42
Joined: 30 Mar 2017, 19:37
Znuny Version: 6.0.33
Real Name: David Sekely

Re: Keep state on reply

Post by dsekelybrs »

ok just wanted to make sure. I will update with results.
dsekelybrs
Znuny newbie
Posts: 42
Joined: 30 Mar 2017, 19:37
Znuny Version: 6.0.33
Real Name: David Sekely

Re: Keep state on reply

Post by dsekelybrs »

root wrote: 23 May 2022, 20:15
dsekelybrs wrote: 20 May 2022, 21:24 I am trying to set certain queues to keep the state when the user replies. But on the flip side I still want customers to be able to re-open a ticket that is closed by replying to an email from the ticket thread.
Hi David,

This should do the trick:

1.) Create a new dynamic field for the ticket, type Statuschange
2.) Create a Generic Agent '1000 Reopen closed tickets
- Event TicketDynamicFieldUpdate_Statuschange
- Select Tickets => all closed states and Dynamic Field Statuschange=Yes
- Update ticket attributes => State to open
3.) Create a Generic Agent '1010 Reset DF Changestatus'
- Event TicketDynamicFieldUpdate_Statuschange
- Update ticket attributes => DF Statuschange to No
4.) Create a PostMaster filter '1000 Detect FollowUp'
- Configure to match every e-mail, sth. like MessageID with .+
- Set X-OTRS-FollowUp-DynamicField-FollowUpDetection to Yes
- Set X-OTRS-FollowUp-State-Keep to Yes

As always recommended: use a test system first

- Roy

Where is X-OTRS-FollowUp-DynamicField-FollowUpDetection? I don't see it as an option on the PostMaster Filters
root
Administrator
Posts: 3934
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Keep state on reply

Post by root »

dsekelybrs wrote: 31 May 2022, 21:52
Where is X-OTRS-FollowUp-DynamicField-FollowUpDetection? I don't see it as an option on the PostMaster Filters
Hi David,

My bad, it should be X-OTRS-FollowUp-DynamicField-Statuschange

- 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 ?
dsekelybrs
Znuny newbie
Posts: 42
Joined: 30 Mar 2017, 19:37
Znuny Version: 6.0.33
Real Name: David Sekely

Re: Keep state on reply

Post by dsekelybrs »

root wrote: 23 May 2022, 20:15
dsekelybrs wrote: 20 May 2022, 21:24 I am trying to set certain queues to keep the state when the user replies. But on the flip side I still want customers to be able to re-open a ticket that is closed by replying to an email from the ticket thread.
Hi David,

This should do the trick:

1.) Create a new dynamic field for the ticket, type Statuschange
2.) Create a Generic Agent '1000 Reopen closed tickets
- Event TicketDynamicFieldUpdate_Statuschange
- Select Tickets => all closed states and Dynamic Field Statuschange=Yes
- Update ticket attributes => State to open
3.) Create a Generic Agent '1010 Reset DF Changestatus'
- Event TicketDynamicFieldUpdate_Statuschange
- Update ticket attributes => DF Statuschange to No
4.) Create a PostMaster filter '1000 Detect FollowUp'
- Configure to match every e-mail, sth. like MessageID with .+
- Set X-OTRS-FollowUp-DynamicField-FollowUpDetection to Yes
- Set X-OTRS-FollowUp-State-Keep to Yes

As always recommended: use a test system first

- Roy

What is the selection criteria for item 3?
Post Reply