Repository navigation
Add a third street line to addresses - #1039
Closed
miguelalvarezd wants to merge 2 commits into
Closed
miguelalvarezd wants to merge 2 commits into
miguelalvarezd wants to merge 2 commits into
Conversation
EN 16931 addresses have three lines (BT-162, BT-163, BT-164, BT-165), but org.Address only had street and street_extra, so the third was lost in conversion. street_third holds it, with Address.LineThree() to read it as LineOne() and LineTwo() do. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1039 +/- ##
=======================================
Coverage 96.93% 96.93%
=======================================
Files 336 336
Lines 15422 15424 +2
=======================================
+ Hits 14949 14951 +2
Misses 472 472
Partials 1 1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This was referenced Nov 16, 2026
miguelalvarezd
marked this pull request as ready for review
November 16, 2026 17:24
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain, and the supplied changes cover the third address line across the model, normalization, schema, tests, and changelog.
No open issues 🎉
What changed in this PR
Adds support for a third street-address line in org.Address, preserving address data required by EN 16931 and enabling downstream format conversions.
Changes:
- Adds the
street_thirdfield andLineThree()accessor. - Normalizes the new field alongside existing address components.
- Updates the generated schema, tests, and unreleased changelog entry.
| File | Description |
|---|---|
| org/address.go | Defines, exposes, and normalizes the third street line. |
| org/address_test.go | Tests normalization and LineThree() behavior. |
| data/schemas/org/address.json | Exposes street_third in the address schema. |
| changes/unreleased/address-street-third.md | Documents the new address capability. |
Review effort: Lite
12 of 13 tasks
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.
org:street_thirdon addresses, for the third address line of EN 16931 (BT-162 seller, BT-163 buyer, BT-164 tax representative, BT-165 delivery), withAddress.LineThree()to read it, asLineOne()andLineTwo()do.org.Addressonly hadstreetandstreet_extra, so the third line was lost in conversion.UBL writes it as
cac:AddressLine/cbc:Line. invopop/gobl.ubl#192 writes and reads it there, for every party and the delivery location, and invopop/gobl.ubl#189 for a bank account's branch. PINT AE uses the same terms. invopop/gobl#1040 and, on top of it, invopop/gobl#1033 are stacked on this PR, so that gobl.peppol#8 can pin one commit with all three; neither usesstreet_third.No GOBL example added: no example uses
street_extraeither, and the field is exercised in gobl.ubl#192's conversion tests.Pre-Review Checklist
go generate .to ensure that the Schemas and Regime data are up to date.changes/unreleasedwith an overview of my changes, as described inchanges/README.md.And if you are part of the org:
@samlown.🤖 Generated with Claude Code