Skip to content

Preserve existing-case parties through fees and submission - #299

Merged
nonprofittechy merged 2 commits into
mainfrom
fix/291-existing-case-party-identity
Oct 9, 2026
Merged

nonprofittechy merged 2 commits into
mainfrom
fix/291-existing-case-party-identity

Conversation

@nonprofittechy

Copy link
Copy Markdown
Member

Existing-case filers were asked to recreate parties, and outgoing filings could turn those parties into new participants without their court IDs. This change imports the authenticated court roster at case confirmation and preserves each court party's identity through selection, fee calculation, and submission.

Changes

  • Store a normalized case snapshot and source-aware party records, preserving person/organization names, roles, available contacts, and attorney associations. Keep the EFM search UUID separate from the court's local case ID, and verify historical roles against the full court role catalog.
  • Make imported party details read-only and enforce the restrictions server-side. Link the filer account to a durable party without replacing it; require an explicit action to add a new party.
  • Reconcile both fee and submission payloads against the saved roster, including tyler_id, is_new, selected filing parties, and document references. Block incomplete imports and reject missing, duplicate, or substituted identities.
  • Handle retries, resume, idempotent imports, stale responses, and case changes; protect court data from document suggestions and legacy draft writes. Add sanitized fixtures and browser coverage.
  • Reuse recent confirmation previews and retrieve case details and role codes concurrently. Preserve co-filer selections during account linking and new-case party choices during classification changes; handle country codes and unreadable lineage entries safely.

Illinois staging verification

All seven issue examples completed fee calculation and submission against the Illinois test environment on October 8, 2026. Each submission returned an envelope ID and one filing ID, with the returned case ID matching the original search UUID. Validation used the browser payload builder and shared server preparation against persisted imported drafts.

Court Case Accepted staging envelope
Marion 2025SC5 324947
Kane 2024EV001752 324948
Kane 2005SC000985 324949
Winnebago 2019-D-0000655 324950
Winnebago 2019-SC-0001642 324951
Lake 2024SC00003388 324952
Lake 2024DC00000572 324953

This verifies staging envelope acceptance; clerk disposition was not checked. No production filings were made. The proxy exposes no supported representation-change fields, so returned associations are preserved without inventing changes.

Validation and deployment

  • Full Python suite during pre-push checks: 1,749 passed, two skipped. The original repeatable backend suite also passed with 1,675 tests and three integration tests deselected, as recorded in the validation note.
  • Affected regression suite: 167 passed, including the Django-view browser flow through lookup, confirmation, keyboard selection, account linking, and review.
  • JavaScript unit tests passed; original implementation: 88 passed. Final sanitized fixture checks: nine passed.
  • Ruff, Ty, changed-file ESLint, template checks, migration consistency, and all commit hooks passed.

Apply migration 0038_existing_case_identity before deploying. The validation note records the field matrix, workflow rules, commands, and detailed staging results. Raw court responses and credentials are not committed; fixture names, contacts, party/attorney IDs, and bar numbers are synthetic.

Closes #291.

nonprofittechy and others added 2 commits October 8, 2026 23:19
Review fixes:
- Only clear an import on drafts that have one, so new-case filing choices
  survive court and classification changes.
- Unwrap case lineage entries and turn unexpected court record shapes into
  a retryable import error instead of a 500.
- Normalize party countries to ISO codes rather than failing the import.
- Skip attorney references to parties without a court ID.
- Keep co-parties already chosen when the filer links themselves.
- Send an added organization's name first in the browser payload, matching
  the server and person_type.
- Reuse a recent unconfirmed preview on case confirmation instead of asking
  the court again on every reload; Retry still refetches.
- Render the blocked confirmation with the court roster.
- Keep the import gate in the middleware only.

Cleanups:
- FilingParty.CASE_ROSTER_SOURCES and on_case_roster replace string checks.
- One lock-and-check helper for the case import, shared fee-quote and
  snapshot field lists, and a dict lookup in reconcile_case_parties.
- Fetch the case and its role list concurrently.
- linked_case_party and missing_required_party_types replace duplicated
  queries and role-coverage logic.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nonprofittechy
nonprofittechy merged commit 5a8d4a9 into main Oct 9, 2026
8 checks passed
@nonprofittechy
nonprofittechy deleted the fix/291-existing-case-party-identity branch October 9, 2026 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ensure we copy as much data as possible from existing case filings

1 participant