[Koha-bugs] [Bug 23666] Add API route for additional patron attributes

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Mar 25 15:53:16 CET 2021


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23666

--- Comment #22 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
Created attachment 118818
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118818&action=edit
Bug 23666: Add PATCH
/patron/:patron_id/extended_attributes/:extended_attribute_id

This patch adds the described route. It is designed to use the
underlying libraries' methods to update an existing attribute.

The tests cover the use cases.

Note: I added handling for two exceptions that can only occur on bad
data (i.e. not by using our codebase). This are:
- Koha::Exceptions::Patron::Attribute::InvalidType
- Koha::Exceptions::Patron::Attribute::NonRepeatable

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/patrons_extended_attributes.t
=> SUCCESS: Tests pass!
3. PLay with the route
=> SUCCESS: Expected behavior!
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen at theke.io>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list