Bug 26967

Summary: Patron autocomplete does not correctly format addresses
Product: Koha Reporter: Christopher Brannon <cbrannon>
Component: CirculationAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Katrin Fischer <katrin.fischer>
Severity: minor    
Priority: P5 - low CC: gmcharlt, jacob.omara, jonathan.druart, kyle.m.hall, lucas
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26965
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
Bug 26967: Correctly format patron address in autocomplete
Bug 26967: Correctly format patron address in autocomplete
Bug 26967: Correctly format patron address in autocomplete
Bug 26967: Correctly format patron address in autocomplete

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.