Koha-clms/Koha/Patron
Tomas Cohen Arazi 540136bb47
Bug 14570: Add error handling to Koha::Patron::Relationship->store
This patch adds checks on the values for the 'relationship'. This is
done to avoid future problems when migrating relationships from the
plain text syspref into (why not) a proper table. And to preserve
consistency.

There's also catching on possible broken constraints and throwing a new
exception

Tests are added for both the new exceptions and the changes to
Koha::Patron::Relationship.

To test:
- Apply this patches
- Run:
  $ kshell
 k$ prove t/Koha/Exceptions.t \
          t/db_dependent/Koha/Patron.t \
          t/db_dependent/Koha/Patron/Relationship.t
=> SUCCESS: Tests pass!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-08-20 16:05:57 +01:00
..
Attribute Bug 23281: Cleanup Koha::Patron::Attribute::Types->search 2019-08-19 10:20:39 +01:00
Password
…
Attribute.pm Bug 12159: Fix getting extended patron attributes for circ-menu 2019-03-28 13:05:22 +00:00
Attributes.pm Bug 12159: (QA follow-up) Rename relation in Patron::Attributes 2019-03-28 13:05:22 +00:00
Categories.pm
…
Category.pm Bug 22694: Add Koha::Patron::Category->override_hidden_items 2019-04-24 10:51:26 +00:00
Consent.pm Bug 20819: Add Koha object classes for patron consents 2018-09-20 13:45:25 +00:00
Consents.pm Bug 20819: Add Koha object classes for patron consents 2018-09-20 13:45:25 +00:00
Debarments.pm
…
Discharge.pm Bug 21025: Add GetPreparedLetter to Koha::Patron::Discharge 2018-07-13 11:57:22 +00:00
Files.pm
…
HouseboundProfile.pm
…
HouseboundProfiles.pm
…
HouseboundRole.pm
…
HouseboundRoles.pm
…
HouseboundVisit.pm
…
HouseboundVisits.pm
…
Image.pm
…
Images.pm
…
Message.pm
…
Messages.pm
…
Modification.pm Bug 23151: Tweak to use the new database structure 2019-07-19 09:39:11 +01:00
Modifications.pm Bug 23151: Tweak to use the new database structure 2019-07-19 09:39:11 +01:00
Relationship.pm Bug 14570: Add error handling to Koha::Patron::Relationship->store 2019-08-20 16:05:57 +01:00
Relationships.pm Bug 14570: (follow-up) fix qa FAIL tests 2019-08-20 16:05:14 +01:00