Bug 27956 - Catch extended attributes exceptions in controllers
Summary: Catch extended attributes exceptions in controllers
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Tomás Cohen Arazi
QA Contact: Testopia
Depends on: 27957 27857
  Show dependency treegraph
Reported: 2021-03-15 13:31 UTC by Tomás Cohen Arazi
Modified: 2021-03-19 12:30 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Text to go in the release notes:
Version(s) released in:


Note You need to log in before you can comment on or make changes to this bug.
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.