Repository navigation
Fix ALIndividual.address_block() to include both name and address - #1130
Draft
nonprofittechy wants to merge 2 commits into
Draft
nonprofittechy wants to merge 2 commits into
nonprofittechy wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused fix preserves address delegation and option compatibility, with regression coverage and no unresolved blocking findings.
No open issues 🎉
What changed in this PR
Fixes ALIndividual.address_block() so mailing blocks include both the full name and address in DOCX and non-DOCX output, while preserving the address-only API.
Changes:
- Combines name and address with format-specific line breaks.
- Preserves formatting options and address confidentiality handling.
- Clarifies the docstring and adds regression tests for rendering, confidentiality, and plain
Addresscompatibility.
| File | Description |
|---|---|
docassemble/AssemblyLine/test_al_general.py |
Adds focused mailing-block regression tests. |
docassemble/AssemblyLine/al_general.py |
Fixes name-and-address composition and documents the API distinction. |
Review effort: Balanced
This branch has not been deployed
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.
ALIndividual.address_block()is intended to return a person's name followed by their mailing address. It currently loses one component in each rendering context:self.address.block(...)directly, omitting the name.name if is_individual else other_name + address. For anALIndividual, the true branch returns only the name, omitting the address.Compute the name and address separately, then join them with the appropriate Word line break or Docassemble
[NEWLINE]marker. Continue forwarding language/international/country options and the ALAddress-specificbareandshow_impoundedoptions.person.address.block()remains the address-only API. The docstring now distinguishes the two methods.For Alex Rivera at 123 Main Street, the intended result in both formats is:
Validation
main: 2 passed, 2 subtests passed. They cover both rendering contexts, real name/address objects, address-only behavior, impounded-address hiding/override, and plain DocassembleAddressoption compatibility.git diff --checkpass.The full runtime test file previously had an unrelated
test_address_requiredfailure (state_or_province_label) also reproduced against an unchanged sibling checkout in this environment; this does not claim the entire upstream suite passes. Confidentiality has focused test coverage but not a full browser matrix.Coordination
Draft for runtime review and release coordination. This is the upstream implementation corresponding to the companion patch recorded in Weaver PR #1203; authors should not need to apply that patch manually once a release contains the fix. Weaver's new
users1_name_and_address_blockalias depends on the corrected behavior. Its existingusers1_address_blockalias continues to use the unchanged address-only method.Related: SuffolkLITLab/docassemble-ALWeaver#670. No release version is claimed yet.