[Bug 41742] New: Use of uninitialized value in repeat (x)... warning in acqui-home.pl
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41742 Bug ID: 41742 Summary: Use of uninitialized value in repeat (x)... warning in acqui-home.pl Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: roman.dolny@jezuici.pl QA Contact: testopia@bugs.koha-community.org The warning: [WARN] Use of uninitialized value in repeat (x) at /kohadevbox/koha/acqui/acqui-home.pl line 137 appears in the plack-intranet-error.log when entering into Acquisitions module. To reproduce in ktd: 1. Observe plack-intranet-error.log. 2. In staff interface go to Acquisitions module. 3. Warning appears in plack-intranet-error.log. It seems that the "depth" key in: sprintf( "%s", ">" x $$budget{depth} . $$budget{budget_name} ); has not been set previously. Several uses of "depth" are in the "CheckBudgetParentPerm" sub, which is probably not called anywhere. This part of the code is responsible for displaying indents in the list of budgets and funds in the "Fund" drop-down of the Acquisitions module. So maybe it should be the "budget_level" key or "CheckBudgetParentPerm" should be called? -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41742 --- Comment #1 from Roman Dolny <roman.dolny@jezuici.pl> --- Similar situation in: acqui/acqui-home.pl: $$budget{budget_display_name} = sprintf( "%s", ">" x $$budget{depth} . $$budget{budget_name} ); acqui/duplicate_orders.pl: sprintf( "%s", ">" x $$budget{depth} . $$budget{budget_name} ); acqui/histsearch.pl: $$budget{budget_display_name} = sprintf( "%s", ">" x $$budget{depth} . $$budget{budget_name} ); -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41742 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |baptiste.wojtkowski@biblibr | |e.com --- Comment #2 from Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> --- *** Bug 42497 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41742 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |baptiste.wojtkowski@biblibr |ity.org |e.com -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41742 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41742 --- Comment #3 from Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> --- Created attachment 198522 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198522&action=edit Bug 41742: Remove non-existing depth attribute in acquisition Test Plan: 1. Observe plack-intranet-error.log. 2. After each followings, verify there are new logs in plack_intranet-error.log 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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41742 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41742 --- Comment #4 from Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> --- I don't see how this was supposed to work, which key are you talking about under "budget_level" ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41742 Roman Dolny <roman.dolny@jezuici.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #5 from Roman Dolny <roman.dolny@jezuici.pl> --- All three entries are for indicating the hierarchy within the funds, in the "Fund" dropdown. A subfund is preceded by a single "greater than" symbol, a subfund of a subfund by two, and so on. And this works when "budget_level" is used instead of the "depth" key for $$budget — fund hierarchy is seen and no warnings appear in the log. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41742 --- Comment #6 from Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> --- Created attachment 198969 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198969&action=edit Bug 41742: Remove CheckBudgetParentPerm This function is not used in the code anymore -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41742 --- Comment #7 from Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> --- Created attachment 198970 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198970&action=edit 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 >> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41742 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #198522|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41742 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41742 Roman Dolny <roman.dolny@jezuici.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41742 Roman Dolny <roman.dolny@jezuici.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #198969|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41742 Roman Dolny <roman.dolny@jezuici.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #198970|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41742 --- Comment #8 from Roman Dolny <roman.dolny@jezuici.pl> --- Created attachment 198984 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198984&action=edit Bug 41742: Remove CheckBudgetParentPerm This function is not used in the code anymore Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41742 --- Comment #9 from Roman Dolny <roman.dolny@jezuici.pl> --- Created attachment 198985 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198985&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41742 --- Comment #10 from Roman Dolny <roman.dolny@jezuici.pl> --- Test notes: 1. Other warnings appear in the log; see separate bug reports (e.g., bug 42571). 2. A minor tpyo in the test plan :) 3. qa unhappy — but this is unrelated to the patch Result: [FAIL] C4/Budgets.pm FAIL pod_coverage sub AddBudgetPeriod has no coverage. sub _round has no coverage. sub _recursiveAdd has no coverage. sub _add_budget_children has no coverage. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org