On the patron details page at /cgi-bin/koha/members/moremember.pl?borrowernumber=xxxx, if a patron account is missing a value in the City field the rest of the address fields (zipcode, state, country) when filled do not display.
Created attachment 82136 [details] [review] Bug 21794: Show address information on patron details tab if incomplete To test: - Enter contact and alternate address without city - Verify that the address information isn't shown on the details tab after saving - Apply patch - Verify that the information is displayed now - Toggly AddressFormat and check display is correct for all settings
I have ", State ZIP/Postal" when State and ZIP/Postal code are filled. I think there should be no comma at the very beginning.
It will need a lot of testing for filled variables :) I will have another look!
Created attachment 124055 [details] [review] Bug 21794: Fix display of addresses on details tab in staff when city is empty If the city field was not filled out on the main or alternate address, the content of state, country and zipcode wouldn't display on the Details tab in the patron account in staff. To test: - Enter main contact and alternate address without city - Verify that the address information isn't shown on the details tab after saving - Apply patch - Verify that the information is displayed now - Toggle AddressFormat and check display is correct for all settings - Switch back to US address format - Try several combinations of empty fields for city, zipcode, country and state. The punctuation and whitespace should always appear correctly. Examples: - Enter just country - Enter zipcode and country - ...
I had to rewrite the patch completely as we have moved things around quite a bit (for the better) since the first attempt here was made. But I think this should fix the problem with city and also the punctuation issue noted in comment#2
Created attachment 124442 [details] [review] Bug 21794: Fix display of addresses on details tab in staff when city is empty If the city field was not filled out on the main or alternate address, the content of state, country and zipcode wouldn't display on the Details tab in the patron account in staff. To test: - Enter main contact and alternate address without city - Verify that the address information isn't shown on the details tab after saving - Apply patch - Verify that the information is displayed now - Toggle AddressFormat and check display is correct for all settings - Switch back to US address format - Try several combinations of empty fields for city, zipcode, country and state. The punctuation and whitespace should always appear correctly. Examples: - Enter just country - Enter zipcode and country - ... Signed-off-by: Hayley Pelham <hayleypelham@catalyst.net.nz>
Created attachment 124511 [details] [review] Bug 21794: Fix display of addresses on details tab in staff when city is empty If the city field was not filled out on the main or alternate address, the content of state, country and zipcode wouldn't display on the Details tab in the patron account in staff. To test: - Enter main contact and alternate address without city - Verify that the address information isn't shown on the details tab after saving - Apply patch - Verify that the information is displayed now - Toggle AddressFormat and check display is correct for all settings - Switch back to US address format - Try several combinations of empty fields for city, zipcode, country and state. The punctuation and whitespace should always appear correctly. Examples: - Enter just country - Enter zipcode and country - ... Signed-off-by: Hayley Pelham <hayleypelham@catalyst.net.nz> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Created attachment 124512 [details] [review] Bug 21794: (QA follow-up) Separate city and country with a comma If only the city and country address information was provided they ended up being glued together like this: CityCountry. (AddressFormat=US style) Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Thank you Hayley and Joonas :)
Pushed to master for 21.11, thanks to everybody involved!
Pushed to 21.05.x for 21.05.04
Pushed to 20.11.x for 20.11.10
Not backported to oldoldstable (20.05.x). Feel free to ask if it's needed.