Bug 13005 - suggestions.budgetid should be NULL if not filled
Summary: suggestions.budgetid should be NULL if not filled
Status: RESOLVED DUPLICATE of bug 13007
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 12627
Blocks:
  Show dependency treegraph
 
Reported: 2014-09-29 13:35 UTC by Jonathan Druart
Modified: 2014-09-30 13:27 UTC (History)
0 users

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


Attachments
Bug 13005: suggestions.budgetid should be NULL if not filled (2.19 KB, patch)
2014-09-29 13:38 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 13005: suggestions.budgetid should be NULL if not filled - Unit tests (1.94 KB, patch)
2014-09-29 13:47 UTC, Jonathan Druart
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-09-29 13:35:32 UTC
If a suggestion is created or updated, the suggestions.budgetid DB field is set to 0.
It should be set to NULL.
Comment 1 Jonathan Druart 2014-09-29 13:38:56 UTC
Created attachment 31918 [details] [review]
Bug 13005: suggestions.budgetid should be NULL if not filled

On creating/updating a suggestion, the budgetid should be NULL or
contain a budgetid, but not '0'.

Test plan:
0/ Verify you have a suggestions.budgetid set to 0.
1/ Execute the updatedb entry and verify there is no budgetid==0
anymore.
2/ Create and update a suggestion selecting a fund and verify the
budgetid DB field is correctly filled.
3/ Create and update a suggestion without selecting a fund and verify the
budgetid DB field is set to NULL.
Comment 2 Jonathan Druart 2014-09-29 13:42:51 UTC
Note that this field should reference aqbudgets.budget_id.
Comment 3 Jonathan Druart 2014-09-29 13:47:47 UTC
Created attachment 31919 [details] [review]
Bug 13005: suggestions.budgetid should be NULL if not filled - Unit tests

prove t/db_dependent/Suggestions.t
should return green
Comment 4 Jonathan Druart 2014-09-30 13:26:44 UTC
Will be fixed by bug 13007.

*** This bug has been marked as a duplicate of bug 13007 ***