Bugzilla – Attachment 105908 Details for
Bug 25769
Patron self modification triggers change request for date of birth to null
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25769: Patron self modification triggers change request for date of birth to null
Bug-25769-Patron-self-modification-triggers-change.patch (text/plain), 1.93 KB, created by
Kyle M Hall
on 2020-06-16 12:06:33 UTC
(
hide
)
Description:
Bug 25769: Patron self modification triggers change request for date of birth to null
Filename:
MIME Type:
Creator:
Kyle M Hall
Created:
2020-06-16 12:06:33 UTC
Size:
1.93 KB
patch
obsolete
>From 1c7fd8b9df1b098740a85baa21e1102c98a6f4d2 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Tue, 16 Jun 2020 08:00:45 -0400 >Subject: [PATCH] Bug 25769: Patron self modification triggers change request > for date of birth to null > >If PatronSelfModificationBorrowerUnwantedField contains dateofbirth, all >patron self modification requests will attempt to set dateofbirth to >null instead of ignoring the field. > >Test Plan: >1) Add dateofbirth to PatronSelfModificationBorrowerUnwantedField >2) Run a patron self modification >3) Note the request sets dateofbirth to null on the staff side >4) Apply this patch >5) Restart all the things! >6) Run another self-modification >7) Note of the staff side that dateofbirth is unaffected >--- > opac/opac-memberentry.pl | 20 +++++++++++--------- > 1 file changed, 11 insertions(+), 9 deletions(-) > >diff --git a/opac/opac-memberentry.pl b/opac/opac-memberentry.pl >index faf32e8285..3825403029 100755 >--- a/opac/opac-memberentry.pl >+++ b/opac/opac-memberentry.pl >@@ -482,16 +482,18 @@ sub ParseCgiForBorrower { > } > } > >- my $dob_dt; >- $dob_dt = eval { dt_from_string( $borrower{'dateofbirth'} ); } >- if ( $borrower{'dateofbirth'} ); >+ if ( defined $borrower{'dateofbirth'} ) { >+ my $dob_dt; >+ $dob_dt = eval { dt_from_string( $borrower{'dateofbirth'} ); } >+ if ( $borrower{'dateofbirth'} ); > >- if ( $dob_dt ) { >- $borrower{'dateofbirth'} = output_pref ( { dt => $dob_dt, dateonly => 1, dateformat => 'iso' } ); >- } >- else { >- # Trigger validation >- $borrower{'dateofbirth'} = undef; >+ if ( $dob_dt ) { >+ $borrower{'dateofbirth'} = output_pref( { dt => $dob_dt, dateonly => 1, dateformat => 'iso' } ); >+ } >+ else { >+ # Trigger validation >+ $borrower{'dateofbirth'} = undef; >+ } > } > > # Replace checkbox 'agreed' by datetime in gdpr_proc_consent >-- >2.24.1 (Apple Git-126)
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 25769
:
105908
|
105938
|
106146