Deadlines/new: rule + Typ can be saved with contradicting legal events #18
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Symptom
Surfaced via dogfood on
mai/feynman/fristenrechner2026-05-08 18:26 (m → maria → feynman). Saved deadline0f452834-a045-453a-a588-2a419fe017e3on projectC-UPC-0002, due 2026-05-11:rev.rejoin— Duplikupc_statement_of_defence— KlageerwiderungTwo different legal events on the same row.
Root cause
source: "manual"— the row was created via/projects/{id}/deadlines/new. That form lets the user pickrule_idandevent_type_idindependently with no consistency check on save. There is no junction or shared key to validate against —paliad.deadline_rules.concept_idreferencespaliad.deadline_concepts.slug("rejoinder", "klageerwiderung", …) whilepaliad.event_types.sluguses a different namespace ("upc_statement_of_defence", "upc_rejoinder", …) with no mapping table between them.The Fristenrechner save path (
/api/projects/{id}/deadlines/bulk) does NOT sendevent_type_id— only manual creation hits this contradiction.Why this isn't a quick fix
Aligning Typ to Rule on save would need either:
paliad.concept_event_typesmapping each concept to its canonical event_type(s), populated via migration. Real data work — not trivial because some concepts have multiple natural event-types (e.g. "appeal" maps to UPC + DE + EPA appeal event-types).Option 2 is the right shape per m's 2026-05-08 18:14 batch ("the Rules in the selection of the Event ... can only be an alternative to either chose by rule OR chose by event"). It's cheaper to do once at the Determinator-redesign moment than to retro-fit the existing manual form.
Acceptance
Within Item A's scope (rule-vs-event collapse on the Determinator):
/projects/{id}/deadlines/new— Rule OR Typ, never both.Context
t-paliad-157 / m/paliad#15 dogfood thread. Folds into the Determinator redesign once Slice 3 (incoming-event picker) lands.