"Open" State to "Pending Reminder" State Automatically

Moderator: crythias

Locked
zyousafi
Znuny newbie
Posts: 64
Joined: 09 Feb 2015, 12:03
Znuny Version: 4.0.5
Real Name: Zohair Yousafi

"Open" State to "Pending Reminder" State Automatically

Post by zyousafi »

Okay so can OTRS change the state of a ticket from "Open" to "Pending Reminder" automatically when the "Pending Date" has reached? Right now the agent has to manually select "Pending Reminder" for the repeated notifications to kick in and that just seems troublesome for me. If the agent forgets to do this then he/she will not get the reminders he/she needs to get. I want the ticket, by default, to be created with the "Open" state and then automatically shift to the "Pending Reminder" state when the "Pending Date" has reached.
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: "Open" State to "Pending Reminder" State Automatically

Post by jojo »

the epnding state is only used on pending state types. So you have to set the ticket to a pending state to recieve reminders.
"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
zyousafi
Znuny newbie
Posts: 64
Joined: 09 Feb 2015, 12:03
Znuny Version: 4.0.5
Real Name: Zohair Yousafi

Re: "Open" State to "Pending Reminder" State Automatically

Post by zyousafi »

Thank you for the prompt response. Yes I have noticed that; however is there anyway to make this automatic? The reason I ask is because we have trouble with people keeping track of everything they need to do. It's ironic the only way they will receive reminders is if they remember to login and set that particular ticket to the "Pending Reminder" state. That's why I would like for this to be done automatically. Is that possible?
aph
Znuny superhero
Posts: 646
Joined: 20 Jun 2014, 12:11
Znuny Version: 3.3.9, 4.x, 5.x

Re: "Open" State to "Pending Reminder" State Automatically

Post by aph »

The state open is of type 'open' so it would not have a pending reminder date.
What you need is to create a state of type pending auto and use it instead of open. Set the default pending time under Ticket::Frontend::PendingDiffTime (for example 172800 = 2days). You can then define the subsequent state to be set after the reminder date has been reached (for example pending reminder). Thus, after two days (or whatever period you choose as default) the state would change to 'pending reminder' and agents will get notifications.
OTRS 3.3.x (private/testing) on Windows Server 2008 with MSSQL database.
OTRS 3.3.x (private/testing) on CentOS with MySQL database and apache
zyousafi
Znuny newbie
Posts: 64
Joined: 09 Feb 2015, 12:03
Znuny Version: 4.0.5
Real Name: Zohair Yousafi

Re: "Open" State to "Pending Reminder" State Automatically

Post by zyousafi »

Thank you for the detailed response aph :)

Okay so I have tried doing the following from the OTRS GUI:

*I have added the "open" state to the Ticket::PendingReminderStateType variable in SysConfig > Core::Ticket (Defines the state type of the reminder for pending tickets.)
*I have added the "open" state to the Ticket::PendingAutoStateType variable in SysConfig > Core::Ticket (Determines the possible states for pending tickets that changed state after reaching time limit.)
*I have made the "open" state the "key" and the "pending reminder" state the "content" in the Ticket::StateAfterPending variable in SysConfig > Core::Ticket (Defines which states should be set automatically (Content), after the pending time of state (Key) has been reached.)

Now if I have understood each of these variables in SysConfig > Core::Ticket correctly then theoretically wouldn't that be enough to get a ticket to change its state from "open" to "pending reminder" automatically when the "pending time" has been reached?

With reference to the solution that you provided, couldn't I just change the "state type" of the "open" state from "open" to "pending reminder"? Meaning I would rather not create a new state if possible.
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: "Open" State to "Pending Reminder" State Automatically

Post by crythias »

You are asking this backwards.

You do not want to do this. No, really, you don't want to do this. Open is open and Pending reminder is Pending reminder. If you want to be in a Pending reminder state, you do that in order to schedule the reminder. Otherwise, there is no reminder.
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
zyousafi
Znuny newbie
Posts: 64
Joined: 09 Feb 2015, 12:03
Znuny Version: 4.0.5
Real Name: Zohair Yousafi

Re: "Open" State to "Pending Reminder" State Automatically

Post by zyousafi »

Yes I completely understand what you are saying crythias; however I want to be able to change the state of a ticket from "Open" to "Pending Reminder" automatically when the "Pending Time" has reached. Unfortunately the GenericAgent does not list this as one of the possible event triggers. I just wanted to do this without having to create a new state in the system.

Could you suggest another way?
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: "Open" State to "Pending Reminder" State Automatically

Post by crythias »

