Bugzilla – Attachment 182992 Details for
Bug 40082
PatronDuplicateMatchingAddFields isn't respected in the OPAC or the API
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40082: Use the new duplicate checking method in the OPAC
Bug-40082-Use-the-new-duplicate-checking-method-in.patch (text/plain), 2.87 KB, created by
Matt Blenkinsop
on 2025-06-05 12:49:52 UTC
(
hide
)
Description:
Bug 40082: Use the new duplicate checking method in the OPAC
Filename:
MIME Type:
Creator:
Matt Blenkinsop
Created:
2025-06-05 12:49:52 UTC
Size:
2.87 KB
patch
obsolete
>From 9aea8660dd06c80472edf608ab5b2bf53649ee78 Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> >Date: Thu, 5 Jun 2025 13:40:03 +0100 >Subject: [PATCH] Bug 40082: Use the new duplicate checking method in the OPAC > >--- > .../bootstrap/en/modules/opac-memberentry.tt | 6 ++++++ > opac/opac-memberentry.pl | 12 ++++++++++-- > 2 files changed, 16 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt >index 35456b194bf..63fa549a155 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt >@@ -124,6 +124,12 @@ > </div> > [% END %] > >+ [% IF duplicate_found %] >+ <div class="alert alert-error"> >+ <span>An existing account matching these details has been found, please contact a member of staff</span> >+ </div> >+ [% END %] >+ > [% IF cardnumber_wrong_length || cardnumber_already_exists %] > <div class="alert alert-error"> > [% IF cardnumber_wrong_length %] >diff --git a/opac/opac-memberentry.pl b/opac/opac-memberentry.pl >index 65e6f3db162..28614e47c46 100755 >--- a/opac/opac-memberentry.pl >+++ b/opac/opac-memberentry.pl >@@ -138,6 +138,8 @@ if ( $op eq 'cud-create' ) { > my @empty_mandatory_fields = > ( CheckMandatoryFields( \%borrower, $op ), CheckMandatoryAttributes( \%borrower, $attributes ) ); > my $invalidformfields = CheckForInvalidFields( { borrower => \%borrower, context => 'create' } ); >+ my $match_result = Koha::Patrons->check_for_existing_matches( \%borrower ); >+ > delete $borrower{'password2'}; > my $is_cardnumber_valid; > if ( !grep { $_ eq 'cardnumber' } @empty_mandatory_fields ) { >@@ -158,12 +160,18 @@ if ( $op eq 'cud-create' ) { > } > } > >- if ( @empty_mandatory_fields || @$invalidformfields || !$is_cardnumber_valid || $conflicting_attribute ) { >+ if ( @empty_mandatory_fields >+ || @$invalidformfields >+ || !$is_cardnumber_valid >+ || $conflicting_attribute >+ || $match_result->{duplicate_found} ) >+ { > > $template->param( > empty_mandatory_fields => \@empty_mandatory_fields, > invalid_form_fields => $invalidformfields, >- borrower => \%borrower >+ borrower => \%borrower, >+ duplicate_found => $match_result->{duplicate_found} > ); > $template->param( patron_attribute_classes => GeneratePatronAttributesForm( undef, $attributes ) ); > } elsif ( md5_base64( uc( $cgi->param('captcha') ) ) ne $cgi->param('captcha_digest') ) { >-- >2.48.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 40082
:
182990
|
182991
|
182992
|
182993
|
182994
|
182995
|
182996
|
182997