Trouble Code Configuration
SRS_TROUBLE_CODES Schema
Configuration
For normal operations, one or more trouble code groups must be configured. Each trouble code group consists of one or more trouble code entries. Each row in srs_trouble_codes corresponds to a single trouble code entry.
A trouble code is the grouping of one trouble code entry from each of the different trouble code groups.
Example
The following (incomplete) configuration has 2 trouble code groups. The first trouble code group is called "Lights" and has the entries "Unselected", "On", "Off", and "Blinking". The second trouble code group is called "Cause" and has the entries "Unselected", "Wire Down", and "Pole Broken".
Valid trouble codes with this configuration include Lights="On" Cause="Unselected", Lights="Off" Cause="Wire Down", and Lights="Blinking" Cause="Unselected".
INSERT INTO srs_trouble_codes(group_name, group_order, code_name, code_num)
VALUES('Lights', 1, 'Unselected', 0);
INSERT INTO srs_trouble_codes(group_name, group_order, code_name, code_num)
VALUES('Lights', 1, 'On', 1);
INSERT INTO srs_trouble_codes(group_name, group_order, code_name, code_num)
VALUES('Lights', 1, 'Off', 2);
INSERT INTO srs_trouble_codes(group_name, group_order, code_name, code_num)
VALUES('Lights', 1, 'Blinking', 3);
INSERT INTO srs_trouble_codes(group_name, group_order, code_name, code_num)
VALUES('Cause', 2, 'Unselected', 0);
INSERT INTO srs_trouble_codes(group_name, group_order, code_name, code_num)
VALUES('Cause', 2, 'Wire Down', 1);
INSERT INTO srs_trouble_codes(group_name, group_order, code_name, code_num)
VALUES('Cause', 2, 'Pole Broken', 2);
INSERT INTO srs_trouble_codes(group_name, group_order, code_name, code_num)
Groups and Codes
Trouble code groups must be assigned consecutive integers starting with 1. All of the trouble code entries in a group must have the same group name. No two groups may have the same group name.
Trouble code entries within a group must be assigned consecutive code numbers starting with 0 or 1. Trouble code entries within a group must have distinct code names.
Other Fields
priority
Used in calculation of the priority of a call
description
This field is not used in any trouble code calculations
short_desc
The short description of a trouble code is equal to the distinct short_desc values for each of the selected trouble code entries
groupable
A trouble code's groupable value is 0 if any of its trouble code entries has a groupable value of 0. Otherwise, a trouble code's groupable value is equal to the highest groupable value among its trouble code entries. A groupable value of 0 means that the call is not groupable and will always create its own event. A groupable value of 1 means that the call can group to an existing groupable event or have other calls group to it. A groupable value of 3 means that the call will not group into other calls/events, but its event can have calls with groupable=1 grouped into it. 3 is primarily used for damage assessment.
clue
A trouble code is considered a clue if any of its trouble code entries has clue set to 1.
combine_pri
Used in calculation of the total priority of a call