Skip to main content

system.kanoa.cmms.getMaintenanceLaborHoursSummary(paramsDict)

Returns labor hours summary for the given period: technician-logged hours, procedure step hours, their combined total, and the time-in-active-state/time-to-complete averages already computed from status-change history. When assetId is an area/site, includes every descendant asset's work orders rather than requiring a specific leaf asset.


Parameters

paramsDict Dictionary

- assetIdIntegerNot required restricts to this asset and its descendants
- endDateDateTimeEnd date
- startDateDateTimeStart date

Returns

laborHoursSummary pyDataset


Example

paramsDict = {
'startDate': system.date.addDays(system.date.now(), -90),
'endDate': system.date.now()
}

data = system.kanoa.utilities.convertDatasetToJSON(system.kanoa.cmms.getMaintenanceLaborHoursSummary(paramsDict))

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

break
>>>
Row 0
workOrderCount 10
procedureStepHours 0.0
avgTimeToCompleteHours 7.5
avgTimeInActiveStateHours 4.31
totalLaborHours 4.63
technicianHours 4.63
>>>