From ab9e4ca6a46519ddc69ad76837407c0a4f0ed0cd 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 Signed-off-by: Nick Clemens Signed-off-by: Katrin Fischer Signed-off-by: Nick Clemens --- 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.39.5