Tuesday, 18 November 2025

Improving SLA Accuracy by Aligning Work Order Reported Date with PM Seasonal Start Time | Maximo

To ensure SLAs calculate correctly from the intended seasonal start time, I added an Object Launch Point automation script on WORKORDER with:

Condition: pmnum is not null

Events: Add, Save, Before Save

The script takes the time from PM.TARGSTARTTIME and applies it to the date in REPORTDATE, ensuring the work order uses the correct seasonal seed date before any SLA is applied.


from java.util import Date, Calendar

targStartTime = mbo.getDate("PM.TARGSTARTTIME")

reportDate = mbo.getDate("REPORTDATE")

if reportDate is not None:

    calReport = Calendar.getInstance()

    calReport.setTime(reportDate)


    calTime = Calendar.getInstance()

    calTime.setTime(targStartTime)

    

    calReport.set(Calendar.HOUR_OF_DAY, calTime.get(Calendar.HOUR_OF_DAY))

    calReport.set(Calendar.MINUTE,     calTime.get(Calendar.MINUTE))

    calReport.set(Calendar.SECOND,     calTime.get(Calendar.SECOND))

    calReport.set(Calendar.MILLISECOND,0)


    mbo.setValue("REPORTDATE", calReport.getTime(), 11L)


Why This Is Needed (in base Maximo)

By default, PM work orders are created with a REPORTDATE based on the PMWoGenCronTask run time.

This causes SLA targets (response, resolution, target start/finish) to be calculated from the wrong date.

Seasonal PMs often require SLAs to start from the seasonal start time defined in PM.TARGSTARTTIME.

By merging that time into the REPORTDATE, SLA calculations become accurate and fully aligned with the seasonal schedule—instead of the cron generation timestamp.

No comments:

Post a Comment