Bug 11675 - Budget amount is not checked if a parent exist
Summary: Budget amount is not checked if a parent exist
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low major (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-04 11:35 UTC by Jonathan Druart
Modified: 2015-06-04 23:30 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 11675: Budget total is not checked if a parent exists (2.00 KB, patch)
2014-02-04 11:37 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 11675: Budget total is not checked if a parent exists (2.05 KB, patch)
2014-02-14 15:35 UTC, Kyle M Hall
Details | Diff | Splinter Review
[PASSED QA] Bug 11675: Budget total is not checked if a parent exists (2.19 KB, patch)
2014-03-11 16:46 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2014-02-04 11:35:42 UTC

    
Comment 1 Jonathan Druart 2014-02-04 11:37:28 UTC Comment hidden (obsolete)
Comment 2 Kyle M Hall 2014-02-14 15:35:36 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2014-03-11 16:46:45 UTC
Created attachment 26130 [details] [review]
[PASSED QA] Bug 11675: Budget total is not checked if a parent exists

The sth is created before the query.
The query was modified after the sth creation and an error was raised.

Test plan:
0/ Don't apply the patch
1/ Create a budget A (amount=1000)
2/ Create a fund A1 (amount=1000)
3/ Create a child fund A11 (amount=1000)
4/ Edit A11 and change the amount to 2000
You are able to do it, an error appears in the Koha log:
  "check_parent_total.pl: DBD::mysql::st execute failed: called with 2 bind
  variables when 1 are needed"
5/ Apply the patch, edit A11 and save. You get an error
6/ Edit A11 and change the amount to <=1000
7/ Verify that there is no regression on adding/removing/editing budgets
and funds.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Works as described, no regressions found.
Comment 4 Galen Charlton 2014-03-11 17:10:36 UTC
Pushed to master.  Thanks, Jonathan!
Comment 5 Fridolin Somers 2014-05-27 16:00:49 UTC
Pushed to 3.14.x, will be in 3.14.07
Comment 6 Kyle M Hall 2014-06-06 13:57:38 UTC
Pushed to 3.12.x will be in 3.12.13