Maintenance

The Maintenance module processes requests for maintenance work (Work Requests) which are created:

For each Work Request, a sequence of actions changes its status until the work has been completed, when the request is archived.

Maintenance module settings

Maintenance module access security functions

Launch URL

The URL used to launch the Maintenance module may include the following querystring parameters to specify its initial display:

work_request_iddisplay details of an existing Work Request. The ID may optionally be preceded by "WR".
newwhen true, display the New Work Request form.
loc_codewhen new=true, populate the New Work Request form for this location.
asset_idwhen new=true, populate the New Work Request form for this asset and its location.

Custom Files

In addition to configuration settings, the following files in the custom folder are accessed:

maintenance\style.css Page styles.
maintenance\issueDetails.htm Template for Issue details, shown in the Issue action page and in Issue notification emails.
maintenance\issueEmail.htm Template for Issue notification emails (sent to tradespeople / contractors).
maintenance\issueEmailPM.htm Template for Issue notification emails fpr Preventive Maintenance (sent to tradespeople / contractors).
maintenance\notificationEmail.htm Template for other notification emails.
maintenance\PDF.htm Template for the work PDF page.

Templates may contain the following placeholders which are replaced:

$$appRoot$$ The SISfm web application root URL.
$$email_message$$ A message to include in an email.
$$email_reason$$ The reason an email was sent. Populated for recipients in table work_notification to advise the criteria used to determine that the message should be sent. Presentation as a footnote in a small font is recommended.
$$field_name$$ The name of any field field_name in table work_request (or the database view specified by the MaintViewRequest setting).
$$bl_label$$ The label to use for field bl_id according to the facility type (see Facility Types).
$$fl_label$$ The label to use for field fl_id according to the facility type (see Facility Types).
$$rm_label$$ The label to use for field rm_id according to the facility type (see Facility Types).
$$ISSUE_DETAILS$$ The content of issueDetails.htm (should be used in issueEmail.htm if not attaching the work PDF).
$$WORK_PEOPLE_TABLE$$ An HTML table of the tradespeople / contractors for the request, each with name, email, phone.
$$WORK_PEOPLE_NAMES$$ An HTML list of the tradesperson / contractor names for the request, each ending with <br>.
$$LOC_CODE$$ The work location as a formatted loc_code, if at least work_request.site_id has been defined.
$$PM_ISSUE_LIST$$ An HTML table of the Work Orders and their Work Requests, included in an Issue notification for Preventive Maintenance.

Reports

Selecting the Reports icon displays a list of reports from the Report Maker module whose AVW files are in a subfolder whose name contains "Maintenance".

Access Security

WORK REQUESTS

If the logged in user is only a Tradesperson / Contractor Representative (having an entry in table work_person_rep but not an entry in table em), the only Work Requests displayed are those "scheduled to" (added using the Schedule action) Tradespeople / Contractors of whom that user is a Representative.

For example, if Jack and Jill are the only Representatives for ABC Plumbing, they will each only see the Work Requests scheduled to it; but if Jack is also a Representative for XYZ Fitters, he will see the Work Requests scheduled to it as well.

FUNCTIONS

Access to the ModuleMaintenance function provides access to the Maintenance module, where a user can access the Dashboard. A user whose email address is in table em can also submit requests and review their own requests, but not edit them.

Access to the MaintManagement function provides access to all requests, including editing them, and to all available Maintenance module work actions.

Access to the MaintLogComments function allows comments to be logged.

Access to the MaintDocAdd, MaintDocDelete, MaintDocReplace functions allows request documents to be added, deleted, replaced..

WORK FLOW ACTIONS

The Work Flow Actions table may have an optional Access Group field (work_flow_actions.access_group) to support access control for work flow actions.

FIELDS

Access to the fields in table work_request controls who can see/review them, who can edit them, and whether they are required.

The following table from the Database Manager shows these fields with recommended settings for the following example access groups:

