[Koha-bugs] [Bug 22284] Groups of pickup locations for holds
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Mon Sep 16 22:26:06 CEST 2019
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22284
Liz Rea <wizzyrea at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #92756|0 |1
is obsolete| |
--- Comment #234 from Liz Rea <wizzyrea at gmail.com> ---
Created attachment 92853
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=92853&action=edit
Bug 22284: New methods in Koha::Library::Groups and Koha::Library
This patch adds new methods in Koha::Library::Groups and Koha::Library.
1) For Koha::Library::Groups adds get_root_ancestor that returns all root
groups for a given search parameters, for example
Koha::Library::Groups->get_root_ancestor( { id => $group_id } )
2) For Koha::Library adds
2.1) get_hold_libraries: returns all libraries (including self) that
belongs to the same holdgroups. If $self belongs to several holdgroups
it will return a distinct list of all libraries belonging to them.
2.2) validate_hold_sibling: Returns 1 if the given parameters matches any of
the
libraries that belong to any of the holdgroups this library belongs. For
example
$library->validate_hold_sibling( { branchcode => $branchcode } )
To test:
1) apply this patch
2) prove t/db_dependent/Koha/Libraries.t t/db_dependent/LibraryGroups.t
SUCCESS => green letters :-D
3) Sign off
Sponsored-by: VOKAL
Signed-off-by: Tomas Cohen Arazi <tomascohen at theke.io>
Signed-off-by: Josef Moravec <josef.moravec at gmail.com>
Signed-off-by: Liz Rea <wizzyrea at gmail.com>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list