system.kanoa.cmms.updateProcedureStepEvent(procedureStepInfo, userId)
Updates an existing procedure step event � the record of a single procedure step's execution within a work order, such as its completion status, actual time spent, or comment.
Call this when a technician corrects a logged duration, marks a step complete/incomplete after the fact, or adds a comment to the execution record.
All keys in procedureStepInfo are required, and the function overwrites the identified step event's fields with the values supplied, recording userId for audit purposes.
Parameters
procedureStepInfo Dictionary
| - actualMinutes | Integer | |
| - comment | String | |
| - completed | Boolean | |
| - procedureStepEventId | Integer | Id of procedure step event |
| - procedureStepId | Integer | Id of procedureStep |
| - workOrderEventId | Integer | Id of workOrderEvent |
userId Integer:Id of the user executing the function
Returns
# of records modified Integer
message String None if success
Example
procedureStepInfo = {
"procedureStepEventId": 19042,
"procedureStepId": 4021,
"workOrderEventId": 7731,
"actualMinutes": 18,
"completed": True,
"comment": "Belt tension adjusted, within spec."
}
userId = system.kanoa.security.getIDPUserId({'userName': 'SYSTEM'})
result, message = system.kanoa.cmms.updateProcedureStepEvent(procedureStepInfo, userId)
print result, message