Bugzilla – Attachment 163089 Details for
Bug 36298
In patrons search road type authorized value code displayed in patron address
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36298: In patrons search fix road type with authorized value
Bug-36298-In-patrons-search-fix-road-type-with-aut.patch (text/plain), 3.92 KB, created by
Fridolin Somers
on 2024-03-12 10:30:25 UTC
(
hide
)
Description:
Bug 36298: In patrons search fix road type with authorized value
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2024-03-12 10:30:25 UTC
Size:
3.92 KB
patch
obsolete
>From 6251e7ad0c288c751b46a9dd598de44dd29eb9fd Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Tue, 12 Mar 2024 11:18:18 +0100 >Subject: [PATCH] Bug 36298: In patrons search fix road type with authorized > value > >In new patrons search via API, the road type code is displayed in patron address instead of authorized value description. > >Also road type is missing a space separator in DE and FR format. > >Test plan : >1) Create two entries in authorized value category "ROADTYPE" : > R1 "Road" > R2 "Street" >2) Edit a patron (ie Delgado, Floyd) to set road type to "Road" >3) Perform a search on patrons (click on letter D) >4) Check you see in address "Road" and not "R1" >5) Edit authorized value category "ROADTYPE" to delete entry "R1" >6) Perform a search on patrons (click on letter D) >7) Check you see in address "R1" >--- > .../prog/en/includes/js-patron-format-address.inc | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/js-patron-format-address.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/js-patron-format-address.inc >index b561431c0a..daa979717e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/js-patron-format-address.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/js-patron-format-address.inc >@@ -7,7 +7,7 @@ > > const roadtypes = [% To.json(AuthorisedValues.Get('ROADTYPE')) | $raw %]; > let roadtypes_map = roadtypes.reduce((map, r) => { >- map[r.street_type] = r; >+ map[r.authorised_value] = r.lib; > return map; > }, {}); > >@@ -17,7 +17,7 @@ > if ( data.address ) { > let roadtype_desc = ''; > if ( data.street_type ) { >- roadtype_desc = roadtypes_map[data.street_type] ? roadtypes_map[data.street_type].street_type : data.street_type; >+ roadtype_desc = roadtypes_map[data.street_type] ? roadtypes_map[data.street_type] : data.street_type; > } > address += include_li ? '<li class="patronaddress1">' : ''; > address += escape_str(data.street_number) + ' ' + escape_str(data.address) + ' ' + escape_str(roadtype_desc); >@@ -59,10 +59,10 @@ > if ( data.address ) { > let roadtype_desc = ''; > if ( data.street_type ) { >- roadtype_desc = roadtypes_map[data.street_type] ? roadtypes_map[data.street_type].street_type : data.street_type; >+ roadtype_desc = roadtypes_map[data.street_type] ? roadtypes_map[data.street_type] : data.street_type; > } > address += include_li ? '<li class="patronaddress1">' : ' '; >- address += escape_str(data.address) + ' ' + escape_str(roadtype_desc) + escape_str(data.street_number); >+ address += escape_str(data.address) + ' ' + escape_str(roadtype_desc) + ' ' + escape_str(data.street_number); > address += include_li ? '</li>' : ''; > } > } >@@ -88,10 +88,10 @@ > if ( data.address ) { > let roadtype_desc = ''; > if ( data.street_type ) { >- roadtype_desc = roadtypes_map[data.street_type] ? roadtypes_map[data.street_type].street_type : data.street_type; >+ roadtype_desc = roadtypes_map[data.street_type] ? roadtypes_map[data.street_type] : data.street_type; > } > address += include_li ? '<li class="patronaddress1">' : ''; >- address += escape_str(data.street_number) + ' ' + escape_str(roadtype_desc) + escape_str(data.address); >+ address += escape_str(data.street_number) + ' ' + escape_str(roadtype_desc) + ' ' + escape_str(data.address); > address += include_li ? '</li>' : ''; > } > } >-- >2.44.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 36298
:
163089
|
163091
|
163184