Bug 27956

Summary: Catch extended attributes exceptions in controllers
Product: Koha Reporter: Tomás Cohen Arazi <tomascohen>
Component: PatronsAssignee: Tomás Cohen Arazi <tomascohen>
Status: ASSIGNED --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: gmcharlt, kyle.m.hall
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 27957, 27857    
Bug Blocks:    

Description Tomás Cohen Arazi 2021-03-15 13:31:55 UTC
Bug 27857 proposes to add the (previously skipped) required validation to the Koha::Patron->extended_attributes setter. We need to adjust the callers so they have better handling of this new exceptions:

$ git grep '\->extended_attributes('
C4/Auth_with_ldap.pm:                    $patron->extended_attributes([$attribute->unblessed]);
Koha/Patrons/Import.pm:                    $patron->extended_attributes($patron_attributes);
Koha/Patrons/Import.pm:                    $patron->extended_attributes($patron_attributes);
members/memberentry.pl:            $patron->extended_attributes($extended_patron_attributes);
opac/opac-memberentry.pl:                $patron->extended_attributes($attributes);
t/db_dependent/Koha/Patron/Modifications.t:    $patron_modification->extended_attributes(
t/db_dependent/Koha/Patrons.t:    $patron_1->extended_attributes($attributes_for_1);
t/db_dependent/Koha/Patrons.t:        $patron_2->extended_attributes($attributes_for_2);
t/db_dependent/Koha/Pseudonymization.t:    $patron->extended_attributes($attribute_values);
t/db_dependent/Utils/Datatables_Members.t:Koha::Patrons->find( $john_doe->{borrowernumber} )->extended_attributes(
t/db_dependent/Utils/Datatables_Members.t:Koha::Patrons->find( $jane_doe->{borrowernumber} )->extended_attributes(
t/db_dependent/Utils/Datatables_Members.t:Koha::Patrons->find( $john_smith->{borrowernumber} )->extended_attributes(
Comment 1 Tomás Cohen Arazi 2021-03-19 12:30:14 UTC
Bug 27957 takes care of LDAP as we actually found a bug on the current code. The new code won't use ->extended_attributes.