Problem
Voiding a daily entry (#69) leaves the row occupying the natural key (account, farm, house, flock, date). RecordDailyEntryHandler finds it by natural key with no status filter and tries RecordProduction on it, which the Draft-only guard rejects with 422 DailyEntry.Immutable — "Only draft entries can be edited."
Net effect: once an entry is voided, that house/flock/day can never be recorded again, and the error message doesn't explain why. But void means "this entry should never have existed" — the day's real production still needs a way in. Adjust covers wrong numbers; nothing covers voided-then-re-enter.
Fix
Treat Voided as vacating the natural key:
FindByNaturalKeyAsync excludes Voided entries.
- Replace
IX_DailyEntries_NaturalKey with a partial unique index (WHERE "Status" <> 'Voided'): one live entry per key, any number of voided ones preserved in history.
- Regression tests: void → record same day succeeds as a fresh entry; History lists both rows; parallel record-vs-record on a vacated key stays deterministic.
- GLOSSARY + Help: note that voiding frees the day for a fresh entry.
Part of #14 (F17 follow-up).
Problem
Voiding a daily entry (#69) leaves the row occupying the natural key
(account, farm, house, flock, date).RecordDailyEntryHandlerfinds it by natural key with no status filter and triesRecordProductionon it, which the Draft-only guard rejects with 422DailyEntry.Immutable— "Only draft entries can be edited."Net effect: once an entry is voided, that house/flock/day can never be recorded again, and the error message doesn't explain why. But void means "this entry should never have existed" — the day's real production still needs a way in. Adjust covers wrong numbers; nothing covers voided-then-re-enter.
Fix
Treat Voided as vacating the natural key:
FindByNaturalKeyAsyncexcludes Voided entries.IX_DailyEntries_NaturalKeywith a partial unique index (WHERE "Status" <> 'Voided'): one live entry per key, any number of voided ones preserved in history.Part of #14 (F17 follow-up).