[Koha-bugs] [Bug 32132] Missing budget_period_id in aqbudgets kills lateorders.pl

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Feb 16 16:38:23 CET 2024


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32132

Lucas Gass <lucas at bywatersolutions.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #162232|0                           |1
        is obsolete|                            |

--- Comment #8 from Lucas Gass <lucas at bywatersolutions.com> ---
Created attachment 162241
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=162241&action=edit
Bug 32132: Do not allow NULL value in column aqbudgets.budget_period_id

If budget_period_id column is set as NULL, "Late orders"
page dies on error 500. Logs read:

Template process failed: undef error - DBIC result _type isn't of the _type
Aqbudget at
/home/koha/Koha/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt
line 157

This patch makes changes to column aqbudgets.budget_period_id so that it
no longer allows NULL values. This is in line with aqbudgets tables foreign key
"budget_period_id" which has ON DELETE CASCADE clause.

To test:
1. Run prove t/db_dependent/Koha/Acquisition/Fund.t
=> Tests should fail
2. Run updatedatabase.pl and restart services if needed
3. Rerun prove t/db_dependent/Koha/Acquisition/Fund.t
=> Tests should now pass

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Lucas Gass <lucas at bywatersolutions.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list