[Koha-bugs] [Bug 33403] New: Letters.t: Foreign key exception if you do not have a numberpattern with id=1

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Apr 4 15:13:48 CEST 2023


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

            Bug ID: 33403
           Summary: Letters.t: Foreign key exception if you do not have a
                    numberpattern with id=1
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P5 - low
         Component: Test Suite
          Assignee: chris at bigballofwax.co.nz
          Reporter: m.de.rooy at rijksmuseum.nl
        QA Contact: testopia at bugs.koha-community.org

Letters.t

$dbh->do(q|UPDATE subscription_numberpatterns SET numberingmethod='No. {X}'
WHERE id=1|);

t/db_dependent/Letters.t .. 51/85 DBIx::Class::Storage::DBI::_dbh_execute():
DBI Exception: DBD::mysql::st execute failed: Cannot add or update a child row:
a foreign key constraint fails (`koha_myclone`.`subscription`, CONSTRAINT
`subscription_ibfk_2` FOREIGN KEY (`numberpattern`) REFERENCES
`subscription_numberpatterns` (`id`) ON DELETE SET NULL ON UPDATE CASCADE) at
/usr/share/koha/Koha/Object.pm line 170

Hmm. You should have a record with id=1 in your table. This is bad.

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


More information about the Koha-bugs mailing list