Skip to content

Make other-party addresses optional by default - #210

Merged
nonprofittechy merged 2 commits into
mainfrom
188-dont-require-other-address-by-default
Sep 1, 2026
Merged

Make other-party addresses optional by default#210
nonprofittechy merged 2 commits into
mainfrom
188-dont-require-other-address-by-default

Conversation

@nonprofittechy

@nonprofittechy nonprofittechy commented Aug 31, 2026

Copy link
Copy Markdown
Member

Closes #188

Summary

  • allow other parties to be saved with only a role and name when no downstream rule requires an address
  • resolve address requirements from live Tyler party metadata and layered jurisdiction, case, court, filing-type, and service configuration
  • hide optional address fields behind an Add an address checkbox and explain when an address may be needed in an accessible popover
  • preserve and expose saved addresses, reject partial addresses at the party screen, and keep required-address flows visible with a reason
  • omit wholly blank optional address objects from Tyler payloads and translate live Tyler address validation errors into actionable messages
  • document the new party_address YAML configuration

Staging findings

I explored the current Illinois staging code lists and fee-validation endpoint using Cook County Municipal Civil case type 331308:

  • the party-type list marks Plaintiff and Defendant as required parties but does not publish an address-required flag
  • the filing-type list likewise does not expose party-address requiredness
  • sending other_parties[0].address with blank values is rejected as an invalid blank state code
  • omitting the optional address object advances validation to the next unrelated requirement

Validation

  • uv run pytest -q — 581 passed
  • node --test js-tests/*.test.js — 30 passed
  • uv run ruff check .
  • uv run ty check
  • repository pre-commit hooks, including formatting, ESLint, Bandit, and migration checks
  • npm run build in docs/
  • Quinten ran it through end-end after the changes several times with different filing types: a name change and an eviction complaint in Illinois
image image image

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Workflow incomplete-party detection does not currently pass party_types, so it can ignore live Tyler address-required metadata and incorrectly hide required address flows.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR makes other-party mailing addresses optional by default, only requiring them when Tyler metadata or layered jurisdiction/case/court/filing/service configuration indicates they’re needed, and updates UI + payload generation to avoid sending blank address objects to Tyler.

Changes:

  • Adds an address-required resolver (party_address_requirement) and updates “party complete” logic to allow blank optional addresses but block partial ones.
  • Updates the party details UI to hide optional address fields behind an “Add an address” checkbox with an explanatory popover, while still showing/retaining previously saved addresses.
  • Omits wholly blank optional address objects from EFSP payloads and improves EFSP error messages for other-party address validation.
File summaries
File Description
efile_app/js-tests/filing-payload.test.js Adds JS tests asserting blank optional addresses are omitted while saved addresses remain in payloads.
efile_app/efile/workflow.py Switches incomplete-party detection to use party_is_complete (needs follow-up to honor live party metadata).
efile_app/efile/views/party_details.py Makes address optional unless required; blocks partial addresses; passes requirement + UI state to template.
efile_app/efile/views/parties.py Threads party_types through completeness checks to reflect address-required rules.
efile_app/efile/tests/test_people_flow.py Adds Django flow tests for optional/required address UI + validation behavior.
efile_app/efile/tests/test_party_address_requirements.py New unit tests for metadata + layered-config address requiredness.
efile_app/efile/tests/test_extracted_parties.py Updates expectations when extracted parties are now complete without addresses by default.
efile_app/efile/tests/test_efsp_errors.py Adds test for more actionable other-party address validation messages.
efile_app/efile/templates/efile/party_details.html Adds optional-address toggle UI, reason display, and conditional required attributes.
efile_app/efile/static/js/party-details.js Adds client-side toggling of optional address fields and a Bootstrap popover explainer.
efile_app/efile/static/js/filing-payload.js Omits wholly blank optional address objects (including legacy other-party address fields).
efile_app/efile/static/css/reorganized-flow.css Adds styling for the optional-address toggle row and popover.
efile_app/efile/static/config/base-case-types.yaml Sets other-party address fields to optional in default config and adds party_address defaults.
efile_app/efile/services/people.py Updates party completeness logic to incorporate address-required rules and partial-address rejection.
efile_app/efile/services/party_requirements.py New resolver for other-party address requiredness based on metadata + layered YAML + draft selections.
efile_app/efile/services/efsp_errors.py Translates Tyler other-party address field errors into party/field-specific messages.
docs/docs/partners-courts/jurisdiction-config.md Documents the new party_address configuration block and its precedence/behavior.
Review details
  • Files reviewed: 17/17 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread efile_app/efile/workflow.py Outdated
Comment on lines 192 to 196
if hasattr(parties, "filter"):
incomplete = (
Q(party_type="")
| (Q(organization_name="") & (Q(first_name="") | Q(last_name="")))
| Q(address_line_1="")
| Q(city="")
| Q(state="")
| Q(zip_code="")
)
return parties.filter(incomplete).exists()
from efile.services.people import party_is_complete

return any(not party_is_complete(party, draft=draft) for party in parties.all())
try:
@nonprofittechy
nonprofittechy merged commit e5d9dcd into main Sep 1, 2026
6 checks passed
@nonprofittechy
nonprofittechy deleted the 188-dont-require-other-address-by-default branch September 1, 2026 20:20
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.

Do not require other-party addresses unless filing rules require them

2 participants