]> git.koha-community.org Git - koha.git/commit
Bug 9988: Add get_usage_count and linked_biblionumbers to Koha::Authority
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Wed, 15 Feb 2017 14:48:17 +0000 (15:48 +0100)
committerKyle M Hall <kyle@bywatersolutions.com>
Thu, 13 Apr 2017 12:53:46 +0000 (08:53 -0400)
commit2bb870b3f0cadef851497ab1d4ad8783f47ac8f2
treef702d6c99b9349a6c8e860bd707c4a696633558f
parent25c87a754203f38267eba219d34f86b5922be298
Bug 9988: Add get_usage_count and linked_biblionumbers to Koha::Authority

When replacing the Zebra code in sub merge, we actually need CountUsage
as well as the results it gets from SearchEngine.

In order to get count and/or results, we now create:

[1] instance methods get_usage_count and linked_biblionumbers in
    Koha::Authority,
[2] class methods of the same name in Koha::Authorities.

The instance method calls the class method. The class method can be used
for deleted authority records, and in 'legacy calls' before refactoring.

Note: On BZ 18149 we will replace all CountUsage calls.

Test plan:
Run t/db_dependent/Koha/Authorities.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Marc VĂ©ron <veron@veron.ch>
Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Koha/Authorities.pm
Koha/Authority.pm
t/db_dependent/Koha/Authorities.t