Bug 26967 - Patron autocomplete does not correctly format addresses
Summary: Patron autocomplete does not correctly format addresses
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low minor (vote)
Assignee: Jonathan Druart
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-07 20:13 UTC by Christopher Brannon
Modified: 2023-12-28 20:42 UTC (History)
5 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:
23.05.00,22.11.06


Attachments
Bug 26967: Correctly format patron address in autocomplete (11.59 KB, patch)
2023-02-28 08:53 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 26967: Correctly format patron address in autocomplete (11.64 KB, patch)
2023-02-28 17:59 UTC, Biblibre Sandboxes
Details | Diff | Splinter Review
Bug 26967: Correctly format patron address in autocomplete (11.88 KB, patch)
2023-03-07 10:10 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 26967: Correctly format patron address in autocomplete (11.92 KB, patch)
2023-03-21 23:19 UTC, David Nind
Details | Diff | Splinter Review
Bug 26967: Correctly format patron address in autocomplete (11.98 KB, patch)
2023-04-09 15:40 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 Christopher Brannon 2020-11-07 20:13:50 UTC
If a library is using the streetnumber field, it does not show the streetnumber field in the patronautocomplete feature.
Comment 1 Christopher Brannon 2023-02-27 17:52:24 UTC
This is still an issue in master.
Comment 2 Jonathan Druart 2023-02-28 08:53:30 UTC
Created attachment 147480 [details] [review]
Bug 26967: Correctly format patron address in autocomplete

We should use the JS function to format patron's address in the
autocomplete result

Test plan:
Search for patron using the autocomplete feature, using the different values
of addressformat.
The address should be formatted correctly, like other places in Koha.
You should also notice that the street number is now displayed.
Comment 3 Biblibre Sandboxes 2023-02-28 17:59:08 UTC
Created attachment 147512 [details] [review]
Bug 26967: Correctly format patron address in autocomplete

We should use the JS function to format patron's address in the
autocomplete result

Test plan:
Search for patron using the autocomplete feature, using the different values
of addressformat.
The address should be formatted correctly, like other places in Koha.
You should also notice that the street number is now displayed.

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Comment 4 Christopher Brannon 2023-02-28 17:59:38 UTC
Works like a charm!
Comment 5 Katrin Fischer 2023-03-04 15:22:34 UTC
There are some issues:

To test I edited my user (42) and filled in the fields with the field names and different numbers for zipcode and streetnumber, to be able to identify what field is which.

1)
* Address format US
* Missing space between address 2 and city

2)
* Address format German
* Address 2 is missing completely
* Missing space between streetnumber and zipcode

3)
* Address format French
* completely broken :( Spinning icon is visible and error in the console:
* Uncaught ReferenceError: include_li is not defined

4) The bug description should be rephrased, this adds more than the streetnumber.
Comment 6 Jonathan Druart 2023-03-07 10:10:33 UTC
Created attachment 147818 [details] [review]
Bug 26967: Correctly format patron address in autocomplete

We should use the JS function to format patron's address in the
autocomplete result

Test plan:
Search for patron using the autocomplete feature, using the different values
of addressformat.
The address should be formatted correctly, like other places in Koha.
You should also notice that the street number is now displayed.
Comment 7 David Nind 2023-03-21 23:19:26 UTC
Created attachment 148498 [details] [review]
Bug 26967: Correctly format patron address in autocomplete

We should use the JS function to format patron's address in the
autocomplete result

Test plan:
Search for patron using the autocomplete feature, using the different values
of addressformat.
The address should be formatted correctly, like other places in Koha.
You should also notice that the street number is now displayed.

Signed-off-by: David Nind <david@davidnind.com>
Comment 8 Katrin Fischer 2023-04-09 15:40:39 UTC
Created attachment 149376 [details] [review]
Bug 26967: Correctly format patron address in autocomplete

We should use the JS function to format patron's address in the
autocomplete result

Test plan:
Search for patron using the autocomplete feature, using the different values
of addressformat.
The address should be formatted correctly, like other places in Koha.
You should also notice that the street number is now displayed.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 9 Tomás Cohen Arazi 2023-04-21 13:37:10 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 10 Jacob O'Mara 2023-05-10 12:53:41 UTC
Nice work, thanks everyone!

Pushed to 22.11.x for the next release.
Comment 11 Lucas Gass 2023-05-15 21:10:32 UTC
Doesn't apply cleanly to 22.05.x, no backport.