Maximo Open Forum

 View Only

 One User set 800 plus work order in CAN status how is this possible? How can I roll back?

  • Utilities
Tedi Kacerja's profile image
Tedi Kacerja posted 09-19-2024 09:45

Has anyone encountered this and how is it even possible that one user? Tried to rollback the status in DB but i got the following error attached.

Any idea?

Thanks,

Attachments  View in library
Maximo.png 14 KB
image.png 37 KB
Viet Tran's profile image
Viet Tran

It is possible if you change the status of these work orders from the list screen. Or maybe that the user used MXLoader.

You can restore these work orders by using SQL DB Update:

  • Update the status back to WAPPR and set the HISTORYFLAG to 0
    • UPDATE workorder SET status = 'WAPPR', HISTORYFLAG = 0 WHERE status = 'CAN' AND changedate between <startdate> and <enddate> AND changeby = <userid>;
  • If possible, delete the WOSTATUS record too
    • DELETE wostatus WHERE status = 'CAN' AND changedate between <startdate> and <enddate> AND changeby = <userid>;
Martin Fabra's profile image
Martin Fabra

Hi @Tedi Kacerja!

You can close 800 WO because you change the status in the list view. But Maximo will warn you (you will get a message like the one below)

You can reopen the WO through the database. Now, it is complex because there are several aspects to take into account to keep the record consistent.
 
There you will advance the changes (Historyflag and then, delete the CAN record from WOSTATUS and update the STATUSDATE records from WORKORDER). But you must also add that you must reopen the "workview" (for example, if there are result sets in "Start Center" that use "work view", you must update it in the "workview" table too).
Regards!

Tedi Kacerja's profile image
Tedi Kacerja

Thanks @Viet Tran and @Martin Fabra for your answer it really helped me. I was missing the HISTORYFLAG.

Now I have another issue even after rollbacking to previous status from 'CAN' , updating history flag to 0, updating the statusdate record from work order the following error appears:
We also deleted the CAN record from WOSTATUS, but the error still  occurs.
As per my checks there were no duplicates for this WO.

Any idea what I have done wrong?
Thanks!
Viet Tran's profile image
Viet Tran

Can you try deleting the record in the AssetHierarchy table which is linked to this work order to see if it helps?

DELETE assethierarchy WHERE assetnum = '3038026' AND wonum = 'UP1003852' AND siteid = 'OSHEE';

Tedi Kacerja's profile image
Tedi Kacerja

I tried deleting the record in the AssetHierarchy table, but still the same error occurs. Maybe we should also delete the record from AssetHistory table ? Thank you

Viet Tran's profile image
Viet Tran

Ah, yes, that's another one you'll have to clean up too.

Martin Fabra's profile image
Martin Fabra

Hi @Tedi Kacerja!

If you have already updated WORKORDER with historyflag = 0 and status = WAPPR.

If you have already deleted the last WOSTATUS record.

You would need to do the following:

-update workview set historyflag = 0, status = 'WAPPR' where recordkey = 'UP1003852'
- delete assethierarchy where wonum = 'UP1003852'

I've tested it locally and it worked for me. In case that doesn't work for you, it's likely that when canceling each WO, Maximo is saving information somewhere else. You'll have to activate DEBUG and check what it's doing.

Regards!