WorkOrder function
- getAvgResolutionTime
- getWorkOrdersByCompletionTime
- getTopNTechnicians
- getTopNBuildingsWithPlannedTypeCount
- getTopNTeamsWithOpenCloseCount
- getTopNTechWithAvgResolutionTime
- getTopNBuildingsWithUnPlannedTypeCount
- getTopNTechWithOpenCloseCount
- getTopNBuildingsPlannedClosedTotalWoCount
- getTopNBuildingsWithRecurringUnPlannedCountForResource
- getTopNBuildingsWithUnPlannedCountForCategories
- getSiteName
- addTaskSection
#
getAvgResolutionTimeThe getAvgResolutionTime function takes the count, startTime and endTime(in millis) as input and returns list containing average Resolution Time By Category.
Syntax:
new NameSpace("workorder").getAvgResolutionTime(
Number
count,Number
startTime,Number
endTime);
Returns: List
Example:
response = new NameSpace("workorder").getAvgResolutionTime(count,startTime,endTime);log response;
#
getWorkOrdersByCompletionTimeThe getWorkOrdersByCompletionTime function takes the count, startTime and endTime(in millis) as input and returns list containing the workorder completion time of sites.
Syntax:
new NameSpace("workorder").getWorkOrdersByCompletionTime(
Number
count,Number
startTime,Number
endTime);
Returns: List
Example:
response = new NameSpace("workorder").getWorkOrdersByCompletionTime(count,startTime,endTime);log response;
#
getTopNTechniciansThe getTopNTechnicians function takes the count, startTime and endTime(in millis) as input and returns list containing the technicians completed workorder high workorders.
Syntax:
new NameSpace("workorder").getTopNTechnicians(
Number
count,Number
startTime,Number
endTime);
Returns: List
Example:
response = new NameSpace("workorder").getTopNTechnicians(count,startTime,endTime);log response;
#
getTopNBuildingsWithPlannedTypeCountThe getTopNBuildingsWithPlannedTypeCount function takes the count, startTime,endTime(in millis)and siteId as input and returns list containing the count of buildings with plan.
Syntax:
new NameSpace("workorder").getTopNBuildingsWithPlannedTypeCount(
Number
count,Number
startTime,Number
endTime,Number
siteId);
Returns: List
Example:
response = new NameSpace("workorder").getTopNBuildingsWithPlannedTypeCount(count,startTime,endTime,siteId);log response;
#
getTopNTeamsWithOpenCloseCountThe getTopNTeamsWithOpenCloseCount function takes the count, startTime,endTime(in millis)and siteId as input and returns list containing the teams with highest open and closed workorder count.
Syntax:
new NameSpace("workorder").getTopNTeamsWithOpenCloseCount(
Number
count,Number
startTime,Number
endTime,Number
siteId);
Returns: List
Example:
response = new NameSpace("workorder").getTopNTeamsWithOpenCloseCount(count,startTime,endTime,siteId);log response;
#
getTopNTechWithAvgResolutionTimeThe getTopNTechWithAvgResolutionTime function takes the count, startTime,endTime(in millis)and siteId as input and returns list containing the technicians average resolution time which refers to the technician taken time for completing many workorder which is averaged and returned.
Syntax:
new NameSpace("workorder").getTopNTechWithAvgResolutionTime(
Number
count,Number
startTime,Number
endTime,Number
siteId);
Returns: List
Example:
response = new NameSpace("workorder").getTopNTechWithAvgResolutionTime(count,startTime,endTime,siteId);log response;
#
getTopNBuildingsWithUnPlannedTypeCountThe getTopNBuildingsWithUnPlannedTypeCount function takes the count, startTime,endTime(in millis)and siteId as input and returns list containing the count of unplanned buildings.
Syntax:
new NameSpace("workorder").getTopNBuildingsWithUnPlannedTypeCount(
Number
count,Number
startTime,Number
endTime,Number
siteId);
Returns: List
Example:
response = new NameSpace("workorder").getTopNBuildingsWithUnPlannedTypeCount(count,startTime,endTime,siteId);log response;
#
getTopNTechWithOpenCloseCountThe getTopNTechWithOpenCloseCount function takes the count, startTime,endTime(in millis)and siteId as input and returns list containing the technicians with open and closed workorder count.
Syntax:
new NameSpace("workorder").getTopNTechWithOpenCloseCount(
Number
count,Number
startTime,Number
endTime,Number
siteId);
Returns: List
Example:
response = new NameSpace("workorder").getTopNTechWithOpenCloseCount(count,startTime,endTime,siteId);log response;
#
getTopNBuildingsPlannedClosedTotalWoCountThe getTopNBuildingsPlannedClosedTotalWoCount function takes the count, startTime,endTime(in millis)and siteId as input and returns list of closed palnned buildings total workorder count.
Syntax:
new NameSpace("workorder").getTopNBuildingsPlannedClosedTotalWoCount(
Number
count,Number
startTime,Number
endTime,Number
siteId);
Returns: List
Example:
response = new NameSpace("workorder").getTopNBuildingsPlannedClosedTotalWoCount(count,startTime,endTime,siteId);log response;
#
getTopNBuildingsWithRecurringUnPlannedCountForResourceThe getTopNBuildingsWithRecurringUnPlannedCountForResource function takes the startTime,endTime(in millis)and siteId as input and returns list containing the buildings with unplanned count because of resource.
Syntax:
new NameSpace("workorder").getTopNBuildingsWithRecurringUnPlannedCountForResource(
Number
startTime,Number
endTime,Number
siteId);
Returns: List
Example:
response = new NameSpace("workorder").getTopNBuildingsWithRecurringUnPlannedCountForResource(startTime,endTime,siteId);log response;
#
getTopNBuildingsWithUnPlannedCountForCategoriesThe getTopNBuildingsWithUnPlannedCountForCategories function takes the count,startTime,endTime(in millis)and siteId as input and returns list containing the buildings with unplanned count because of category.
Syntax:
new NameSpace("workorder").getTopNBuildingsWithUnPlannedCountForCategories(
Number
count,Number
startTime,Number
endTime,Number
siteId);
Returns: List
Example:
response = new NameSpace("workorder").getTopNBuildingsWithUnPlannedCountForCategories(count,startTime,endTime,siteId);log response;
#
getSiteNameThe getSiteName function takes the siteId as input and returns the site name.
Syntax:
new NameSpace("workorder").getSiteName(
Number
siteId);
Returns: String
Example:
siteId = 1370466;sitename = new NameSpace("workorder").getSiteName(siteId);log sitename;
#
addTaskSectionThe addTaskSection function takes the sectionName,parentTicket and sequenceNumber as input and returns the added task section Id.
Syntax:
new NameSpace("workorder").addTaskSection(
String
sectionName,Number
parentTicket,Number
sequenceNumber);
Returns: Long
Example:
taskSectionName = "<some task section name>";parentWo = "<some parentworkorder id>";seqNum = "<some sequence number>";log new NameSpace("workorder").addTaskSection(taskSectionName,parentWo,seqNum);