Bug 27830 - OPAC library list does not use AddressFormat
Summary: OPAC library list does not use AddressFormat
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-02 10:55 UTC by Magnus Enger
Modified: 2021-12-13 21:11 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.05.00,20.11.06
Circulation function:


Attachments
Bug 27830: OPAC library list does not use AddressFormat (9.36 KB, patch)
2021-03-04 14:41 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 27830: OPAC library list does not use AddressFormat (9.39 KB, patch)
2021-04-11 00:41 UTC, David Nind
Details | Diff | Splinter Review
Bug 27830: (follow-up) Merge DE and FR address formats (5.62 KB, patch)
2021-04-14 11:38 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 27830: OPAC library list does not use AddressFormat (9.45 KB, patch)
2021-04-17 23:36 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 27830: (follow-up) Merge DE and FR address formats (5.68 KB, patch)
2021-04-17 23:36 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Magnus Enger 2021-03-02 10:55:12 UTC
Bug 13388 introduced the page of library info at /cgi-bin/koha/opac-library.pl. As far as I can tell, the address display on this page does not respect the AddressFormat syspref. Specifically, it displays the ZIP code after the city/state, but both the fr and de setting would display it the other way round.
Comment 1 Owen Leonard 2021-03-04 14:41:53 UTC
Created attachment 117731 [details] [review]
Bug 27830: OPAC library list does not use AddressFormat

This patch adds a new include file for displaying library addresses
according to the AddressFormat system preference. It differs from the
include file used for patrons in the staff interface because library
addresses don't use streetnumber or road types.

To test, apply the patch and rebuild the OPAC CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

- Make sure you have fill address information entered for at least one
  library.
- In the OPAC, view the "Libraries" page.
- Check that the format of the library addresses is correct when using
  any of the three address formats: de, fr, and us.
Comment 2 David Nind 2021-04-11 00:41:35 UTC
Created attachment 119438 [details] [review]
Bug 27830: OPAC library list does not use AddressFormat

This patch adds a new include file for displaying library addresses
according to the AddressFormat system preference. It differs from the
include file used for patrons in the staff interface because library
addresses don't use streetnumber or road types.

To test, apply the patch and rebuild the OPAC CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

- Make sure you have fill address information entered for at least one
  library.
- In the OPAC, view the "Libraries" page.
- Check that the format of the library addresses is correct when using
  any of the three address formats: de, fr, and us.

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Jonathan Druart 2021-04-14 08:42:38 UTC
1. For US there is an extra space after the city name and before the comma:
Jefferson Summit
line 2
line 3
city , state 1235
country

2. DE and FR seems very similar, however when comparing there are inconsistencies: "property" values are not the same and differ, please double-check (postalCode, addressRegion, etc.)

3. If DE and FR are identical at the end we should have not the code duplicate (keep display-library-address-fr and display-library-address-de but call a generic new one from them))
Comment 4 Owen Leonard 2021-04-14 11:38:46 UTC
Created attachment 119559 [details] [review]
Bug 27830: (follow-up) Merge DE and FR address formats

Library addresses don't include the use of "Street Type" and "Street
Number." DE and FR address formats differ only in the position of street
type and number in the address sequence.

This patch merges DE and FR address markup and uses the unified block if
the address format system preference ISN'T "us".
Comment 5 Katrin Fischer 2021-04-17 23:36:43 UTC
Created attachment 119807 [details] [review]
Bug 27830: OPAC library list does not use AddressFormat

This patch adds a new include file for displaying library addresses
according to the AddressFormat system preference. It differs from the
include file used for patrons in the staff interface because library
addresses don't use streetnumber or road types.

To test, apply the patch and rebuild the OPAC CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

- Make sure you have fill address information entered for at least one
  library.
- In the OPAC, view the "Libraries" page.
- Check that the format of the library addresses is correct when using
  any of the three address formats: de, fr, and us.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Katrin Fischer 2021-04-17 23:36:47 UTC
Created attachment 119808 [details] [review]
Bug 27830: (follow-up) Merge DE and FR address formats

Library addresses don't include the use of "Street Type" and "Street
Number." DE and FR address formats differ only in the position of street
type and number in the address sequence.

This patch merges DE and FR address markup and uses the unified block if
the address format system preference ISN'T "us".

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 7 Jonathan Druart 2021-04-21 08:46:58 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 8 Fridolin Somers 2021-04-29 13:03:31 UTC
Pushed to 20.11.x for 20.11.06
Comment 9 Andrew Fuerste-Henry 2021-05-24 16:20:55 UTC
Doesn't apply cleanly to 20.05, please rebase if needed.