Bug 24448: Add Koha::Biblio->subscriptions_count
authorTomas Cohen Arazi <tomascohen@theke.io>
Fri, 17 Jan 2020 14:18:41 +0000 (11:18 -0300)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 28 Jan 2020 14:56:37 +0000 (14:56 +0000)
commit575d5418edbdd03fd2f648b760e59a704ba76e9d
tree69209dfcfad262198d883ee8ffaf7c1ddb4e0d90
parent81c93cac461d8bdb751bf61ba865950aa51514a4
Bug 24448: Add Koha::Biblio->subscriptions_count

This patch adds the handy subscriptions_count method to the Koha::Biblio
class. It is intended to be used as a shortcut for

    $biblio->subscriptions->count

in places like the API where we can embed the output of a method.

To test:
1. Apply this patches
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Biblio.t \
           t/db_dependent/Koha/Biblios.t
=> SUCCESS: Tests pass! i.e. Biblios.t still passes, and the tests for
the new method in Biblio.t pass as well.
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Koha/Biblio.pm