Field NameField HeadingAllow NullEdit GroupReview Group
work_request_idWork Request Code0NOBODY
date_requestedDate Work Requested0NOBODY
date_issuedDate Work Issued1NOBODYMAINT-ADMIN
date_completedDate Work Completed1NOBODYMAINT-ADMIN
date_closedDate Work Closed1NOBODYMAINT-ADMIN
date_cancelledDate Work Cancelled1NOBODYMAINT-ADMIN
date_est_completionDate Estimate for Completion1NOBODYMAINT-ADMIN
requestorRequested By1MAINT-ADMIN
phoneRequestor Phone1MAINT-ADMIN
emailRequestor Email1MAINT-ADMIN
statusWork Request Status0NOBODY
descriptionWork Description0
work_problem_type_idProblem Type Code1
site_idSite Code1
ft_idFacility Type Code1
bl_idBuilding Code1
fl_idFloor Code1
rm_idRoom Code1
eq_idAsset ID1
locationProblem Location1
work_priority_idPriority Code0MAINT-ADMINMAINT-ADMIN
work_flow_idWorkflow Code1NOBODYMAINT-ADMIN
work_order_idAssigned to Work Order1NOBODYMAINT-ADMIN
cost_est_totalEstimated Total Cost1NOBODYMAINT-ADMIN
cf_notesTradesperson Notes1MAINT-ADMINMAINT-ADMIN
cost_labourLabour Cost1MAINT-ADMINMAINT-ADMIN
cost_otherOther Costs1MAINT-ADMINMAINT-ADMIN
cost_partsParts Cost1MAINT-ADMINMAINT-ADMIN
cost_totalTotal Cost1MAINT-ADMINMAINT-ADMIN
hold_dateHold Date1MAINT-ADMINMAINT-ADMIN
hold_reasonHold Reason1MAINT-ADMINMAINT-ADMIN
hold_periodHold Days1MAINT-ADMINMAINT-ADMIN
hold_period_totalHold Days Total1MAINT-ADMINMAINT-ADMIN
work_trade_idTrade Required1MAINT-ADMINMAINT-ADMIN
work_cause_type_idCause Type1MAINT-ADMINMAINT-ADMIN
work_repair_type_idRepair Type1MAINT-ADMINMAINT-ADMIN

Notifications

The Maintenance module emails the following notifications:

Work Flow

Table work_flow_actions defines for each workflow the actions that can be taken at each request status.

Some actions result in a change of request status, whereas others must be done before a status change can occur.

Here are two workflow examples, which show which actions are available at each status, and for each action the resulting status change provided any other required actions have been done:

work_flow_idstatusaction_nameaction_requiredstatus_newnotify_requestor
Full-Request-RequestedY
FullRequestedApprove-Approved
FullRequestedCancel-CancelledY
FullApprovedAssign-Assigned
FullApprovedCancel-Cancelled
FullAssignedEstimate--
FullAssignedSchedule--
FullAssignedIssueScheduleIssued
FullAssignedIssueEstimateIssued
FullAssignedCancel-Cancelled
FullIssuedOn Hold-On HoldY
FullIssuedComplete-CompletedY
FullOn HoldOff Hold-IssuedY
FullCompletedClose-ClosedY
FullCancelledClose-Closed
Short-Request-RequestedY
ShortRequestedAssign-Assigned
ShortRequestedCancel-CancelledY
ShortAssignedSchedule--
ShortAssignedIssue-Issued
ShortAssignedIssueScheduleIssued
ShortAssignedCancel-Cancelled
ShortIssuedComplete-CompletedY
ShortCompletedClose-ClosedY
ShortCancelledClose-Closed

The Full workflow example requires the request to be approved, requires estimates before the request can be issued, and includes the On Hold status.

The Short workflow example is more suitable for smaller jobs.

The table also shows the status changes which are notified to the requestor by email.

This table was generated using the following SQL:

SELECT work_flow_id,status,action_name,action_required,status_new,notify_requestor
FROM work_flow_actions,work_status,work_action
WHERE work_flow_actions.status=work_status.work_status_id
AND work_flow_actions.action_name=work_action.work_action_id
ORDER BY work_flow_id,work_status.seq,work_action.seq

Notes on Operation

Database

The SISfm Maintenance module database has the following structure:

This diagram omits reference and archive tables, described below.

Database Manager is used to edit tables work_person_rep work_person, work_status, work_action, work_flow, work_flow_actions, work_notification, work_priority and reference tables.

For tables work_request, work_order and work_person, the Database Manager may be used to remove optional fields, and to add any other fields required (making the same changes to their archive table fields).

For table work_request, additional fields named xx_bl_id xx_fl_id xx_rm_id may be included to support work requests for facility type XX.

work_requestWork Requests
work_request_id Work Request Code.
date_requested Date Work Requested. Set by New Work Request.
date_issued Date Work Issued. Set by the Issue action.
date_completed Date Work Completed. Set by the Complete action.
date_closed Date Work Closed. Set by the Close action.
date_cancelled Date Work Cancelled. Set by the Cancelled action.
date_est_completion Date Estimate for Completion. Set whenever Work Request Priority is set, according to work_priority.complete_days and the MaintHolidays setting.
requestor Requested By. Set by New Work Request to session variable userID.
phone Requestor Phone. Set by New Work Request to session variable phone.
email Requestor Email. Set by New Work Request to session variable email.
status Work Request Status. Set to Requested by New Work Request, and when an action changes the status.
description Work Description. Set by New Work Request.
work_problem_type_id Problem Type Code. Optional field.
work_priority_id Work Request Priority. This has table work_priority as its reference table.
site_id Site Code. Optional field.
ft_id Facility Type Code. Optional field (see Facility Types). Should be validated using an enumeration list of facility types being supported.
bl_id Building Code. Optional field, if present Site Code must also be present.
fl_id Floor Code. Optional field, if present Site, Building Code must also be present.
rm_id Room Code. Optional field, if present Site, Building and Floor Code must also be present.
eq_id Asset ID. Optional field. Its selector offers assets according to the current Site, Building, Floor and Room Code if defined.
location Problem Location. Optional field.
work_flow_id Workflow Code. Set by New Work Request using criteria in table work_flow.
work_order_id Assigned to Work Order. Set by the Assign action.
cost_est_total Estimated Total Cost. Set by the Estimate action.
cf_notes Tradesperson Notes. Set by the Complete action.
cost_labour Labour Cost. Set by the Complete action.
cost_other Other Costs. Set by the Complete action.
cost_parts Parts Cost. Set by the Complete action.
cost_total Total Cost. Set by the Complete action.
hold_date Hold Date. Set by the On Hold and Off Hold actions.
hold_reason Hold Reason. Set by the On Hold and Off Hold actions.
hold_period Hold Days. Set by the On Hold and Off Hold actions.
hold_period_total Hold Days Total. Set by the Off Hold action.
work_trade_id Trade Required. Set by the Assign action.
work_cause_type_id Cause Type. Set by the Complete action.
work_repair_type_id Repair Type. Set by the Complete action.
 