zyousafi wrote:I want to be able to change the state of a ticket from "Open" to "Pending Reminder" automatically when the "Pending Time" has reached.
You're doing this backward. No, I can't help you do something that does not make sense. If you want to change the state of a ticket after time, use generic agent. Setting a ticket to Pending Reminder is backwards because *you* want to say "Remind me" but OTRS wants to ask, "Remind you when?" And that is what setting Pending Reminder (and not Open) in the first place is all about.
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
zyousafi
Znuny newbie
Posts: 64
Joined: 09 Feb 2015, 12:03
Znuny Version: 4.0.5
Real Name: Zohair Yousafi

Re: "Open" State to "Pending Reminder" State Automatically

Post by zyousafi »

Okay so crythias it seems I have not done a good job explaining what I am actually trying to do.

When a new ticket is created and notifications are sent to everyone the first time life is good and everything is working as expected; however in a real-world scenario what happens is that people forget what tickets were assigned to them because of everything else they are doing on any given day and they don't sign into OTRS as much as I would like. They love their e-mail and that's where I want to communicate with them.

What I want to be able to do is create a ticket with the default "open" state. While creating the ticket I have an option to set a "Pending Date". I want to use the value in that date to trigger the change of status from "open" to "pending reminder" and then OTRS will continuously send notifications to the agent that his/her ticket has not yet been completed until he/she changes the state from "pending reminder" to one of the "closed" states.

I understand how OTRS works. I mean I understand how OTRS only sends "pending reminder" notifications for tickets in the "pending reminder" state; however that's the paradox. If agents remembered that they needed to login and change the state of a ticket to "pending reminder" then life would be good; however that's one more task for people who are generally very busy and instead of helping them do their work I am asking them do "another thing" and I don't think they would appreciate it. I want to utilize the system for this and keep giving them reminders until the ticket is worked on and they complete their work and I want to do this automatically.

The GenericAgent would be a great tool for this; however there is no event for "pending date" besides update. If there was an event for "pending date reached" then we wouldn't have this thread and I wouldn't have a query because I would just set that up; however there wasn't one so I was just trying to understand how I could control the flow of a ticket, make sure reminders are sent, and help the agent do his/her job more effectively instead of increasing the administrative responsibility of each agent.

I hope that clarifies what I am actually trying to do and why I am trying to do it that way.
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: "Open" State to "Pending Reminder" State Automatically

Post by crythias »

zyousafi wrote:people forget what tickets were assigned to them because of everything else they are doing on any given day and they don't sign into OTRS as much as I would like.
Then they're not using the tool like it needs to be. OTRS needs to be opened and referenced constantly in order for it to be effectively used.
zyousafi wrote:create a ticket with the default "open" state. While creating the ticket I have an option to set a "Pending Date".
You have that option, but it doesn't mean anything if you have not set the state as one of the pending types. It's an unfortunate user experience, but the date is effectively ignored if the state is open.
zyousafi wrote:OTRS will continuously send notifications to the agent that his/her ticket has not yet been completed until he/she changes the state from "pending reminder" to one of the "closed" states.
Which is what it does, daily, if you merely set the state as Pending Reminder in the first place.
zyousafi wrote:keep giving them reminders until the ticket is worked on and they complete their work and I want to do this automatically.
Really? Just ping them constantly for the 15-20 tickets they have assigned to them? How do they determine effectively in their mailbox that the correspondence they need to address isn't one of the multitude of constant reminders that are plaguing their inbox to do the thing that the one email they're expecting to receive regarding work product actually addresses?
zyousafi wrote:The GenericAgent would be a great tool for this; however there is no event for "pending date" besides update
No, but you have a fixed create time. After Create time three days ago and state is open, change state to "more than three days" of type open and trigger a notification event on the state change. After 5 days, check if the state is "more than three days" and change it to "This is getting old" and trigger a notification event. After 10 days, check if state is "This is getting old" and change it to "This ticket is way too old. fix it!" with a notification event.

What notification event? TicketStateUpdate.
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
aph
Znuny superhero
Posts: 646
Joined: 20 Jun 2014, 12:11
Znuny Version: 3.3.9, 4.x, 5.x

Re: "Open" State to "Pending Reminder" State Automatically

Post by aph »

zyousafi wrote:When a new ticket is created and notifications are sent to everyone the first time life is good and everything is working as expected; however in a real-world scenario what happens is that people forget what tickets were assigned to them because of everything else they are doing on any given day and they don't sign into OTRS as much as I would like. They love their e-mail and that's where I want to communicate with them.
Fair enough. Agents don't want to log into OTRS and do additional stuff. Instead they see an e-mail notification and say 'aha there is something to be done, I'll go there'.
zyousafi wrote:What I want to be able to do is create a ticket with the default "open" state.
Why does the default state of the ticket have to be of _type_ open? I think you are confusing the name and type. What you actually want is that agents are reminded regularly about the tasks they are supposed to do in OTRS via an e-mail notification. This is a pending functionality.
zyousafi wrote:While creating the ticket I have an option to set a "Pending Date".

