[Koha-bugs] [Bug 16826] REST API: Add API routes for getting item availability and holdability

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Nov 9 11:45:29 CET 2016


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

--- Comment #28 from Lari Taskula <lari.taskula at jns.fi> ---
Created attachment 57369
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57369&action=edit
Bug 16826: Add Koha::Item::Availabilit(y/ies) for item availability

This patch adds classes for calculating and storing item availability
information.

Usage is simple, e.g. holdability;
my $item = Koha::Items->find(123);
my $holdability = $item->availabilities->hold;
if ($holdability->available) {
  # available for hold!
} else {
  # $holdability->description holds the reason for unavailability
}

To test:
1. Run t/db_dependent/Koha/Item/Availability.t

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


More information about the Koha-bugs mailing list