Skip to main content

system.kanoa.cmms.getMaintenanceWorkflowChurn(startDate, endDate)

Identifies work orders that exhibit workflow "churn" over a specified date range � that is, work orders that were reopened, moved backward through statuses, or reassigned repeatedly before reaching completion, rather than progressing cleanly from creation to close. This is typically used on a work-order quality or process-health dashboard to surface maintenance work that is thrashing between statuses/technicians, which can indicate unclear job scoping, parts/approval delays, or rework.


Parameters

startDate DateTime: Start date
endDate DateTime: End date


Returns

workflowChurn pyDataset


Example

# Surface work orders with high workflow churn over the last 180 days
startDate = system.date.addDays(system.date.now(), -180)
endDate = system.date.now()
data = system.kanoa.utilities.convertDatasetToJSON(system.kanoa.cmms.getMaintenanceWorkflowChurn(startDate, endDate))

for i, row in enumerate(data):
print 'Row %i'%i
for k,v in row.items():
print k,v

break #Just limiting to returning the columns from the first record for display purposes
>>>
Row 0
workOrderEventStatusName Assigned
cancelledTransitionCount 1
workOrderEventName MWO00110
title Bake a Cake
onHoldTransitionCount 3
createdDate 2026-04-08 19:44:42.7
hasWorkflowChurn 1
assetId None
inProgressTransitionCount 5
openTransitionCount 5
assignedTransitionCount 6
assetName None
completedTransitionCount 2
workOrderEventId 62
assignedUser darren
maintenanceTypeName Project
>>>