As the pending date field mentions, the value is only applicable to pending* types, i.e. states of type pending auto and pending reminder. Thus, the trigger 'pending date' does not apply if your ticket has state of type other than the pending types (for example open)
zyousafi wrote:I want to use the value in that date to trigger the change of status from "open" to "pending reminder" and then OTRS will continuously send notifications to the agent that his/her ticket has not yet been completed until he/she changes the state from "pending reminder" to one of the "closed" states.
So you can have the default state of a ticket when it is created of type 'pending auto' (you can name it 'work in progress', for example). You can configure OTRS to trigger the change of state to 'pending reminder' after the default pending time (for example 1day ) has been reached. So agents get a notification when a new ticket is created and a reminder e-mail saying they need to work on the ticket after the ticket state is automatically changed to 'pending reminder' as described.
zyousafi wrote:*I have added the "open" state to the Ticket::PendingReminderStateType variable in SysConfig > Core::Ticket (Defines the state type of the reminder for pending tickets.)
Don't do this, the state type open is for open tickets. Keep the Ticket::PendingReminderStateType value to pending reminder.
zyousafi wrote:*I have added the "open" state to the Ticket::PendingAutoStateType variable in SysConfig > Core::Ticket (Determines the possible states for pending tickets that changed state after reaching time limit.)
Again don't do this. You are basically saying that state type open is the pending reminder and pending auto. This would lead to unforeseeable problems. Keep the value of Ticket::PendingAutoStateType to pending auto.
zyousafi wrote:*I have made the "open" state the "key" and the "pending reminder" state the "content" in the Ticket::StateAfterPending variable in SysConfig > Core::Ticket (Defines which states should be set automatically (Content), after the pending time of state (Key) has been reached.)
Instead set the state 'work in progress' i.e. the default state with which you will create the tickets /which should be of type pending auto) as key and set content to 'pending reminder'.
OTRS 3.3.x (private/testing) on Windows Server 2008 with MSSQL database.
OTRS 3.3.x (private/testing) on CentOS with MySQL database and apache
zyousafi
Znuny newbie
Posts: 64
Joined: 09 Feb 2015, 12:03
Znuny Version: 4.0.5
Real Name: Zohair Yousafi

Re: "Open" State to "Pending Reminder" State Automatically

Post by zyousafi »

Thank you very much aph and crythias for all of your help!

Okay so here is what I did and this is working great for the company thus far:

*I changed the state_type of the "Open" state from "Open" to "Pending Auto"
*I created two new states. The "In Progress" state and the "On Hold" state. Both of these states are also "Pending Auto" state_type states

Now what happens is that anytime the "Pending Date" is reached the system automatically changes the state to "Pending Reminder" and the agent continues getting notifications until he/she responds and changes the state and the "Pending Date". This has proven to be the "secret sauce" thus far and I could not have done it without the guidance both of you gave. Thank you once again! :)
aph
Znuny superhero
Posts: 646
Joined: 20 Jun 2014, 12:11
Znuny Version: 3.3.9, 4.x, 5.x

Re: "Open" State to "Pending Reminder" State Automatically

Post by aph »

zyousafi wrote: *I changed the state_type of the "Open" state from "Open" to "Pending Auto"
I still see this as critical. Do not make the type of the state named 'open' to something else. Use the custom state instead (In Progress)
Use Ticket::Frontend::AgentTicketPhone###StateDefault=In Progress and Ticket::Frontend::AgentTicketEmail###StateDefault=In Progress. This will have the effect that every time a new ticket is created manually, the state is 'In Progress' by default.
zyousafi wrote:*I created two new states. The "In Progress" state and the "On Hold" state. Both of these states are also "Pending Auto" state_type states
I do not understand what the state 'On Hold' does.
zyousafi wrote:Now what happens is that anytime the "Pending Date" is reached the system automatically changes the state to "Pending Reminder" and the agent continues getting notifications until he/she responds and changes the state and the "Pending Date".
This will also work if you set the following values under Ticket::StateAfterPending

Code: Select all

Key = In Progress Content 'pending reminder'
and

Code: Select all

Key = On Hold Content 'pending reminder'
provided that the state On Hold has a useful function
OTRS 3.3.x (private/testing) on Windows Server 2008 with MSSQL database.
OTRS 3.3.x (private/testing) on CentOS with MySQL database and apache
Locked