]> git.koha-community.org Git - koha.git/commit
Bug 24430: Add ->orders and ->active_orders_count to Koha::Biblio
authorTomas Cohen Arazi <tomascohen@theke.io>
Wed, 15 Jan 2020 19:25:52 +0000 (16:25 -0300)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 21 Jan 2020 11:21:51 +0000 (11:21 +0000)
commitf30c2874cdcbaf008ecc44fafccb89d44403e5f6
treef05f1485b3f30acb75f66668a0d87b5fa387d542
parentf06578b34e9a31ff9b2ee3575b3770a88fccdece
Bug 24430: Add ->orders and ->active_orders_count to Koha::Biblio

This patch introduces an accessor to the related orders, and a method
that returns the active orders count. The target usage for the count is the
API. In the rest of the codebase, we would just call:

    $biblio->orders->count

To test:
1. Apply this patches
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Biblio.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Koha/Biblio.pm
Koha/Schema/Result/Biblio.pm