Troubleshooting
Problem
Is there a way to record Asset Downtime?
Symptom
ASSET.STATUDATE is not updated on an Asset record when reporting downtime.
Cause
If an ASSET is changed status from the Report Downtime Action the ASSET.STATUSDATE will not be updated.
Previous to the fix for IV02778/11-14668, StatusDate was updated by two completely independent functions, an asset status change (for example, NOT READY to DECOMMISSIONED via the 'Change Status' action) and an asset up/down "status" change. The confusion lies in the fact that the word "status" is used in both cases. This is further complicated by the fact that up/down "status" is recorded in the ASSETSTATUS table. In all other applications, these <app name>STATUS tables are used to record true action menu 'Change Status' actions. For example, POSTATUS ...
PONUM STATUS CHANGEDATE CHANGEBY SITEID ORGID POSTATUSID
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
1001 WAPPR 1994-12-02 19:09:38.0 LIBERI BEDFORD EAGLENA 1
1001 CLOSE 1994-12-05 19:31:00.0 LIBERI BEDFORD EAGLENA 2
1001 APPR 1994-12-02 19:29:00.0 LIBERI BEDFORD EAGLENA 3
...or a more relevant comparison, LOCSTATUS ...
LOCATION STATUS CHANGEBY CHANGEDATE SITEID ORGID
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
AIR212 NOT READY WILSON 2012-05-30 15:12:03.851 BEDFORD EAGLENA
AIR212 LIMITEDUSE WILSON 2012-05-30 15:12:22.564 BEDFORD EAGLENA
AIR212 OPERATING WILSON 2012-05-30 15:12:53.875 BEDFORD EAGLENA
At some point, the ASSETSTATUS table was co-opted for use by the asset 'up or down?' "status" functionality instead of being used to record asset status change history.
This value is recorded in ASSETSTATUS.CHANGEDATE. Maximo uses the ASSETSTATUS table and the difference between the CHANGEDATE values on consecutive records (one created when the asset is brought down, the other created when the asset is brought back up) to calculate total downtime
The field ASSET.STATUSDATE will be removed in a later Fixpack as the above is beyond a Interim Fix and Attributes cannot be added by a Interim Fix.
Resolving The Problem
Please follow the below steps so that you may see the ASSETSTATUS.STATUSDATE for REPORT DOWNTIME Date
Please make a valid copy of your Database and Maximo folder before making any changes to your environment, then follow these steps;
1. Go to your database and run the following SQL;
select * from maxsequence where tbname='MAXRELATIONSHIP'; (use the result of this to set the maxrelationshipid in the insert statement)
insert into maxrelationship (name,parent,child,whereclause,remarks,maxrelationshipid)
values('UPDOWNSTATUSDATE','ASSET','ASSETSTATUS','assetnum=:assetnum and siteid=:siteid and changedate=(select max(changedate) from assetstatus where assetnum=:assetnum and siteid=:siteid and isrunning=:isrunning)',
'Relationship to the AssetStatus table, used to find the most recent asset up/down status date',235295);
update maxsequence set maxreserved=maxreserved+1 where tbname='MAXRELATIONSHIP';
2.Go to Aplication Designer and bring up an ASSET
Click on EXPORT Application Definition and Save on Desktop
Select the Asset.xml file to Edit the following;
Modify xml for asset app (asset.xml) as follows:
<section id="main_grid5_11_1_1" label="Downtime">
<checkbox id="main_grid5_1" dataattribute="isrunning" />
<textbox id="main_grid5_2" dataattribute="statusdate" lookup="datelookup" />
<textbox id="main_grid5_3" dataattribute="totdowntime" />
</section>
<section id="main_grid5_11_1_1" label="Downtime">
<checkbox id="main_grid5_1" dataattribute="isrunning" />
<textbox id="main_grid5_2" dataattribute="UPDOWNSTATUSDATE.changedate" lookup="datelookup" />
<textbox id="main_grid5_3" dataattribute="totdowntime" />
</section>
Import the modified xml.
Save
Was this topic helpful?
Document Information
Modified date:
17 June 2018
UID
swg21597319