[Koha-bugs] [Bug 22284] Groups of pickup locations for holds
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Thu Apr 25 18:31:17 CEST 2019
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22284
Agustín Moyano <agustinmoyano at theke.io> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #88369|0 |1
is obsolete| |
--- Comment #27 from Agustín Moyano <agustinmoyano at theke.io> ---
Created attachment 88800
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=88800&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
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list