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

--- Comment #63 from Martin Renvoize (ashimema) 
<[email protected]> ---
Created attachment 203522
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=203522&action=edit
Bug 42386: (follow-up) Collect item-level failure reasons in biblio hold check

When no items are holdable, Koha::Biblio::Availability::Hold now
collects per-item failure reasons in the result context as
item_failures, an arrayref of { itemnumber, blockers } hashes.

This allows callers (and future API responses) to report WHY each
item failed, rather than just 'no item available'.

The item_failures context is only set when no items pass (i.e. when
no_item_available blocker is added). On success, the behavior is
unchanged (short-circuits on first available item).

Test plan:
1. Apply patch
2. Run:
   $ ktd --shell
   k$ prove t/db_dependent/Koha/Biblio/Availability/Hold.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Martin Renvoize <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to