Bugzilla – Attachment 189752 Details for
Bug 30303
Add ability to select which values to retain when merging patrons
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30303: (follow-up) Split surname and firstname as separate fields
Bug-30303-follow-up-Split-surname-and-firstname-as.patch (text/plain), 2.94 KB, created by
Lari Taskula
on 2025-11-20 10:01:20 UTC
(
hide
)
Description:
Bug 30303: (follow-up) Split surname and firstname as separate fields
Filename:
MIME Type:
Creator:
Lari Taskula
Created:
2025-11-20 10:01:20 UTC
Size:
2.94 KB
patch
obsolete
>From 4fdd40012c2adac268401e46b6238e1ff3c4a216 Mon Sep 17 00:00:00 2001 >From: Lari Taskula <lari.taskula@hypernova.fi> >Date: Thu, 20 Nov 2025 11:56:32 +0200 >Subject: [PATCH] Bug 30303: (follow-up) Split surname and firstname as > separate fields > >To test: >1. Follow-original test plan >2. Observe "Name" field has now been split into "Surname" and "First name" fields >3. Merge patrons >4. Observe the selected surname and firstname have been preserved >--- > .../prog/en/modules/members/merge-patrons.tt | 6 ++++-- > members/merge-patrons.pl | 9 ++------- > 2 files changed, 6 insertions(+), 9 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/merge-patrons.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/merge-patrons.tt >index c50a52ae987..dcd13154888 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/merge-patrons.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/merge-patrons.tt >@@ -249,7 +249,8 @@ > <div class="modal-body"> > <div class="compare"> > <div id="col-label"> >- <div><strong data-field="name">Name:</strong></div> >+ <div><strong data-field="surname">Surname:</strong></div> >+ <div><strong data-field="firstname">First name:</strong></div> > <div><strong data-field="preferred_name">Preferred name:</strong></div> > <div><strong data-field="initials">Initials:</strong></div> > <div><strong data-field="othernames">Other name:</strong></div> >@@ -284,7 +285,8 @@ > <!-- prettier-ignore-start --> > <!-- <pre> block is unindented to avoid unwanted whitespace --> > <pre> >-[% IF ( p.surname ) %][% p.surname | html %], [% p.firstname | html %][% ELSE %]-[% END %] >+[% IF ( p.surname ) %][% p.surname | html %][% ELSE %]-[% END %] >+[% IF ( p.firstname ) %][% p.firstname | html %][% ELSE %]-[% END %] > [% IF ( p.preferred_name ) %][% p.preferred_name | html %][% ELSE %]-[% END %] > [% IF ( p.initials ) %][% p.initials | html %][% ELSE %]-[% END %] > [% IF ( p.othernames ) %][% p.othernames | html %][% ELSE %]-[% END %] >diff --git a/members/merge-patrons.pl b/members/merge-patrons.pl >index 682cf2f4da2..4e5e0a74741 100755 >--- a/members/merge-patrons.pl >+++ b/members/merge-patrons.pl >@@ -41,8 +41,9 @@ my $op = $cgi->param('op') || 'show'; > my @ids = $cgi->multi_param('id'); > > my $copy = $cgi->param('copy'); >-my $name = $cgi->param('name'); > my @fields = qw( >+ surname >+ firstname > preferred_name > initials > othernames >@@ -80,12 +81,6 @@ for my $field (@fields) { > } > } > >-if ($name) { >- my @names = split( ', ', $name ); >- $data{'firstname'} = $names[0]; >- $data{'surname'} = $names[1]; >-} >- > if ( $op eq 'show' ) { > my $patrons = Koha::Patrons->search( { borrowernumber => { -in => \@ids } } ); > $template->param( patrons => $patrons ); >-- >2.34.1
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 30303
:
186382
|
186383
|
186572
|
187269
|
187295
|
187306
|
187307
|
187308
|
187309
| 189752