You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(atemschutz): "CSA-Trupp" is a magic string — renaming the Trupp type silently drops the three-person crew rule #398
From a portability review of main (ecb341b) asking which implemented logic is Bavarian, which is German, and which is universal. This one is not a portability problem at all — it is a live defect in Bavaria.
The gap
Two Trupp designations carry behaviour, and they carry it by string comparison on their German name:
RequiredMemberCount decides whether ValidateCrew demands two people or three. IsLpaTrupp picks the 60-minute duration default instead of 30.
Meanwhile the designation comes from md_trupp_types, a free-text list the user edits in the Stammdaten editor. The shipped example is ["Angriffstrupp", "Wassertrupp", "Schlauchtrupp", "CSA-Trupp", "LPA-Trupp"], but nothing pins those spellings.
Why it bites
A brigade that writes CSA Trupp, CSA-Trupp (Chemikalienschutzanzug), Chemietrupp or CSA gets a two-person CSA-Trupp accepted without complaint, and a 30-minute Einsatzzeit instead of 20. There is no warning, no fallback, nothing in the ETB. The rule simply is not there any more, and the crew under the suits is the one who finds out.
OrdinalIgnoreCase plus Trim() covers casing and whitespace and nothing else.
Proposal
Move the behaviour onto the master-data entry instead of parsing its name. md_trupp_types becomes a row rather than a bare string:
TruppType(string Name, int RequiredMembers, int? DefaultDurationMinutes)
AtemschutzTrupp.Register then takes the required crew size and duration as arguments it already half-takes, and IsChemicalTrupp/IsLpaTrupp/RequiredMemberCount disappear along with the two constants.
Touches MasterDataSet.cs, MasterDataStore.cs (md_trupp_types gains columns — note #397 on the reconciliation there), AtemschutzTrupp.cs:40,47,165-198, and the Stammdaten editor. Existing stores migrate by mapping the two known names to (3, 20) and (2, 60) and everything else to (2, null).
Note
The persisted scba_trupps_v17.designation stays free text — this is about where the rule lives, not about constraining what a Trupp may be called.
Activity
feat(stammdaten): ship a Strahlenschutztrupp, and clamp the Einsatzze…
feat(atemschutz): model the Sicherheitstrupp instead of hoping for it
feat(atemschutz): model the Sicherheitstrupp instead of hoping for it (…
fix(validation): finish the rollout across Atemschutz, Join, CO and P…
fix(validation): leere Pflichtfelder melden sich, statt den Knopf gra…