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>
(cherry picked from commit 94e1d8ed0c)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Emily Lamancusa 2024-06-14 15:10:24 -04:00 committed by Lucas Gass
parent 5db98bbd65
commit bcb520d69e
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 # Get current branch count and total viewable count, if they don't match then pass
# both to template # both to template
if( C4::Context->only_my_library ){ 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 ); $template->param( suggestions_count => $local_pendingsuggestions_count );
} else { } else {
my $pendingsuggestions = Koha::Suggestions->search({ status => "ASKED", archived => 0 }); 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 # both to template
if( C4::Context->only_my_library ){ 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 ); $template->param( pendingsuggestions => $local_pendingsuggestions_count );
} else { } else {
my $pendingsuggestions = Koha::Suggestions->search({ status => "ASKED", archived => 0 }); my $pendingsuggestions = Koha::Suggestions->search({ status => "ASKED", archived => 0 });