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.
Original Message:
Sent: 11-28-2021 03:35
From: User 1972
Subject: Allow supervisors to edit an approved labor actual (while the WO is still INPRG)
The knee-jerk reaction might be to say, "You can't have it both ways. Either automatically approve inside labor actuals, or don't."
But I would argue that what we're asking for is fairly reasonable. Sure, let's automatically approve inside labor actuals. But it should still be possible for supervisors to edit the labor actual while the WO is INPRG. That doesn't seem unreasonable.
Edit:
Either that, or make it so the automatic approval doesn't happen until the WO status is changed to COMPLETE. On second thought, maybe that makes more sense.
------------------------------
User 1972
Original Message:
Sent: 11-28-2021 03:31
From: User 1972
Subject: Allow supervisors to edit an approved labor actual (while the WO is still INPRG)
In WOTRACK:
Is it possible to add a custom action/dialog/autoscript that would allow supervisors to edit an approved labor actual while the WO is still INPRG?
To us, it doesn't make sense that labor actuals become locked forever when they are approved (even though the WO is still INPRG).
We're aware that there is a setting that can disable automatic approval of inside labor actuals. But we don't want to use that setting...we still want automatic approval (since that saves effort/complexity), but we want the ability to edit the labor actual, when required.
(the action/dialog would only available to certain security groups -- such as SUPERVISORS)
#Administration
------------------------------
User 1972
------------------------------