Currently Volunteer has the following fields to represent the address:
city - a City model (options prefilled by cities.json with obsolete corrdinates)
address - a string representing the street, house number, apt. number but in arbitrary user-picked order (that we later use APIs with NLP to turn into coordinates)
location_address_x, location_address_y - the lat/long retrieved from the API from the city + address
These also exist in HelpRequest (and if they don't they should to work in the current format).
Instead this should be one model called Address that contains:
city
street (optional)
house no. (optional)
apt. no. (optional)
longtitude
latitude
And HelpRequest & Volunteer should contain one address field with a foreignkey to the Address model.
The current data in the production DB should be migrated to use this new API
Prerequisites
[Make sure you've done the following before posting your issue:]
[ ] I have filled in the correct labels (fill at least one of bug/enhancement)
[ ] I have searched for duplicate issues and found none
[ ] My issue is phrased as a task - it's clear what needs to be done here.
Related component: HelpRequest, Volunteer
Description
Currently Volunteer has the following fields to represent the address:
city
- aCity
model (options prefilled by cities.json with obsolete corrdinates)address
- a string representing the street, house number, apt. number but in arbitrary user-picked order (that we later use APIs with NLP to turn into coordinates)location_address_x
,location_address_y
- the lat/long retrieved from the API from the city + addressThese also exist in HelpRequest (and if they don't they should to work in the current format).
Instead this should be one model called
Address
that contains:And HelpRequest & Volunteer should contain one
address
field with a foreignkey to theAddress
model.The current data in the production DB should be migrated to use this new API
Prerequisites
[Make sure you've done the following before posting your issue:]