Maximo Open Forum

 View Only
  • 1.  Allow supervisors to edit an approved labor actual (while the WO is still INPRG)

    Posted 11-28-2021 03:31
    Edited by User 1972 11-28-2021 17:21

    In WOTRACK:

    Is it possible to add a custom action/dialog that would allow supervisors to edit an approved labor actual while the WO is still INPRG?


    To me, it doesn't make sense that labor actuals get locked forever when they are approved (even though the WO is still INPRG).

    I'm aware that there is a setting that can disable automatic approval of inside labor actuals. But I don't want to use that setting...I still want automatic approval (since that cuts down on effort/complexity), but I want the ability to edit the labor actual, when required, while the WO is still INPRG.

    (the action/dialog would only available to certain security groups -- such as SUPERVISORS)


    #Administration

    ------------------------------
    User 1972
    ------------------------------


  • 2.  RE: Allow supervisors to edit an approved labor actual (while the WO is still INPRG)

    Posted 11-28-2021 03:35
    Edited by User 1972 11-28-2021 17:23

    Edit:


    Alternatively, I could make it so the automatic approval doesn't happen until the WO status is changed to COMPLETE.
    That might make more sense.

    ------------------------------
    User 1972
    ------------------------------



  • 3.  RE: Allow supervisors to edit an approved labor actual (while the WO is still INPRG)

    Posted 11-28-2021 17:20
    Edited by User 1972 11-28-2021 17:45
    Here's what I came up with:

    An automation script that approves labor actuals when the WO gets completed:
    (object launch point; event=save; add/update; before save)
    #approveLaborTransaction() docs:
    #https://bportaluri.com/wp-content/MaximoJavaDocs76/psdi/app/labor/LabTrans.html#approveLaborTransaction()
    
    if mbo.getString("STATUS") == "COMP":
        labtransSet = mbo.getMboSet("SHOWACTUALLABOR")
        labtrans = labtransSet.moveFirst()
        while (labtrans):
            if labtrans.getBoolean("GENAPPRSERVRECEIPT") == 0:
                labtrans.approveLaborTransaction()
            labtrans = labtransSet.moveNext()​


    .



    Additionally, in the WOTRACK --> Actuals tab:

    I added a button to the Actuals table control that lets the user manually approve the labor actual - without moving to the Labor Reporting application.


    if mbo.getBoolean("GENAPPRSERVRECEIPT") == 0:
    	mbo.approveLaborTransaction()​


    This screenshot has the details: https://i.stack.imgur.com/yvyzF.png



    Summary:

    Those scripts seem to work.
    I'd be happy to hear about any possible improvements/issues.