Maintenance Order finish
Endpoint: POST {{host}}/maintenance/orders/{{id}}/actions/finish
Input Parameters: -
Steps:
If Maintenance order is not assigned to User, it is assigned to user who finishes it. Status is changed to Assigned and if Time scheduled finish is not set, it is set to current time
If reason code for pause is provided, updates MO Reason Code
Updates completition confirmation Finish System Time to current time
Updates completition confirmation Diff Time following these rules
If Completition confirmation Start time is filled → Diff time = previous Diff time + (current time - CC Start Time)
Updates MO status to Finished
Updates MO Time finished to current time
Updates MO KPIs See KPIs documentation
duration time, total time, spent time, Time to last Failure time and Downtime
MO History record created
Applies Shift factor:
Shift factor is calculated as difference between MO Time scheduled finish and current time
If MO is connected with Preventive plan and has equipment and type is preventive plan and Preventive plan has enabled Shift factor feature:
Updates each MO associated with Equipment and Preventive plan - set Time scheduled Finish as original scheduled finish time +- Shift Factor
Saves new shift factor to preventive plan equipment relation
Sets connected Maintenance Notification (if is set) to status “Resolved”