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 <roman.dolny@jezuici.pl>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
This commit is contained in:
Baptiste Wojtkowski 2026-05-11 13:24:38 +00:00 committed by Pedro Amorim
parent dbf3327cdb
commit e827290b9b
No known key found for this signature in database
GPG Key ID: 06B75BA7F3894D55
3 changed files with 3 additions and 3 deletions

View File

@ -134,7 +134,7 @@ my $bp_loop = $budgetperiods;
for my $bp ( @{$budgetperiods} ) { for my $bp ( @{$budgetperiods} ) {
my $hierarchy = C4::Budgets::GetBudgetHierarchy( $$bp{budget_period_id}, undef, undef, 1 ); my $hierarchy = C4::Budgets::GetBudgetHierarchy( $$bp{budget_period_id}, undef, undef, 1 );
for my $budget ( @{$hierarchy} ) { 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; $$bp{hierarchy} = $hierarchy;
} }

View File

@ -154,7 +154,7 @@ for my $bp ( @{$budgetperiods} ) {
my $hierarchy = C4::Budgets::GetBudgetHierarchy( $$bp{budget_period_id} ); my $hierarchy = C4::Budgets::GetBudgetHierarchy( $$bp{budget_period_id} );
for my $budget ( @{$hierarchy} ) { for my $budget ( @{$hierarchy} ) {
$$budget{budget_display_name} = $$budget{budget_display_name} =
sprintf( "%s", ">" x $$budget{depth} . $$budget{budget_name} ); sprintf( "%s", ">" x $$budget{budget_level} . $$budget{budget_name} );
} }
$$bp{hierarchy} = $hierarchy; $$bp{hierarchy} = $hierarchy;
} }

View File

@ -131,7 +131,7 @@ my $bp_loop = $budgetperiods;
for my $bp ( @{$budgetperiods} ) { for my $bp ( @{$budgetperiods} ) {
my $hierarchy = C4::Budgets::GetBudgetHierarchy( $$bp{budget_period_id}, undef, undef, 1 ); my $hierarchy = C4::Budgets::GetBudgetHierarchy( $$bp{budget_period_id}, undef, undef, 1 );
for my $budget ( @{$hierarchy} ) { 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; $$bp{hierarchy} = $hierarchy;
} }