From eee942ef19fcb7af982792ef796c73907a9edb38 Mon Sep 17 00:00:00 2001 From: Emmi Takkinen Date: Wed, 30 Nov 2022 12:33:19 +0200 Subject: [PATCH] Bug 32377: Set param skiptotals on call of GetBudgetHierarchy in acqui/histsearch.pl MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Calling GetBudgetHierarchy from acqui/histsearch.pl is slow if param skiptotals is not used. To test: 1. Open browsers Console -> Network (F12). 2. Navigate to Order search page and perform search. => Take a note how long it takes to load the Search results page. 3. Apply this patch. 4. Repeat step 2. => Page should now load faster. Sponsored-by: Koha-Suomi Oy Signed-off-by: Frédéric Demians Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 0f5daaa553bc63bd2c08212ee8db3d56c52781e9) Signed-off-by: Matt Blenkinsop (cherry picked from commit 6b5cf15102235daa38a1f5a70e6ee7bea306abe5) Signed-off-by: Lucas Gass --- acqui/histsearch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acqui/histsearch.pl b/acqui/histsearch.pl index e1bdb3851f..642706205f 100755 --- a/acqui/histsearch.pl +++ b/acqui/histsearch.pl @@ -123,7 +123,7 @@ if ($do_search) { my $budgetperiods = C4::Budgets::GetBudgetPeriods; my $bp_loop = $budgetperiods; for my $bp ( @{$budgetperiods} ) { - my $hierarchy = C4::Budgets::GetBudgetHierarchy( $$bp{budget_period_id} ); + my $hierarchy = C4::Budgets::GetBudgetHierarchy( $$bp{budget_period_id}, undef, undef, 1 ); for my $budget ( @{$hierarchy} ) { $$budget{budget_display_name} = sprintf("%s", ">" x $$budget{depth} . $$budget{budget_name}); } -- 2.39.5