From 5fddaae255b2c652732aa997a2231ae2b7508b69 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 11 Dec 2018 10:13:42 -0300 Subject: [PATCH] Bug 21907: Fix article requests count for non-superlibrarians The query generates "Column 'branchcode' in where clause is ambiguous" Test plan: 1 - Enable 'IndependentBranchesPatronModifications' and article requests 2 - Sign in as non-superlibrarian 3 - View plack log 4 - Refresh mainpage, see error in logs --- mainpage.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mainpage.pl b/mainpage.pl index da6aaee924..49f46fc272 100755 --- a/mainpage.pl +++ b/mainpage.pl @@ -71,7 +71,7 @@ my $pending_discharge_requests = Koha::Patron::Discharge::count({ pending => 1 } my $pending_article_requests = Koha::ArticleRequests->search_limited( { status => Koha::ArticleRequest::Status::Pending, - $branch ? ( branchcode => $branch ) : (), + $branch ? ( 'me.branchcode' => $branch ) : (), } )->count; -- 2.11.0