work_request_archiveWork Requests Archive (fields the same as work_request)
 
work_orderWork Orders
work_order_id Work Order Code. Autoincrement. Rows inserted by the Assign action.
work_trade_id Trade Required. Set by the Assign action.
description Work Description. Set by the Assign action.
 
work_order_archiveWork Orders Archive (fields the same as work_order)
 
work_request_personWork Request Tradespeople / Contractors
work_request_person_id ID. Autoincrement. Rows inserted by the Schedule action.
work_request_id Work Request Code. Set by the Schedule action.
work_person_id Tradesperson / Contractor Code. Set by the Schedule action.
 
work_request_person_archiveWork Request Tradespeople / Contractors Archive (fields the same as work_request_person)
 
work_personWork Tradespeople / Contractors
work_person_id Tradesperson / Contractor Code. Autoincrement.
name Name.
phone Phone. Optional field.
email Email.
in_house In-house?
 
work_person_archiveWork Tradespeople / Contractors Archive (fields the same as work_person)
 
work_person_repWork Tradesperson / Contractor Representatives
user_name Login Username (session variable adsName - see Custom Folder)
work_person_id Tradesperson / Contractor Code.
name_first First Name.
name_last Last Name.
phone Phone (optional).
email Email address.
 
work_person_rep_archiveWork Tradesperson / Contractor Representatives Archive (fields the same as work_person_rep)
 
work_priorityWork Priorities
work_priority_id Work Priority Code. Numeric.
description Description.
complete_days Days to Complete. Each day has 8 working hours, so for example, the value 0.25 is two hours.
 
work_statusWork Statuses
work_status_id Work Status Code. One of -, Requested, Approved, Assigned, Issued, On Hold, Completed, Cancelled, Closed.
seq Sequence. The order in which requests are grouped when displaying the request table. The first must be for the - status code (only used internally).
archive Archive This Status. Use Y to archive.
 
work_actionWork Action
work_action_id Work Action Code. One of -, Approve, Assign, Estimate, Schedule, Issue, On, Hold, Off, Hold, Complete, Close, Cancel, Request
seq Sequence. The order in which action buttons are displayed. The first must be for the - action code (only used internally).
description Action Description. Displayed at the top of their corresponding forms.
 
work_flowWork Flow
work_flow_id Workflow Code.
seq Sequence. The order in which selection criteria are evaluated.
criteria Selection Criteria.
work_priority_id Default Work Request Priority.
 
work_flow_actionsWork Flow Actions
work_flow_id Workflow Code.
status Work Request Status.
action_name Action Name.
action_required Prerequisite Actions.
status_new New Work Request Status.
notify_requestor Notify Requestor. Use Y to notify.
access_group The access group, as for sisfm_flds.review_group.
 
work_notificationWork Notifications
work_notification_id ID. Autoincrement.
work_request_id Work Request Code. Limit notification to this work request, no limit if NULL.
work_flow_id Work Flow Code. Limit notification to this work flow, no limit if NULL.
action_name Action Name. Limit notification to this action, no limit if NULL.
criteria Selection Criteria. Limit notification according to SQL WHERE criteria on table work_request this work request, no limit if NULL. Example: bl_id='HQ' AND priority<4
name Recipient Name.
email Recipient Email.
 
work_logWork Log
work_log_id ID. Autoincrement. Rows inserted for each action and each notification.
created Date/Time.
username Username.
work_request_id Work Request Code.
action_name Action Name.
status Work Request Status.
name Recipient Name.
email Recipient Email.
comment Comment.
 
work_log_archiveWork Log Archive (fields the same as work_log)
 
REFERENCE TABLES
 
work_cause_typeWork Cause Types
work_cause_type_id Cause Type.
description Cause Description.
 
work_repair_typeWork Repair Types
work_repair_type_id Repair Type.
description Repair Description.
 
work_tradeWork Trades
work_trade_id Trade Code.
description Trade Description.
 
work_problem_typeWork Problem Types (optional table)
work_problem_type_id Problem Type Code.
description Problem Type Description.