Summary: | Error when submitting patron update from the OPAC Can't call method "dateofbirthrequired" on an undefined value | ||
---|---|---|---|
Product: | Koha | Reporter: | Owen Leonard <oleonard> |
Component: | OPAC | Assignee: | Andreas Jonsson <andreas.jonsson> |
Status: | Pushed to stable --- | QA Contact: | Marcel de Rooy <m.de.rooy> |
Severity: | major | ||
Priority: | P5 - low | CC: | andreas.jonsson, david, lucas, m.de.rooy |
Version: | Main | Keywords: | rel_24_11_candidate |
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | Small patch | Documentation contact: | |
Documentation submission: | Text to go in the release notes: |
This fixes updating personal details in the OPAC. A 500 error was shown if the "Patron category (categorycode)" was selected in the PatronSelfModificationBorrowerUnwantedField system preference and the date of birth field was changed or previously empty.
|
|
Version(s) released in: |
25.11.00,25.05.01
|
Circulation function: | |
Attachments: |
Bug 38974: Fix error in OPAC patron update
Bug 38974: Fix error in OPAC patron update Bug 38974: Fix error in OPAC patron update |
Description
Owen Leonard
2025-01-27 12:52:20 UTC
Created attachment 182722 [details] [review] Bug 38974: Fix error in OPAC patron update Test plan: 1) Make sure Patron category is checked in the system preference PatronSelfModificationBorrowerUnwantedField 2) Log in to the opac 3) Go to "Personal details" 4) Select any value for "Date of birth" 5) Click save 6) This must not yield error 500. (But may be a successful save or a validation error). Created attachment 182746 [details] [review] Bug 38974: Fix error in OPAC patron update Test plan: 1) Make sure Patron category is checked in the system preference PatronSelfModificationBorrowerUnwantedField 2) Log in to the opac 3) Go to "Personal details" 4) Select any value for "Date of birth" 5) Click save 6) This must not yield error 500. (But may be a successful save or a validation error). Signed-off-by: David Nind <david@davidnind.com> Testing notes (using KTD): 1. The "Patron category (categorycode)" field to select for PatronSelfModificationBorrowerUnwantedField is about three quarters of the way down the list on the left-hand side. Please fill assignee field when taking a bug. Looks like this is affected too by this change: if ( $borrower->{'password'} ) { my ( $is_valid, $error ) = Koha::AuthUtils::is_password_valid( $borrower->{password}, Koha::Patron::Categories->find( $borrower->{categorycode} || C4::Context->preference('PatronSelfRegistrationDefaultCategory') And should be more correct now (when updating). Created attachment 183053 [details] [review] Bug 38974: Fix error in OPAC patron update Test plan: 1) Make sure Patron category is checked in the system preference PatronSelfModificationBorrowerUnwantedField 2) Log in to the opac 3) Go to "Personal details" 4) Select any value for "Date of birth" 5) Click save 6) This must not yield error 500. (But may be a successful save or a validation error). Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Nice work everyone! Pushed to main for 25.11 Nice work everyone! Pushed to 25.05.x for 25.05.03 |