NOTE: This changes from this ticket should be deployed at least one day before the street suggestion feature changes.
infos:
- old style:
- database stored street name and building number in a column named strasse (e.g "Hundestraße 12" )
- frontend asked users for "Straße und Hausnummer" in 1 textfield ("enter street + number")
- new style:
- for now, the frontend is still sending "street/strasse" (concatenated info), but will also send the split fields in the near future
- databse should have 2 new columns to store the split fields (street , number)
- for now, the frontend is still sending "street/strasse" (concatenated info), but will also send the split fields in the near future
This ticket is about slowly converting to the "new style", beginning with the bounded contexts (database and converter changes).
Acceptance Criteria
- The donation bounded context is changed to support building numbers when exporting address data and when using the stored address in other contexts.
- Old address data still is supported.
- Data scrubbing includes the newly added fields.
Implementation notes
- A building number property needs to be added to WMDE\Fundraising\DonationContext\Domain\Model\Address\PostalAddress.
- Two new getters are added for the street name and building number fields.
- The WMDE\Fundraising\DonationContext\DataAccess\LegacyConverter\DomainToLegacyConverter needs to be changed to add both the old strasse (for export) and the two new ones for restoring an address from the data blob.
- The WMDE\Fundraising\DonationContext\DataAccess\LegacyConverter\LegacyToDomainConverter needs to check if the two new fields are set and creates a legacy street name if not.
- We might want to have two static methods for construction.
- The current street property should be marked as deprecated.
- The new fields are called streetName and houseNumber.
- The classes WMDE\Fundraising\DonationContext\UseCases\AddDonation\AddDonationRequest and WMDE\Fundraising\DonationContext\UseCases\UpdateDonor\UpdateDonorRequest need to be changed as well as the use cases, which needs to decide which fields to use.