Bug 31525: display streetnumber with address in patron search
authorWainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
Sun, 11 Sep 2022 22:18:45 +0000 (22:18 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Fri, 23 Sep 2022 12:16:29 +0000 (09:16 -0300)
Adds back street number to the address when searching for patrons

To test:
1) Edit a patron's contact information
2) Under Main Address put an address, make sure to put something in the
Street number field
3) Do a simple patron search that will yield results (i.e. "a")
4) Confirm the street number does not show, but the rest of the address
does
5) Apply this patch
6) Do another patron search
5) Confirm the street number now shows

Sponsored-by: Catalyst IT
Testing note:  AddressFormat system preference must be set to "US style"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
koha-tmpl/intranet-tmpl/prog/en/includes/js-patron-format-address.inc

index 407bc42..1b6425b 100644 (file)
@@ -19,7 +19,7 @@
                     if ( data.street_type ) {
                         roadtype_desc = roadtypes_map[data.street_type] ? roadtypes_map[data.street_type].street_type : data.street_type;
                     }
-                    address += '<li class="patronaddress1">' + escape_str(data.streetnumber) + ' ' + escape_str(data.address) + ' ' + escape_str(roadtype_desc) + '</li>';
+                    address += '<li class="patronaddress1">' + escape_str(data.street_number) + ' ' + escape_str(data.address) + ' ' + escape_str(roadtype_desc) + '</li>';
                 }
             }
             if ( data.address2 ) {