[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
Thu Feb 29 11:35:06 CET 2024


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

Jonathan Druart <jonathan.druart+koha at gmail.com> changed:

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

--- Comment #9 from Jonathan Druart <jonathan.druart+koha at gmail.com> ---
Created attachment 162584
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=162584&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>

Signed-off-by: Jonathan Druart <jonathan.druart at bugs.koha-community.org>

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


More information about the Koha-bugs mailing list