From e827290b9bacec9f7ce21f1b204133eacabae6e8 Mon Sep 17 00:00:00 2001 From: Baptiste Wojtkowski Date: Mon, 11 May 2026 13:24:38 +0000 Subject: [PATCH] Bug 41742: Replace depth attribute with budget_level in acquisition Test Plan: 1. Pre-checks: a. Observe plack-intranet-error.log. b. Make sure you have one fund with a subfund which also have a subfund. 2. After each followings, verify there are new logs in plack_intranet-error.log, check that the fund dropdown contains no ">" a. In staff interface go to Acquisitions module. b. Navigate to Advanced Search c. In a basket create an order by clicking on "Add to basket" -> "From existing orders (copy)" 3. Apply patch 4. run prove t/db_dependant/Budgets.t 5. Redo 2. and notice there is no log anymore and subfunds are marked with >, subsubfunds with >> Signed-off-by: Roman Dolny Signed-off-by: Emily Lamancusa Signed-off-by: Pedro Amorim --- acqui/acqui-home.pl | 2 +- acqui/duplicate_orders.pl | 2 +- acqui/histsearch.pl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/acqui/acqui-home.pl b/acqui/acqui-home.pl index e5ac8ba6a3..e6ebf73fec 100755 --- a/acqui/acqui-home.pl +++ b/acqui/acqui-home.pl @@ -134,7 +134,7 @@ my $bp_loop = $budgetperiods; for my $bp ( @{$budgetperiods} ) { 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} ); + $$budget{budget_display_name} = sprintf( "%s", ">" x $$budget{budget_level} . $$budget{budget_name} ); } $$bp{hierarchy} = $hierarchy; } diff --git a/acqui/duplicate_orders.pl b/acqui/duplicate_orders.pl index 9b27c11cf6..d9f80480ae 100755 --- a/acqui/duplicate_orders.pl +++ b/acqui/duplicate_orders.pl @@ -154,7 +154,7 @@ for my $bp ( @{$budgetperiods} ) { my $hierarchy = C4::Budgets::GetBudgetHierarchy( $$bp{budget_period_id} ); for my $budget ( @{$hierarchy} ) { $$budget{budget_display_name} = - sprintf( "%s", ">" x $$budget{depth} . $$budget{budget_name} ); + sprintf( "%s", ">" x $$budget{budget_level} . $$budget{budget_name} ); } $$bp{hierarchy} = $hierarchy; } diff --git a/acqui/histsearch.pl b/acqui/histsearch.pl index f101e08b3e..1c22b35a08 100755 --- a/acqui/histsearch.pl +++ b/acqui/histsearch.pl @@ -131,7 +131,7 @@ my $bp_loop = $budgetperiods; for my $bp ( @{$budgetperiods} ) { 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} ); + $$budget{budget_display_name} = sprintf( "%s", ">" x $$budget{budget_level} . $$budget{budget_name} ); } $$bp{hierarchy} = $hierarchy; }