Bug 35629

Summary: Redundant code in includes/patron-search.inc
Product: Koha Reporter: Pedro Amorim <pedro.amorim>
Component: Architecture, internals, and plumbingAssignee: Pedro Amorim <pedro.amorim>
Status: Pushed to oldstable --- QA Contact: Martin Renvoize (ashimema) <martin.renvoize>
Severity: minor    
Priority: P5 - low CC: fridolin.somers, jonathan.druart, lucas, nick, tomascohen
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
24.05.00,23.11.02,23.05.08
Circulation function:
Bug Depends on: 30063    
Bug Blocks: 34575    
Attachments: Bug 35629: Remove redundant code
Bug 35629: Remove redundant code
Bug 35629: Remove redundant code

Description Pedro Amorim 2023-12-21 14:32:11 UTC
Do a find for [% CASE 'name-address' %] you'll notice there are 2 identical entries with the difference being me.othernames in "data".
Comment 1 Pedro Amorim 2023-12-21 14:38:02 UTC
The patch that seems to have added this is:
https://github.com/Koha-Community/Koha/commit/a853b06
Comment 2 Pedro Amorim 2023-12-21 16:12:06 UTC
(In reply to Pedro Amorim from comment #0)
> Do a find for [% CASE 'name-address' %] you'll notice there are 2 identical
> entries with the difference being me.othernames in "data".

Meant middle_name here, not othernames.
Comment 3 Pedro Amorim 2023-12-21 16:12:28 UTC
Created attachment 160209 [details] [review]
Bug 35629: Remove redundant code
Comment 4 Pedro Amorim 2023-12-21 16:15:00 UTC
No functional behavior here as I believe it was already defaulting to the 'correct' first [% CASE 'name-address' %] but to test would be make sure patron search is working as before, all considered names are shown before and after applying patch, including middle_name.
Comment 5 Lucas Gass (lukeg) 2023-12-26 15:52:44 UTC
Created attachment 160300 [details] [review]
Bug 35629: Remove redundant code

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 6 Martin Renvoize (ashimema) 2023-12-28 11:40:56 UTC
Created attachment 160351 [details] [review]
Bug 35629: Remove redundant code

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 7 Martin Renvoize (ashimema) 2023-12-28 11:41:35 UTC
To me, this is clearly a merge error in the first place.

All working well, no regressions and QA scripts are happy.

Passing QA
Comment 8 Jonathan Druart 2024-01-04 07:43:01 UTC
Definitely a bad rebase conflict resolution. Thanks, Pedro!
Comment 9 Katrin Fischer 2024-01-05 13:08:14 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 10 Fridolin Somers 2024-01-08 14:34:14 UTC
Pushed to 23.11.x for 23.11.02
Comment 11 Lucas Gass (lukeg) 2024-01-12 22:24:05 UTC
Backported to 23.05.x for upcoming 23.05.08