Chris — I think part of why this is hard to answer is that there are three
different things in TicketsCAD that look like "a 3 character code", and the
replies so far have each been about a different one. Two of them are yours to
invent, one is fixed in the software. Sorted by which is which:
1. UNIT IDENTIFIERS -- yours (Arnie's answer)
M01, F03, E2, 7152. The unit's Name / Handle / Callsign fields. Entirely
user-specified, and there is no shipped list because TicketsCAD doesn't ship
any units. If you're seeing these on the map or in the units list, they're
whatever your install was set up with.
2. UNIT STATUS CODES -- also yours, and this is my guess at what you're
actually looking at
These are the un_status rows: the short label shown on a unit's status chip.
On your install (from the query you posted on issue #48) those include P-1
through P-5, TRP, Code Brown, Staged, Special Detail and so on.
I checked whether any of those ship with TicketsCAD, because if they did there
would be a documented meaning. They don't -- I grepped the base schema, every
migration and the whole source tree for "P-1" and "TRP" and got nothing. What
TicketsCAD actually seeds is three rows and only three:
available Available
unavailable Unavailable
in_service In service
So everything beyond those three on your install came from whoever configured
it, or from a legacy v3 import. P-1..P-5 in particular look like a priority
scheme somebody local defined. If nobody there knows what they mean, they can
be renamed or deleted in Settings > Unit Statuses without breaking anything --
they're data, not software.
3. COMMAND BAR SHORTHAND -- this one IS fixed in the software
This is what Eric was pointing at, and it's the only one with an actual list,
so here it is. From assets/js/command-bar.js, used as /s <unit> <code>:
av Available
unav Unavailable
busy Busy
disp, dp Dispatched
en, enr Enroute
resp Responding
os On Scene (also matches "At Scene")
tx Transporting
af At Facility
iq In Quarters
oos Out of Service
Longer spellings work too (enroute, transporting, on-scene, and so on) -- 30
aliases in total. Note these are aliases the command bar understands, not
statuses that exist: /s only works if your un_status table actually has a
status it can match. That's exactly what bit you in #44 with "At Scene", which
is why 'os' now tries both spellings.
AND A FOURTH ONE, which nobody has mentioned and which you are currently
hitting
Separate from the status VALUE is the status GROUP -- the un_status.group
column. TicketsCAD seeds these as av / unav / inserv, and unlike the labels
above these are NOT cosmetic: they're what the Available / In service /
Unavailable filter buttons on the Units page classify by.
Your groups are named "1-Unit Status" and "2-Call", which is a perfectly
reasonable naming scheme, and it's the cause of the filter behaviour in issue
#48 -- "1-Unit Status" normalizes to "unitstatus", which begins "un", so
everything in that group gets read as Unavailable, including Available itself.
So: the codes on your unit icons are almost certainly your own, the command bar
codes are the list above, and the group codes are the ones that actually change
how the software behaves.
Ron