Auto-derived project codes from the tree (e.g. EXMPL.OPNT.567.INF.CFI), custom override wins #50
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?
Trigger
m 2026-05-20 13:47:
Shape
Dot-separated segments, one per ancestor in the tree, each derived from that ancestor's most-relevant identifying field:
referenceif set, otherwise a slug oftitle)EXMPLOPNTpatent_number(or full number when shorter)567INF.CFIfor UPC-CFI infringementAssembled top-down from the deepest current project:
<client>.<litigation>.<patent>.<proceeding>.<court>. Missing ancestors are skipped silently —EXMPL.567.INF.CFIis valid for a case under a Patent directly under a Client.Custom override
If
paliad.projects.referenceis set on the project itself, that wins — auto-derivation only fills in the gap. The displayed code in headers / breadcrumbs / pickers reflects either the custom value or the auto-derived one with no extra UI indicator.Implementation considerations
BuildProjectCode(project_id)) — no schema change, no migration. Each call walks the ancestor chain via the existingpaliad.projects.pathltree.paliad.projects_derived_codes(project_id, derived_code)if perf becomes a concern. Skip in v1; profile later.-then trim. EP-number extraction has its own rule (regex on the canonical EP format).paliad.projects.referencekeeps storing the manual override. Single source of truth: ancestor metadata./projects/{id}{{project.code}}should be derivable)__metasheetOpen design questions for the head's batch
opponentfield today, or does the segment derive from a regex ontitle(e.g. "vs OPNT" →OPNT)? Probably needs a small schema addition:paliad.projects.opponent_code texton litigation projects.proceeding_type_idreference into the proceeding-type table; map e.g.upc.inf.cfi.*→INF.CFI. Verify the mapping table needs.paliad.projects.reference, or a new dedicatedproject_code_overridefield?-Ndisambiguator or treat as advisory?Out of scope
reference.Role recommendation
inventor → coder — small but with 5+ design calls + a tiny schema addition (opponent_code on litigations). Reasonable batch with other tree / project-form feedback items.
Implemented in PR #67 (#67) — paired with #47.
Design decisions (all picks confirmed by head):
paliad.projects.opponent_code texton litigations (slug[A-Z0-9-]{1,16}); regex on title rejected as brittleproceeding_types.codejurisdiction prefix dropped →INF.CFI,REV.CFI,APL.MERITS,INF.LG,INF.OLG, …paliad.projects.reference) wins outright (wholesale, not per-segment)BuildProjectCodepopulatescodeon every projected Project JSON (one bulk CTE round-trip per list page; no v1 cache)-Ndisambiguator; users set customreferenceif it matters)Reference tree from the issue body (
Example Client → Siemens v Huawei → EP3456789 → upc.inf.cfi) derives toEXAMPLE.OPNT.789.INF.CFIonce opponent_code is filled.Final SHA:
d326acb. Migration: mig 113 (rebumped from 111→112→113 to dodge euler/gauss slot collisions).Wired into project header, picker, submission-template variable bag (
{{project.code}}), Excel__metarow is a follow-up once the surface change pattern lands. Deploy via auto-webhook on merge.Shipped via kepler on
mai/kepler/inventorcoder-project— merged into main; commit https://mgit.msbls.de/m/paliad/commit/1c021ed. Live after next Dokploy deploy.