]> git.koha-community.org Git - koha.git/commit
Bug 32132: Do not allow NULL value in column aqbudgets.budget_period_id
authorEmmi Takkinen <emmi.takkinen@koha-suomi.fi>
Fri, 2 Feb 2024 07:02:59 +0000 (09:02 +0200)
committerKatrin Fischer <katrin.fischer@bsz-bw.de>
Fri, 19 Apr 2024 17:54:33 +0000 (19:54 +0200)
commitd5e54b584beda81458b04fd05b6519d45775324b
treef5326e751b8ee327fb5d056a624804ae3ecf4671
parent66ddaa01312d6f74262f840160ccd54207fb0baa
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@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
installer/data/mysql/atomicupdate/bug_32132.pl [new file with mode: 0755]
installer/data/mysql/kohastructure.sql
t/db_dependent/Koha/Acquisition/Fund.t