Make other-party addresses optional by default - #210
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 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 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: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #188
Summary
party_addressYAML configurationStaging findings
I explored the current Illinois staging code lists and fee-validation endpoint using Cook County Municipal Civil case type
331308:other_parties[0].addresswith blank values is rejected as an invalid blank state codeValidation
uv run pytest -q— 581 passednode --test js-tests/*.test.js— 30 passeduv run ruff check .uv run ty checknpm run buildindocs/