Menu

#2627 Small bugs in Maintenance Management

open
None
5
2011-06-04
2011-06-04
No

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.

Discussion

  • Redhuan D. Oon

    Redhuan D. Oon - 2011-06-05

    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);

     
  • Redhuan D. Oon

    Redhuan D. Oon - 2011-06-05

    Correction on No. 9 below. The lookChilds is correct. The error is actually it is not been called by the main routine in VMPRequestOT

     
  • Redhuan D. Oon

    Redhuan D. Oon - 2011-06-06

    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

     
  • Redhuan D. Oon

    Redhuan D. Oon - 2011-06-06

    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

     
  • Redhuan D. Oon

    Redhuan D. Oon - 2011-06-06

    10. VMPGenerateOT commits table MP_OT which DocAction and DocType should default CO and 50010 (MOF-Maintenance Order) respectively. To be done in AD.

     

Log in to post a comment.