Koha-clms/Koha/Library
Agustin Moyano 1332285508
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: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-01-03 12:58:03 +00:00
..
Group.pm Bug 20838: Make Koha::Library::Group->all_libraries return a list of Koha::Libraries 2018-06-04 13:40:36 -04:00
Groups.pm Bug 22284: New methods in Koha::Library::Groups and Koha::Library 2020-01-03 12:58:03 +00:00
OverDriveInfo.pm Bug 21082: Add new admin page for overdrive 2018-10-09 11:04:23 +00:00
OverDriveInfos.pm Bug 21082: Add new admin page for overdrive 2018-10-09 11:04:23 +00:00