Pending State to Active when Due Date hits

krism
Kilo Contributor

In short what I am looking for are the following items:

1. I would like to have all Incidents that are in a Pending State and have a "due date" automatically set back to active when the due date hits
2. I would like to have all Incidents that are in a Pending State and do NOT have a "due date" to be set back to active every night at midnight

Anyone have any ideas? I have a short and sweet work flow that will work for the 1st one. Basically it has a Timer that says when due date is "Full Duration" Change state to active. That works well but if you open that ticket that was changed back to active and set it back to pending and set a new "due date", it will not re run that workflow and kick it back into when the due date hits.

5 REPLIES 5

PeterWiles
Kilo Sage

1. So when you reset the due date, a new workflow isn't created?

2. I would copy and modify the scheduled job that says incidents to closed state after set days.
Basically, create a scheduled task to run at 12am that looks up the query table for pending incidents and empty due date and set state to active.


krism
Kilo Contributor

For 1. You are correct. The very first time I set the incident to pending and set a due date it will kick it out of pending and set to active immediately when the due date is met. However if I put the ticket in pending again and choose a different due date it will never kick it out of pending. I did add a "timer" just now after the 1st time it kicks it out of pending to "wait X minutes" then an "if" its still pending to start over, if not end. That seems to work but its not exact as if I set the new due date to 5 minutes from the 1st due date it will not circle back and change the incident state until the timer is met. Also if I chose to change the incident back to pending and it is AFTER the timer has met, it will not go back and re update. if that makes sense.


Can the workflow be made just to run the once?
So once it sets the task back to active. The workflow finishes. Then the next time you set it, it kicks off a new workflow.


krism
Kilo Contributor

Can you elaborate? The workflow does only run once which is what the issue is.