Repository navigation
fix(forces,roles): show a status the Stammdaten lost, normalise Funktionen - #355
Merged
Merged
Conversation
…ionen The #302 item asked to validate ForceUnit.Status and RoleAssignment.Role against the Stammdaten. Reading the views showed the Kräfte half cannot happen as described: both Status inputs are ComboBoxes bound to StatusOptions, so they are already a closed set and can never produce an off-catalogue value. Probing it surfaced the real defect instead. A status recorded in the incident but missing from today's Stammdaten -- an older Einsatz, an imported file, a joined client on different master data -- leaves the cell with nothing to select, so it renders blank and the recorded status is invisible. The value is not written back as null, so this is a display failure, not data loss. That row's options now carry the unit's own status so it shows and stays selectable. Funktion is genuinely free text (an AutoCompleteBox: ad-hoc and überörtliche roles must stay enterable), so it gets the planned treatment: a Funktion matching the Stammdaten apart from case or spacing is recorded with the Stammdaten spelling, and an unknown one is assigned as typed with a non-blocking hint. Nothing is ever rejected -- an Einsatz in progress must not be blocked by a missing Stammdaten row. Whether an incident should carry its own Stammdaten snapshot instead, which would remove this class of drift at the root, is issue #337. Part of #302. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YavFrkz1GFaMNXbHQKsMyf Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
DeepDiver1975
force-pushed
the
feat/status-role-catalogue-hint
branch
from
September 15, 2026 23:06
b3b35e9 to
cd69784
Compare
DeepDiver1975
commented
Sep 16, 2026
DeepDiver1975
left a comment
Contributor
Author
There was a problem hiding this comment.
@dcoapp recheck
This was referenced Sep 16, 2026
DeepDiver1975
added a commit
that referenced
this pull request
Sep 20, 2026
The changelog rule was never actually written down. AGENTS.md and CONTRIBUTING.md said "add a changelog entry as its own file", which does not say how many, and #431 arrived with seven fragments — one per commit, describing a single feature layer by layer, plus an unrelated build fix. State the rule in both places and in the PR template: exactly one entry per pull request, describing what the change does for the reader rather than the layers it was built in. A PR carrying an unrelated fix folds it into the same entry; if the two cannot share an entry they are two pull requests. Then make the existing fragments follow it. Seven merged pull requests had contributed more than one entry, 22 files between them, now 7 — #313, #310, #355, #390, #395, #411 and #431. The prose is rewritten rather than concatenated, but nothing a reader would act on is dropped: schema versions, migrated JSON keys, file-format compatibility, what changes on first open and what stays untouched all survive, as do the ticket references. The remaining 27 fragments were already one-per-PR and are untouched. `towncrier build --draft` renders 34 entries across Added, Changed, Fixed and Security. Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The #302 item asked to validate
ForceUnit.StatusandRoleAssignment.Roleagainst theStammdaten. Reading the views showed the Kräfte half cannot happen as described: both Status
inputs are
ComboBoxes bound toStatusOptions(ForcesView.axaml:112and:215), so they arealready a closed set and can never produce an off-catalogue value.
Probing it surfaced the real defect instead. With Stammdaten
[Alarmiert, Auf Anfahrt, Bereitstellungsraum, Im Einsatz]and a unit whose status is"Einsatzbereit am Standort"— from an older Einsatz, an imported file, or a joined client ondifferent master data — the harness reported:
The cell has nothing to select, so it renders blank and the recorded status is invisible in the
grid. It is not written back as null, so this is a display failure rather than data loss — but
the status silently disappears from the Kräfteübersicht.
Funktionis genuinely free text (anAutoCompleteBox— ad-hoc and überörtliche roles must stayenterable), so it gets the treatment the item described: normalise to the Stammdaten spelling on a
case/whitespace match, and hint without blocking when it is unknown.
Nothing is ever rejected. An Einsatz in progress must not be blocked by a missing Stammdaten row.
Screenshots
Kräfte — "FF Aich" holds the status
Einsatzbereit am Standort, which the Stammdaten no longer list:Funktionen — an unknown Funktion is still assignable, now with a hint:
Changes
StammdatenCataloguehelper (Normalize,IsUnknown,Including) with the layeringrationale and a pointer to Should an incident carry the Stammdaten it was created under? #337
ForceRowcarries the unit's own status in itsStatusOptionswhen the catalogue lost it.Includingcompares ordinally and exactly, unlikeNormalize— a picker matches itsselection by equality, so a value differing only in case would render blank just the same
RolesViewModel.AddRoleadopts the Stammdaten spelling; newIsNewRoleUnknowndrives an amberhint in the dock, same idiom as
ForcesView'sDuplicateHintRolesViewModel, 2 forForcesViewModel, and 3 acceptance testsasserting what the Status cell actually displays — that is the level the bug lives at. The two
bug-specific acceptance tests were confirmed to fail against
mainand pass with the fix; thethird (a configured status renders unchanged) passes both ways as a control
Follow-up
This removes the symptom. The cause is that master data is global (
masterdata.db) while thevalues describing it live in the incident file, so an incident opened later is rendered through
today's catalogues. Whether an incident should carry its own Stammdaten snapshot is #337, filed
with the evidence — including that checklist templates already are snapshotted into the incident
(
checklist_items), and that a joined client already takes the host's set over the wire.This fix stays useful either way: a joined client on mismatched Stammdaten and a file imported from
another Feuerwehr both hit the same path.
Checklist
git commit -s)dotnet buildanddotnet testpass locally (make ci, all eight projects)Part of #302.
🤖 Generated with Claude Code
https://claude.ai/code/session_01YavFrkz1GFaMNXbHQKsMyf