Bugzilla – Attachment 187307 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: Copy values to keeper record when merging patrons
Bug-30303-Copy-values-to-keeper-record-when-mergin.patch (text/plain), 1.88 KB, created by
Lari Taskula
on 2025-10-02 17:43:58 UTC
(
hide
)
Description:
Bug 30303: Copy values to keeper record when merging patrons
Filename:
MIME Type:
Creator:
Lari Taskula
Created:
2025-10-02 17:43:58 UTC
Size:
1.88 KB
patch
obsolete
>From 77f07ca9a911c7b5ce357b4173e6800c750f9522 Mon Sep 17 00:00:00 2001 >From: Brendan Lawlor <blawlor@clamsnet.org> >Date: Fri, 12 Sep 2025 12:20:59 +0000 >Subject: [PATCH] Bug 30303: Copy values to keeper record when merging patrons > >Signed-off-by: Lari Taskula <lari.taskula@hypernova.fi> >--- > members/merge-patrons.pl | 49 ++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 49 insertions(+) > >diff --git a/members/merge-patrons.pl b/members/merge-patrons.pl >index c862921427f..5ee0ccea775 100755 >--- a/members/merge-patrons.pl >+++ b/members/merge-patrons.pl >@@ -40,6 +40,52 @@ my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user( > 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( >+ preferred_name >+ initials >+ othernames >+ branchcode >+ cardnumber >+ categorycode >+ address >+ address2 >+ city >+ state >+ zipcode >+ country >+ dateenrolled >+ date_renewed >+ dateexpiry >+ dateofbirth >+ debarred >+ email >+ emailpro >+ phone >+ phonepro >+ mobile >+ sex >+ updated_on >+ userid >+); >+ >+my %data; >+ >+for my $field (@fields) { >+ my $val = $cgi->param($field); >+ >+ if ( defined $val ) { >+ $data{$field} = $val; >+ } >+} >+ >+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 ); >@@ -56,6 +102,9 @@ if ( $op eq 'show' ) { > keeper => $keeper, > results => $results > ); >+ if ($copy) { >+ $keeper->set( \%data )->store(); >+ } > } catch { > $template->param( error => $_ ); > } >-- >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