How to get the previous state without using the audit table or custom field

Krishan
Kilo Contributor

Note : Without using the custom field and audit table

$$Please make use of history $$

I have a requirement where user have feature to reopen the incident ticket, at the time of reopening the ticket state of the current incident will be redirected to its previous state instead of work in progress.

case 1: if the incident is moved form on hold to resolved and then user clicks on reopen button so ticket should be redirected to the on hold state.

case 2: if the incident is moved form work in progress to resolved and then user clicks on reopen button then ticket should be redirected to the work in progress state.

 

any how want to redirect my ticket to its previous state. 

1 REPLY 1

-O-
Kilo Patron
Kilo Patron

Unfortunately what you ask is most likely impossible. The only palce where record update history is kept is the audit table. You can use the HistoryWalker prototype to access audited records as those looked at a certain update, but in the background it uses the audit records - true only on 1st load, after that it uses the history cache.

On the other hand reverting to the same state as it was when resolved/closed in my opinion is the wrong strategy. It should be reverted to a state and in a state so that it will easily be recognized as a reopened ticket in the ticket queue. I'm thinking if an incident is closed in On hold and it goes back into On hold, agents might treat it as deserving low attention.