[Bug 12168] New: Spent and ordered budget values are wrong if deep > 2
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12168 Bug ID: 12168 Summary: Spent and ordered budget values are wrong if deep > 2 Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: jonathan.druart@biblibre.com QA Contact: testopia@bugs.koha-community.org A really weird (and old) code process the calculation for the spent and ordered sublevel funds. It only takes into account the direct children. So if you have: fund1 (spent=100) parent of fund11 (spent=10) parent of fund111 (spent=1), you get: fund | base-level | total spent fund1 | 100 | 110 fund11 | 10 | 11 fund111 | 1 | 1 which is wrong, it should be fund | base-level | total spent fund1 | 100 | 111 fund11 | 10 | 11 fund111 | 1 | 1 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12168 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|koha-bugs@lists.koha-commun |jonathan.druart@biblibre.co |ity.org |m -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12168 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |12164 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12168 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|12164 | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12168 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |12164 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12168 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12168 --- Comment #1 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 27867 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=27867&action=edit Bug 12168: Spent and ordered budget values are wrong if deep > 2 A really weird (and old) code process the calculation for the spent and ordered sublevel funds. It only takes into account the direct children. So if you have: fund1 (spent=100) parent of fund11 (spent=10) parent of fund111 (spent=1), you get: fund | base-level | total spent fund1 | 100 | 110 fund11 | 10 | 11 fund111 | 1 | 1 which is wrong, it should be fund | base-level | total spent fund1 | 100 | 111 fund11 | 10 | 11 fund111 | 1 | 1 Test plan: - Create 1 budget and 3 funds with the same structure as above. - Create some orders and receive them (not all). - Go on the fund list view and verify the values are correct. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12168 --- Comment #2 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 27868 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=27868&action=edit Bug 12168: Add unit tests for GetBudgetHierarchySpent GetBudgetHierarchyOrdered Test plan: prove t/db_dependent/Budgets.t Note: This addition may sound overkill but I found this bug developping bug 12164 and I will reuse all of that. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12168 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #27868|0 |1 is obsolete| | --- Comment #3 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 27877 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=27877&action=edit Bug 12168: Add unit tests for GetBudgetHierarchySpent GetBudgetHierarchyOrdered Test plan: prove t/db_dependent/Budgets.t Note: This addition may sound overkill but I found this bug developping bug 12164 and I will reuse all of that. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12168 Nicole C. Engard <nengard@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nengard@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12168 Paola Rossi <paola.rossi@cineca.it> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply CC| |paola.rossi@cineca.it --- Comment #4 from Paola Rossi <paola.rossi@cineca.it> --- I test against master 3.15.00.051. Applying: Bug 12168: Spent and ordered budget values are wrong if deep > 2 Using index info to reconstruct a base tree... Falling back to patching base and 3-way merge... Auto-merging C4/Budgets.pm CONFLICT (content): Merge conflict in C4/Budgets.pm Failed to merge in the changes. Patch failed at 0001 Bug 12168: Spent and ordered budget values are wrong if deep > 2 So I pass the patch to "Patch doesn't apply" status. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12168 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12168 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #27867|0 |1 is obsolete| | --- Comment #5 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 28102 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=28102&action=edit Bug 12168: Spent and ordered budget values are wrong if deep > 2 A really weird (and old) code process the calculation for the spent and ordered sublevel funds. It only takes into account the direct children. So if you have: fund1 (spent=100) parent of fund11 (spent=10) parent of fund111 (spent=1), you get: fund | base-level | total spent fund1 | 100 | 110 fund11 | 10 | 11 fund111 | 1 | 1 which is wrong, it should be fund | base-level | total spent fund1 | 100 | 111 fund11 | 10 | 11 fund111 | 1 | 1 Test plan: - Create 1 budget and 3 funds with the same structure as above. - Create some orders and receive them (not all). - Go on the fund list view and verify the values are correct. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12168 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #27877|0 |1 is obsolete| | --- Comment #6 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 28103 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=28103&action=edit Bug 12168: Add unit tests for GetBudgetHierarchySpent GetBudgetHierarchyOrdered Test plan: prove t/db_dependent/Budgets.t Note: This addition may sound overkill but I found this bug developping bug 12164 and I will reuse all of that. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12168 Paola Rossi <paola.rossi@cineca.it> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #7 from Paola Rossi <paola.rossi@cineca.it> --- I test the patch against master 3.15.00.051. The values are correct as required. So I pass the patch to "Signed Off" status. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12168 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #28102|0 |1 is obsolete| | Attachment #28103|0 |1 is obsolete| | --- Comment #8 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 28289 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=28289&action=edit [PASSED QA] Bug 12168: Spent and ordered budget values are wrong if deep > 2 A really weird (and old) code process the calculation for the spent and ordered sublevel funds. It only takes into account the direct children. So if you have: fund1 (spent=100) parent of fund11 (spent=10) parent of fund111 (spent=1), you get: fund | base-level | total spent fund1 | 100 | 110 fund11 | 10 | 11 fund111 | 1 | 1 which is wrong, it should be fund | base-level | total spent fund1 | 100 | 111 fund11 | 10 | 11 fund111 | 1 | 1 Test plan: - Create 1 budget and 3 funds with the same structure as above. - Create some orders and receive them (not all). - Go on the fund list view and verify the values are correct. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12168 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12168 --- Comment #9 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 28290 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=28290&action=edit [PASSED QA] Bug 12168: Add unit tests for GetBudgetHierarchySpent GetBudgetHierarchyOrdered Test plan: prove t/db_dependent/Budgets.t Note: This addition may sound overkill but I found this bug developping bug 12164 and I will reuse all of that. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12168 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |gmcharlt@gmail.com --- Comment #10 from Galen Charlton <gmcharlt@gmail.com> --- Pushed to master. Thanks, Jonathan! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12168 Fridolin SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=11714 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12168 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolyn.somers@biblibre.co | |m --- Comment #11 from Jonathan Druart <jonathan.druart@biblibre.com> --- *** Bug 11714 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org