Bug 30493: (QA follow-up) Fix for the only_my_library case as well

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Emily Lamancusa 2024-06-14 15:10:24 -04:00 committed by Katrin Fischer
parent e87f4cd550
commit 94e1d8ed0c
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
2 changed files with 2 additions and 2 deletions

View File

@ -50,7 +50,7 @@ my $status = $query->param('status') || "ASKED";
# Get current branch count and total viewable count, if they don't match then pass
# both to template
if( C4::Context->only_my_library ){
my $local_pendingsuggestions_count = Koha::Suggestions->search({ status => "ASKED", branchcode => C4::Context->userenv()->{'branch'} })->count();
my $local_pendingsuggestions_count = Koha::Suggestions->search({ status => "ASKED", branchcode => C4::Context->userenv()->{'branch'}, archived => 0 })->count();
$template->param( suggestions_count => $local_pendingsuggestions_count );
} else {
my $pendingsuggestions = Koha::Suggestions->search({ status => "ASKED", archived => 0 });

View File

@ -86,7 +86,7 @@ my $pendingtags = get_count_by_tag_status(0);
# both to template
if( C4::Context->only_my_library ){
my $local_pendingsuggestions_count = Koha::Suggestions->search({ status => "ASKED", branchcode => C4::Context->userenv()->{'branch'} })->count();
my $local_pendingsuggestions_count = Koha::Suggestions->search({ status => "ASKED", branchcode => C4::Context->userenv()->{'branch'}, archived => 0 })->count();
$template->param( pendingsuggestions => $local_pendingsuggestions_count );
} else {
my $pendingsuggestions = Koha::Suggestions->search({ status => "ASKED", archived => 0 });