From 2059f7d8016ab61172830e9b670279d3e28882b7 Mon Sep 17 00:00:00 2001
From: Kyle M Hall
Date: Wed, 22 Jun 2016 17:10:23 +0000
Subject: [PATCH] Bug 16735: Migrate library search groups into the new
hierarchical groups
Test Plan:
1) Apply this patch set
2) Note your existing search groups have been ported over to the new
__SEARCH_GROUPS__ group if you had any
3) Create the group __SEARCH_GROUPS__ if one does not already exist
4) Add some first level subgroups to this group, add libraries to those groups
5) Search the library group searching in the intranet and opac
6) Note you get the same results as pre-patch
Signed-off-by: Josef Moravec
Signed-off-by: Tomas Cohen Arazi
Signed-off-by: Jonathan Druart
---
C4/Auth.pm | 6 +-
Koha/Library.pm | 31 ----
Koha/Library/Group.pm | 34 ++++-
Koha/Library/Groups.pm | 23 +++
admin/branches.pl | 85 +----------
catalogue/search.pl | 16 ++-
installer/data/mysql/updatedatabase.pl | 33 +++++
.../prog/en/includes/admin-menu.inc | 2 +-
.../prog/en/modules/admin/admin-home.tt | 6 +-
.../prog/en/modules/admin/branches.tt | 134 +-----------------
.../prog/en/modules/catalogue/advsearch.tt | 20 +--
.../bootstrap/en/includes/masthead.inc | 26 ++--
.../bootstrap/en/modules/opac-advsearch.tt | 6 +-
opac/opac-search.pl | 10 +-
t/db_dependent/Koha/Libraries.t | 37 +----
t/db_dependent/RotatingCollections.t | 1 -
16 files changed, 141 insertions(+), 329 deletions(-)
diff --git a/C4/Auth.pm b/C4/Auth.pm
index 838b0d238c..7fac6df7d8 100644
--- a/C4/Auth.pm
+++ b/C4/Auth.pm
@@ -33,8 +33,8 @@ use C4::Search::History;
use Koha;
use Koha::Caches;
use Koha::AuthUtils qw(get_script_name hash_password);
+use Koha::Library::Groups;
use Koha::Libraries;
-use Koha::LibraryCategories;
use Koha::Patrons;
use POSIX qw/strftime/;
use List::MoreUtils qw/ any /;
@@ -513,11 +513,11 @@ sub get_template_and_user {
$opac_name = C4::Context->userenv->{'branch'};
}
- my $library_categories = Koha::LibraryCategories->search({categorytype => 'searchdomain', show_in_pulldown => 1}, { order_by => ['categorytype', 'categorycode']});
+ my $search_groups = Koha::Library::Groups->get_search_groups();
$template->param(
OpacAdditionalStylesheet => C4::Context->preference("OpacAdditionalStylesheet"),
AnonSuggestions => "" . C4::Context->preference("AnonSuggestions"),
- BranchCategoriesLoop => $library_categories,
+ LibrarySearchGroups => $search_groups,
opac_name => $opac_name,
LibraryName => "" . C4::Context->preference("LibraryName"),
LibraryNameTitle => "" . $LibraryNameTitle,
diff --git a/Koha/Library.pm b/Koha/Library.pm
index 151f30e56a..5862aa8b8c 100644
--- a/Koha/Library.pm
+++ b/Koha/Library.pm
@@ -41,37 +41,6 @@ TODO: Ask the author to add a proper description
=cut
-sub get_categories {
- my ( $self, $params ) = @_;
- # TODO This should return Koha::LibraryCategories
- return $self->{_result}->categorycodes( $params );
-}
-
-=head3 update_categories
-
-TODO: Ask the author to add a proper description
-
-=cut
-
-sub update_categories {
- my ( $self, $categories ) = @_;
- $self->_result->delete_related( 'branchrelations' );
- $self->add_to_categories( $categories );
-}
-
-=head3 add_to_categories
-
-TODO: Ask the author to add a proper description
-
-=cut
-
-sub add_to_categories {
- my ( $self, $categories ) = @_;
- for my $category ( @$categories ) {
- $self->_result->add_to_categorycodes( $category->_result );
- }
-}
-
=head3 get_effective_marcorgcode
my $marcorgcode = Koha::Libraries->find( $library_id )->get_effective_marcorgcode();
diff --git a/Koha/Library/Group.pm b/Koha/Library/Group.pm
index 43291e8ab5..cc4bd6d831 100644
--- a/Koha/Library/Group.pm
+++ b/Koha/Library/Group.pm
@@ -59,7 +59,7 @@ sub children {
my $children =
Koha::Library::Groups->search( { parent_id => $self->id }, { order_by => [ 'title', 'branchcode' ] } );
- return $children;
+ return wantarray ? $children->as_list : $children;
}
=head3 library
@@ -80,16 +80,22 @@ sub library {
return $self->{_library};
}
-=head3 libraries_not_direct_children
+=head3 libraries
-my @libraries = $group->libraries_not_direct_children();
+my @libraries = $group->libraries( { [invert => 1] } );
-Returns the libraries *not* set as direct children of this group
+Returns the libraries set as direct children of this group.
+
+If invert param is true, the returned list will be libraries
+that are *not* direct children of this group.
=cut
-sub libraries_not_direct_children {
- my ($self) = @_;
+sub libraries {
+ my ($self, $params) = @_;
+ my $invert = $params->{invert};
+
+ my $in_or_not = $invert ? '-not_in' : '-in';
my @children = Koha::Library::Groups->search(
{
@@ -103,7 +109,7 @@ sub libraries_not_direct_children {
return Koha::Libraries->search(
{
- branchcode => { -not_in => \@branchcodes }
+ branchcode => { $in_or_not => \@branchcodes }
},
{
order_by => 'branchname'
@@ -111,6 +117,20 @@ sub libraries_not_direct_children {
);
}
+=head3 libraries_not_direct_children
+
+my @libraries = $group->libraries_not_direct_children();
+
+Returns the libraries *not* set as direct children of this group
+
+=cut
+
+sub libraries_not_direct_children {
+ my ($self) = @_;
+
+ return $self->libraries( { invert => 1 } );
+}
+
=head3 store
=cut
diff --git a/Koha/Library/Groups.pm b/Koha/Library/Groups.pm
index 9b1356a072..d3cb72a84c 100644
--- a/Koha/Library/Groups.pm
+++ b/Koha/Library/Groups.pm
@@ -45,6 +45,29 @@ sub get_root_groups {
return $self->search( { parent_id => undef }, { order_by => 'title' } );
}
+=head3 my @search_groups = $self->get_search_groups({[interface => 'staff' || 'opac']}))
+
+Returns search groups for the specified interface.
+Defaults to OPAC if no interface is specified.
+
+=cut
+
+sub get_search_groups {
+ my ( $self, $params ) = @_;
+ my $interface = $params->{interface} || q{};
+
+ my $title = $interface eq 'staff' ? '__SEARCH_GROUPS__' : '__SEARCH_GROUPS_OPAC__';
+
+ my ($search_groups_root) =
+ $self->search( { parent_id => undef, title => $title } );
+
+ return unless $search_groups_root;
+
+ my $children = $search_groups_root->children();
+
+ return wantarray ? $children->as_list : $children;
+}
+
=head3 type
=cut
diff --git a/admin/branches.pl b/admin/branches.pl
index bcd712f292..ab1021cdf6 100755
--- a/admin/branches.pl
+++ b/admin/branches.pl
@@ -27,7 +27,6 @@ use C4::Koha;
use Koha::Patrons;
use Koha::Items;
use Koha::Libraries;
-use Koha::LibraryCategories;
my $input = new CGI;
my $branchcode = $input->param('branchcode');
@@ -53,8 +52,6 @@ if ( $op eq 'add_form' ) {
$template->param(
library => $library,
- categories => [ Koha::LibraryCategories->search( {}, { order_by => [ 'categorytype', 'categoryname' ] } ) ],
- $library ? ( selected_categorycodes => [ map { $_->categorycode } $library->get_categories ] ) : (),
);
} elsif ( $op eq 'add_validate' ) {
my @fields = qw(
@@ -80,18 +77,11 @@ if ( $op eq 'add_form' ) {
);
my $is_a_modif = $input->param('is_a_modif');
- my @categories;
- for my $category ( Koha::LibraryCategories->search ) {
- push @categories, $category
- if $input->param( "selected_categorycode_" . $category->categorycode );
- }
if ($is_a_modif) {
my $library = Koha::Libraries->find($branchcode);
for my $field (@fields) {
$library->$field( scalar $input->param($field) );
}
- $library->update_categories( \@categories );
-
eval { $library->store; };
if ($@) {
push @messages, { type => 'alert', code => 'error_on_update' };
@@ -106,7 +96,6 @@ if ( $op eq 'add_form' ) {
}
);
eval { $library->store; };
- $library->add_to_categories( \@categories );
if ($@) {
push @messages, { type => 'alert', code => 'error_on_insert' };
} else {
@@ -153,85 +142,13 @@ if ( $op eq 'add_form' ) {
push @messages, { type => 'message', code => 'success_on_delete' };
}
$op = 'list';
-} elsif ( $op eq 'add_form_category' ) {
- my $category;
- if ($categorycode) {
- $category = Koha::LibraryCategories->find($categorycode);
- }
- $template->param( category => $category, );
-} elsif ( $op eq 'add_validate_category' ) {
- my $is_a_modif = $input->param('is_a_modif');
- my @fields = qw(
- categoryname
- codedescription
- categorytype
- );
- if ($is_a_modif) {
- my $category = Koha::LibraryCategories->find($categorycode);
- for my $field (@fields) {
- $category->$field( scalar $input->param($field) );
- }
- $category->show_in_pulldown( scalar $input->param('show_in_pulldown') eq 'on' );
- eval { $category->store; };
- if ($@) {
- push @messages, { type => 'alert', code => 'error_on_update_category' };
- } else {
- push @messages, { type => 'message', code => 'success_on_update_category' };
- }
- } else {
- my $category = Koha::LibraryCategory->new(
- { categorycode => $categorycode,
- ( map { $_ => scalar $input->param($_) || undef } @fields )
- }
- );
- $category->show_in_pulldown( scalar $input->param('show_in_pulldown') eq 'on' );
- eval { $category->store; };
- if ($@) {
- push @messages, { type => 'alert', code => 'error_on_insert_category' };
- } else {
- push @messages, { type => 'message', code => 'success_on_insert_category' };
- }
- }
- $op = 'list';
-} elsif ( $op eq 'delete_confirm_category' ) {
- my $category = Koha::LibraryCategories->find($categorycode);
- if ( my $libraries_count = $category->libraries->count ) {
- push @messages,
- { type => 'alert',
- code => 'cannot_delete_category',
- data => { libraries_count => $libraries_count, },
- };
- $op = 'list';
- } else {
- $template->param( category => $category );
- }
-} elsif ( $op eq 'delete_confirmed_category' ) {
- my $category = Koha::LibraryCategories->find($categorycode);
- my $deleted = eval { $category->delete; };
-
- if ( $@ or not $deleted ) {
- push @messages, { type => 'alert', code => 'error_on_delete_category' };
- } else {
- push @messages, { type => 'message', code => 'success_on_delete_category' };
- }
- $op = 'list';
} else {
$op = 'list';
}
if ( $op eq 'list' ) {
my $libraries = Koha::Libraries->search( {}, { order_by => ['branchcode'] }, );
- $template->param(
- libraries => $libraries,
- group_types => [
- { categorytype => 'searchdomain',
- categories => [ Koha::LibraryCategories->search( { categorytype => 'searchdomain' } ) ],
- },
- { categorytype => 'properties',
- categories => [ Koha::LibraryCategories->search( { categorytype => 'properties' } ) ],
- },
- ]
- );
+ $template->param( libraries => $libraries, );
}
$template->param(
diff --git a/catalogue/search.pl b/catalogue/search.pl
index 812bd4fd6c..4041bd84aa 100755
--- a/catalogue/search.pl
+++ b/catalogue/search.pl
@@ -150,7 +150,7 @@ use POSIX qw(ceil floor);
use C4::Search::History;
use Koha::ItemTypes;
-use Koha::LibraryCategories;
+use Koha::Library::Groups;
use Koha::Patrons;
use Koha::SearchEngine::Search;
use Koha::SearchEngine::QueryBuilder;
@@ -209,12 +209,16 @@ if($cgi->cookie("intranet_bib_list")){
@cart_list = split(/\//, $cart_list);
}
-# load the branches
-my $categories = Koha::LibraryCategories->search( { categorytype => 'searchdomain' }, { order_by => [ 'categorytype', 'categorycode' ] } );
+my @search_groups_opac =
+ Koha::Library::Groups->get_search_groups( { interface => 'opac' } );
+my @search_groups_staff =
+ Koha::Library::Groups->get_search_groups( { interface => 'staff' } );
+my @search_groups = ( @search_groups_opac, @search_groups_staff );
+@search_groups = sort { $a->title cmp $b->title } @search_groups;
$template->param(
selected_branchcode => ( C4::Context->IsSuperLibrarian ? C4::Context->userenv : '' ),
- searchdomainloop => $categories
+ search_groups => \@search_groups,
);
# load the Type stuff
@@ -395,8 +399,8 @@ my %is_nolimit = map { $_ => 1 } @nolimits;
@limits = grep { not $is_nolimit{$_} } @limits;
if($params->{'multibranchlimit'}) {
- my $library_category = Koha::LibraryCategories->find( $params->{multibranchlimit} );
- my @libraries = $library_category->libraries;
+ my $search_group = Koha::Library::Groups->find( $params->{multibranchlimit} );
+ my @libraries = $search_group->libraries;
my $multibranch = '('.join( " or ", map { 'branch: ' . $_->id } @libraries ) .')';
push @limits, $multibranch if ($multibranch ne '()');
}
diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl
index f3ebe14d66..8a4b3c8ce5 100755
--- a/installer/data/mysql/updatedatabase.pl
+++ b/installer/data/mysql/updatedatabase.pl
@@ -15245,6 +15245,39 @@ if( CheckVersion( $DBversion ) ) {
print "Upgrade to $DBversion done (Bug 15707 - Add new table library_groups)\n";
}
+$DBversion = '17.12.00.008';
+if ( CheckVersion($DBversion) ) {
+ require Koha::Library::Group;
+
+ my $search_groups_staff_root = Koha::Library::Group->new( { title => '__SEARCH_GROUPS__', description => "Library search groups - Staff only" } )->store();
+ my $search_groups_opac_root = Koha::Library::Group->new( { title => '__SEARCH_GROUPS_OPAC__', description => "Library search groups - OPAC & Staff" } )->store();
+
+ my $sth = $dbh->prepare("SELECT * FROM branchcategories");
+ $sth->execute();
+
+ while ( my $lc = $sth->fetchrow_hashref ) {
+ my $description = $lc->{categorycode};
+ $description .= " - " . $lc->{codedescription} if $lc->{codedescription};
+
+ my $subgroup = Koha::Library::Group->new(
+ {
+ parent_id => $lc->{show_in_pulldown} ? $search_groups_opac_root->id : $search_groups_staff_root->id,
+ title => $lc->{categoryname},
+ description => $description,
+ }
+ )->store();
+
+ my $sth2 = $dbh->prepare("SELECT * FROM branchrelations WHERE categorycode = ?");
+ $sth2->execute( $lc->{categorycode} );
+
+ while ( my $l = $sth2->fetchrow_hashref ) {
+ Koha::Library::Group->new( { parent_id => $subgroup->id, branchcode => $l->{branchcode} } )->store();
+ }
+ }
+
+ print "Upgrade to $DBversion done (Bug 16735 - Replace existing library search groups functionality with the new hierarchical groups system)\n";
+ SetVersion($DBversion);
+}
# DEVELOPER PROCESS, search for anything to execute in the db_update directory
# SEE bug 13068
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc
index b2a330c247..4a52ef39ba 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc
@@ -9,7 +9,7 @@
Basic parameters
- [% IF searchdomainloop.count %]
- OR
- Groups of libraries:
- -- none --
- [% FOREACH searchdomainloo IN searchdomainloop %]
- [% searchdomainloo.categoryname %]
- [% END %]
-
+ [% IF search_groups %]
+ OR
+
+
+ Groups of libraries:
+
+ -- none --
+ [% FOREACH sg IN search_groups %]
+ [% sg.title %]
+ [% END %]
+
+
[% END %]
diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc
index fd37f6e93b..608cc17bb9 100644
--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc
+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc
@@ -229,22 +229,22 @@
All libraries
- [% IF BranchCategoriesLoop %][% END %]
- [% FOREACH BranchesLoo IN Branches.all( selected => opac_name ) %]
- [% IF BranchesLoo.selected %]
- [% BranchesLoo.branchname %]
- [% ELSE %]
- [% BranchesLoo.branchname %]
- [% END %]
- [% END %]
- [% IF BranchCategoriesLoop %]
+
+ [% IF LibrarySearchGroups %][% END %]
+
+ [% FOREACH BranchesLoo IN BranchesLoop %]
+ [% IF ( BranchesLoo.selected ) %][% BranchesLoo.branchname %]
+ [% ELSE %][% BranchesLoo.branchname %] [% END %]
+ [% END %]
+
+ [% IF LibrarySearchGroups %]
- [% FOREACH bc IN BranchCategoriesLoop %]
- [% IF bc.categorycode == opac_name %]
- [% bc.categoryname %]
+ [% FOREACH lsg IN LibrarySearchGroups %]
+ [% IF lsg.id == opac_name %]
+ [% lsg.title %]
[% ELSE %]
- [% bc.categoryname %]
+ [% lsg.title %]
[% END # / bc.selected %]
[% END %]
diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt
index 51c5ddaa5f..1705184feb 100644
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt
+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt
@@ -223,13 +223,13 @@
[% END %]
[% END %]
- [% IF ( searchdomainloop && searchdomainloop.count > 0) %]
+ [% IF search_groups %]
OR
Groups of libraries
-- none --
- [% FOREACH searchdomainloo IN searchdomainloop %]
- [% searchdomainloo.categoryname %]
+ [% FOREACH sg IN search_groups %]
+ [% sg.title %]
[% END %]
[% END %]
diff --git a/opac/opac-search.pl b/opac/opac-search.pl
index ebe870be47..81e6b3cd1f 100755
--- a/opac/opac-search.pl
+++ b/opac/opac-search.pl
@@ -53,9 +53,9 @@ use C4::SocialData;
use C4::External::OverDrive;
use Koha::ItemTypes;
-use Koha::LibraryCategories;
use Koha::Ratings;
use Koha::Virtualshelves;
+use Koha::Library::Groups;
use POSIX qw(ceil floor strftime);
use URI::Escape;
@@ -214,8 +214,8 @@ if ($cgi->cookie("search_path_code")) {
}
}
-my $library_categories = Koha::LibraryCategories->search( { categorytype => 'searchdomain' }, { order_by => [ 'categorytype', 'categorycode' ] } );
-$template->param( searchdomainloop => $library_categories );
+my $search_groups = Koha::Library::Groups->get_search_groups();
+$template->param( search_groups => $search_groups );
# load the language limits (for search)
my $languages_limit_loop = getLanguages($lang, 1);
@@ -491,8 +491,8 @@ if (@searchCategories > 0) {
@limits = map { uri_unescape($_) } @limits;
if($params->{'multibranchlimit'}) {
- my $library_category = Koha::LibraryCategories->find( $params->{multibranchlimit} );
- my @libraries = $library_category->libraries;
+ my $search_group = Koha::Library::Groups->find( $params->{multibranchlimit} );
+ my @libraries = $search_group->libraries;
my $multibranch = '('.join( " or ", map { 'branch: ' . $_->id } @libraries ) .')';
push @limits, $multibranch if ($multibranch ne '()');
}
diff --git a/t/db_dependent/Koha/Libraries.t b/t/db_dependent/Koha/Libraries.t
index 22c704786b..d24ba3d6fe 100644
--- a/t/db_dependent/Koha/Libraries.t
+++ b/t/db_dependent/Koha/Libraries.t
@@ -19,12 +19,10 @@
use Modern::Perl;
-use Test::More tests => 10;
+use Test::More tests => 4;
use Koha::Library;
use Koha::Libraries;
-use Koha::LibraryCategory;
-use Koha::LibraryCategories;
use Koha::Database;
use t::lib::Mocks;
@@ -35,7 +33,6 @@ $schema->storage->txn_begin;
my $builder = t::lib::TestBuilder->new;
my $nb_of_libraries = Koha::Libraries->search->count;
-my $nb_of_categories = Koha::LibraryCategories->search->count;
my $new_library_1 = Koha::Library->new({
branchcode => 'my_bc_1',
branchname => 'my_branchname_1',
@@ -47,47 +44,15 @@ my $new_library_2 = Koha::Library->new({
branchname => 'my_branchname_2',
branchnotes => 'my_branchnotes_2',
})->store;
-my $new_category_1 = Koha::LibraryCategory->new({
- categorycode => 'my_cc_1',
- categoryname => 'my_categoryname_1',
- codedescription => 'my_codedescription_1',
- categorytype => 'properties',
-} )->store;
-my $new_category_2 = Koha::LibraryCategory->new( {
- categorycode => 'my_cc_2',
- categoryname => 'my_categoryname_2',
- codedescription => 'my_codedescription_2',
- categorytype => 'searchdomain',
-} )->store;
-my $new_category_3 = Koha::LibraryCategory->new( {
- categorycode => 'my_cc_3',
- categoryname => 'my_categoryname_3',
- codedescription => 'my_codedescription_3',
- categorytype => 'searchdomain',
-} )->store;
is( Koha::Libraries->search->count, $nb_of_libraries + 2, 'The 2 libraries should have been added' );
-is( Koha::LibraryCategories->search->count, $nb_of_categories + 3, 'The 3 library categories should have been added' );
-$new_library_1->add_to_categories( [$new_category_1] );
-$new_library_2->add_to_categories( [$new_category_2] );
my $retrieved_library_1 = Koha::Libraries->find( $new_library_1->branchcode );
is( $retrieved_library_1->branchname, $new_library_1->branchname, 'Find a library by branchcode should return the correct library' );
-is( Koha::Libraries->find( $new_library_1->branchcode )->get_categories->count, 1, '1 library should have been linked to the category 1' );
-
-$retrieved_library_1->update_categories( [ $new_category_2, $new_category_3 ] );
-is( Koha::Libraries->find( $new_library_1->branchcode )->get_categories->count, 2, '2 libraries should have been linked to the category 2' );
-
-my $retrieved_category_2 = Koha::LibraryCategories->find( $new_category_2->categorycode );
-is( $retrieved_category_2->libraries->count, 2, '2 libraries should have been linked to the category_2' );
-is( $retrieved_category_2->categorycode, uc('my_cc_2'), 'The Koha::LibraryCategory constructor should have upercased the categorycode' );
$retrieved_library_1->delete;
is( Koha::Libraries->search->count, $nb_of_libraries + 1, 'Delete should have deleted the library' );
-$retrieved_category_2->delete;
-is( Koha::LibraryCategories->search->count, $nb_of_categories + 2, 'Delete should have deleted the library category' );
-
$schema->storage->txn_rollback;
subtest '->get_effective_marcorgcode' => sub {
diff --git a/t/db_dependent/RotatingCollections.t b/t/db_dependent/RotatingCollections.t
index a5bdb4a0f8..9c46b33619 100644
--- a/t/db_dependent/RotatingCollections.t
+++ b/t/db_dependent/RotatingCollections.t
@@ -57,7 +57,6 @@ $dbh->do(q|DELETE FROM collections_tracking |);
$dbh->do(q|DELETE FROM collections |);
$dbh->do(q|DELETE FROM branches |);
$dbh->do(q|DELETE FROM categories|);
-$dbh->do(q|DELETE FROM branchcategories|);
#Test CreateCollection
my $collections = GetCollections();
--
2.39.5