There are small trivial bugs in Assets Maintenance Management that are encountered and easily resolved. This tracker is open to track them.
For a start, Asset > Asset Meter and Asset > Meter Log has DateTrx fields that are not populated upon creation. Resolution is to put in DEFAULT value as @#Date@. However i feel this field is redundant. It should use the Creation or Update datetime fields.
More bugs:
3. Prognosis Process hits MPAssetPlanning.doIt: Invalid PO Info - POInfo[null,AD_Table_ID=0]
due to no AD defined for X_MP_Prognosis (remedy: Create AD from DB)
4. Then same process gives
ERROR: null value in column "programmingtype" violates not-null constraint
at org.compiere.model.PO.saveEx(PO.java:2173)
at org.compiere.process.MPAssetPlanning.doIt(MPAssetPlanning.java:258)
(remedy - set field to non-mandatory and synchronize with DB)
5. Another one:
===========> X_MP_Prognosis.set_Value: ProgrammingType - Class invalid: class java.lang.String, Should be class java.lang.Boolean:
(remedy: GenerateModel for this table)
6. View OT - GENERATE OT :
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 0
at org.compiere.apps.form.VMPGenerateOT.createOT(VMPGenerateOT.java:672)
==> newOT.setC_DocType_ID(MDocType.getOfDocBaseType(Env.getCtx(), "OTP")[0].getC_DocType_ID());
(remedy: assign DocType for Work Order (OT) to "MOF" <Maintenance Order>)
7. Same also with at org.compiere.apps.form.VMPRequestOT.createOT(VMPRequestOT.java:653)
8. In both Views <VMPGenerateOT><VMPRequestOT> there are latin words to be translated.
9. In VMPRequestOT there is a dead loop for LookChilds that is wrongly called compared to VMPGenerateOT
public void lookChilds(int MP_ID, X_MP_OT OT){
String sql = "select mp_maintain_id from mp_maintain where ischild='Y' and MP_MAINTAINPARENT_ID=?";
PreparedStatement pstmt = null;
try
{
pstmt = DB.prepareStatement(sql,null);
pstmt.setInt(1,MP_ID);
ResultSet rs = pstmt.executeQuery();
while (rs.next()){
createOTTaskDetail(rs.getInt(1),OT);
lookChilds(rs.getInt(1),OT);
Correction on No. 9 below. The lookChilds is correct. The error is actually it is not been called by the main routine in VMPRequestOT
Issues 1 - 4 resolved and commited in Revision: 15548
http://adempiere.svn.sourceforge.net/adempiere/?rev=15548&view=rev
Code changes for 6 and 7 in new branch commit earlier
Issue 6 & 7 resolved in Revision: 15549
http://adempiere.svn.sourceforge.net/adempiere/?rev=15549&view=rev
Solved No.5 should not be boolean. It is actually referring to a Reference List. solved in Revision 15551
http://adempiere.svn.sourceforge.net/adempiere/?rev=15551&view=rev
10. VMPGenerateOT commits table MP_OT which DocAction and DocType should default CO and 50010 (MOF-Maintenance Order) respectively. To be done in AD.
Solving 10, committed in Revision: 15553
http://adempiere.svn.sourceforge.net/adempiere/?rev=15553&view=rev