Maximo List Archive

This is an archive of the Maximo Yahoo Community. The content of this pages may be a sometimes obsolete so please check post dates.
Thanks to the community owner Christopher Wanko for providing the content.



Re: [MAXIMO List] Work orders closed accidentally

From: ggutierrez (2012-06-06 16:20)

Wow wish I could have something like that.
The sender of this message is responsible for its content and addressing. Any actions not conforming to Petrobras System internal policies are forbidden.
----- Original Message -----
From: Kevin Egolf [kegolf@techopsolutions.net]
Sent: 06/06/2012 05:07 PM AST
To: <MAXIMO@yahoogroups.com>
Subject: RE: [MAXIMO List] Work orders closed accidentally
We have removed the rights for any user to close a work order. We are using an escalation to close work orders 60 days after a status of complete. The escalation verifies there are no open purchasing documents associated with the work order or any children or tasks.

Kevin


From: MAXIMO@yahoogroups.com [mailto:MAXIMO@yahoogroups.com] On Behalf Of Chris Brandon
Sent: Wednesday, June 06, 2012 4:26 PM
To: MAXIMO@yahoogroups.com
Subject: Re: [MAXIMO List] Work orders closed accidentally


I have had this happen multiple time ... usually closing thousands of workorders. (Had it happen in POs too) I know who closed them and when so came up with the SQL below to put them back into whatever statsu they were in prior to this event. v6.2.4 (Hope this is resolved in v7.5)

createtable #wostatus(trwonum
varchar(10),
trstatus varchar(16),
trchangedate datetime,
trpreviousstatus varchar(16),
trpreviousdatetime datetime)
CREATETABLE #workorder(wowonum
varchar(10),wostatus varchar(10),wohistoryflag bit)

insertinto #wostatus(trwonum,trstatus,trchangedate)
SELECT wonum, status, changedate
FROM wostatus
WHERE (changedate > CONVERT(DATETIME, '2012-02-17 13:49:46', 102))
AND (changeby = 'XXXXXXX') AND (status = 'CLOSE')
insertinto #workorder(wowonum, wostatus)
selecttrwonum, trstatus
from#wostatus

update#wostatus
set trpreviousstatus = (SELECT top 1 status FROMwostatus WHERE(changedate < CONVERT(DATETIME, '2012-02-17 13:30:00',102))
AND wonum = #wostatus.trwonum
order by changedate desc),trpreviousdatetime =(SELECTtop1 changedate FROMwostatus WHERE(changedate < CONVERT(DATETIME, '2012-02-17 13:30:00',102)) AND wonum = #wostatus.trwonum order by changedate desc)

updateworkorder
setstatus = #wostatus.trpreviousstatus, historyflag = 0
FROM workorder inner join #wostatus on #wostatus.trwonum =workorder.wonum
WHERE (trpreviousstatus is not NULL)
--and #wostatus.trwonum = '361402'
select#wostatus.*, workorder.wonum, workorder.status, workorder.historyflag
from #wostatus
inner join workorder on
workorder.wonum = #wostatus.trwonum
oRDERBY trpreviousstatus
droptable #wostatus
droptable #workorder


You also must delete asset hierarchy records for each wonum, but I didn't have that one written into this code. I just deleted any record in there for a workorder that wasn't in a "CLOSE" status.delete from asset hierarchy where wonum = 'xxxxxxxx'

________________________________
From: jhale1996 <jhale1996@yahoo.com <mailto:jhale1996%40yahoo.com> >
To: MAXIMO@yahoogroups.com <mailto:MAXIMO%40yahoogroups.com>
Sent: Wednesday, June 6, 2012 2:27 PM
Subject: [MAXIMO List] Work orders closed accidentally

Occasionally our users will "accidentally" close work orders that are not ready to be closed. With Maximo 4 a few power users had access to go into the database and change the status back to open. With our upgrade to 7.x we removed their ability to reopen work orders. Recently a couple hundred work orders were closed (yes we do control who can close) that still had outstanding work left to complete. We do use the edit historical feature, but this does not allow additional costs to be added. The other painful option that we do was to duplicate the work order and create a follow up. I am looking for suggestions on both improvements to reduce the number or work orders that need to be reopened and ideas how to handle work orders that are closed too early.
Appreciate the input.