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 access security functions
The URL used to launch the Maintenance module may include the following querystring parameters to specify its initial display:
work_request_id | display details of an existing Work Request. The ID may optionally be preceded by "WR". |
new | when true, display the New Work Request form. |
loc_code | when new=true, populate the New Work Request form for this location. |
asset_id | when new=true, populate the New Work Request form for this asset and its location. |
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. |
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".
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 Name | Field Heading | Allow Null | Edit Group | Review Group |
work_request_id | Work Request Code | 0 | NOBODY | |
date_requested | Date Work Requested | 0 | NOBODY | |
date_issued | Date Work Issued | 1 | NOBODY | MAINT-ADMIN |
date_completed | Date Work Completed | 1 | NOBODY | MAINT-ADMIN |
date_closed | Date Work Closed | 1 | NOBODY | MAINT-ADMIN |
date_cancelled | Date Work Cancelled | 1 | NOBODY | MAINT-ADMIN |
date_est_completion | Date Estimate for Completion | 1 | NOBODY | MAINT-ADMIN |
requestor | Requested By | 1 | MAINT-ADMIN | |
phone | Requestor Phone | 1 | MAINT-ADMIN | |
Requestor Email | 1 | MAINT-ADMIN | ||
status | Work Request Status | 0 | NOBODY | |
description | Work Description | 0 | ||
work_problem_type_id | Problem Type Code | 1 | ||
site_id | Site Code | 1 | ||
ft_id | Facility Type Code | 1 | ||
bl_id | Building Code | 1 | ||
fl_id | Floor Code | 1 | ||
rm_id | Room Code | 1 | ||
eq_id | Asset ID | 1 | ||
location | Problem Location | 1 | ||
work_priority_id | Priority Code | 0 | MAINT-ADMIN | MAINT-ADMIN |
work_flow_id | Workflow Code | 1 | NOBODY | MAINT-ADMIN |
work_order_id | Assigned to Work Order | 1 | NOBODY | MAINT-ADMIN |
cost_est_total | Estimated Total Cost | 1 | NOBODY | MAINT-ADMIN |
cf_notes | Tradesperson Notes | 1 | MAINT-ADMIN | MAINT-ADMIN |
cost_labour | Labour Cost | 1 | MAINT-ADMIN | MAINT-ADMIN |
cost_other | Other Costs | 1 | MAINT-ADMIN | MAINT-ADMIN |
cost_parts | Parts Cost | 1 | MAINT-ADMIN | MAINT-ADMIN |
cost_total | Total Cost | 1 | MAINT-ADMIN | MAINT-ADMIN |
hold_date | Hold Date | 1 | MAINT-ADMIN | MAINT-ADMIN |
hold_reason | Hold Reason | 1 | MAINT-ADMIN | MAINT-ADMIN |
hold_period | Hold Days | 1 | MAINT-ADMIN | MAINT-ADMIN |
hold_period_total | Hold Days Total | 1 | MAINT-ADMIN | MAINT-ADMIN |
work_trade_id | Trade Required | 1 | MAINT-ADMIN | MAINT-ADMIN |
work_cause_type_id | Cause Type | 1 | MAINT-ADMIN | MAINT-ADMIN |
work_repair_type_id | Repair Type | 1 | MAINT-ADMIN | MAINT-ADMIN |
The Maintenance module emails the following notifications:
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_id | status | action_name | action_required | status_new | notify_requestor |
Full | - | Request | - | Requested | Y |
Full | Requested | Approve | - | Approved | |
Full | Requested | Cancel | - | Cancelled | Y |
Full | Approved | Assign | - | Assigned | |
Full | Approved | Cancel | - | Cancelled | |
Full | Assigned | Estimate | - | - | |
Full | Assigned | Schedule | - | - | |
Full | Assigned | Issue | Schedule | Issued | |
Full | Assigned | Issue | Estimate | Issued | |
Full | Assigned | Cancel | - | Cancelled | |
Full | Issued | On Hold | - | On Hold | Y |
Full | Issued | Complete | - | Completed | Y |
Full | On Hold | Off Hold | - | Issued | Y |
Full | Completed | Close | - | Closed | Y |
Full | Cancelled | Close | - | Closed | |
Short | - | Request | - | Requested | Y |
Short | Requested | Assign | - | Assigned | |
Short | Requested | Cancel | - | Cancelled | Y |
Short | Assigned | Schedule | - | - | |
Short | Assigned | Issue | - | Issued | |
Short | Assigned | Issue | Schedule | Issued | |
Short | Assigned | Cancel | - | Cancelled | |
Short | Issued | Complete | - | Completed | Y |
Short | Completed | Close | - | Closed | Y |
Short | Cancelled | Close | - | 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
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_request | Work 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. | |
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_archive | Work Requests Archive (fields the same as work_request) | |
work_order | Work 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_archive | Work Orders Archive (fields the same as work_order) | |
work_request_person | Work 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_archive | Work Request Tradespeople / Contractors Archive (fields the same as work_request_person) | |
work_person | Work Tradespeople / Contractors | |
work_person_id | Tradesperson / Contractor Code. Autoincrement. | |
name | Name. | |
phone | Phone. Optional field. | |
Email. | ||
in_house | In-house? | |
work_person_archive | Work Tradespeople / Contractors Archive (fields the same as work_person) | |
work_person_rep | Work 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 address. | ||
work_person_rep_archive | Work Tradesperson / Contractor Representatives Archive (fields the same as work_person_rep) | |
work_priority | Work 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_status | Work 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_action | Work 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_flow | Work 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_actions | Work 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_notification | Work 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. | |
Recipient Email. | ||
work_log | Work 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. | |
Recipient Email. | ||
comment | Comment. | |
work_log_archive | Work Log Archive (fields the same as work_log) | |
REFERENCE TABLES | ||
work_cause_type | Work Cause Types | |
work_cause_type_id | Cause Type. | |
description | Cause Description. | |
work_repair_type | Work Repair Types | |
work_repair_type_id | Repair Type. | |
description | Repair Description. | |
work_trade | Work Trades | |
work_trade_id | Trade Code. | |
description | Trade Description. | |
work_problem_type | Work Problem Types (optional table) | |
work_problem_type_id | Problem Type Code. | |
description | Problem Type Description. |