[Koha-bugs] [Bug 14237] Allow bibs to be added to course without items

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu May 6 15:47:22 CEST 2021


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jonathan.druart+koha at gmail.
                   |                            |com
             Status|Passed QA                   |Failed QA

--- Comment #40 from Jonathan Druart <jonathan.druart+koha at gmail.com> ---
I wanted to provide more tests because IMO this is lacking tests.

However I cannot, there is something wrong in the design, biblionumber cannot
be null, so:

0. Don't apply the patches
1. Create a course, add an item
2. Apply the patch, run updatedatabase:

Atomic update generated errors: {UNKNOWN}: DBI Exception: DBD::mysql::db do
failed: Cannot add or update a child row: a foreign key constraint fails
(`koha_kohadev`.`#sql-1_f9`, CONSTRAINT `fk_course_items_biblionumber` FOREIGN
KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON
UPDATE CASCADE) [for Statement " ALTER TABLE course_items ADD CONSTRAINT
`fk_course_items_biblionumber` FOREIGN KEY (`biblionumber`) REFERENCES `biblio`
(`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE "]  at
/usr/share/perl5/DBIx/Class/Schema.pm line 1118.

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


More information about the Koha-bugs mailing list