From e347ef104a389d62eebb1fb9385865167e7235e8 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 (cherry picked from commit ab9e4ca6a46519ddc69ad76837407c0a4f0ed0cd) Signed-off-by: Martin Renvoize (cherry picked from commit 9c823701268d07feb149e219ece7c88d89d47732) Signed-off-by: Lucas Gass --- 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