Bug 13005

Summary: suggestions.budgetid should be NULL if not filled
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Architecture, internals, and plumbingAssignee: Jonathan Druart <jonathan.druart>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low    
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 12627    
Bug Blocks:    
Attachments: Bug 13005: suggestions.budgetid should be NULL if not filled
Bug 13005: suggestions.budgetid should be NULL if not filled - Unit tests

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 ***