https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36160 Bug ID: 36160 Summary: Use $builder->build_object when creating patrons in Circulation.t Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Test Suite Assignee: chris@bigballofwax.co.nz Reporter: glasklas@gmail.com QA Contact: testopia@bugs.koha-community.org Since Patron::update_lastseen was introduced in Bug 15504 circulation tests can protentially crash with: "Invalid value passed, borrowers.updated_on=SCALAR(0x564a85c3e9b0) expected type is datetime" depending of the value of TrackLastPatronActivityTriggers. This probably does not happen on a fresh Koha installation, but did when I ran the tests locally with "Renew an item" activated for TrackLastPatronActivityTriggers. The reason is that in the Circulation.t tests patron objects are created through Koha::Patron->new instead of using the builder object, and $self->lastseen($now)->store; is called in update_lastseen, on an object that does not have a valid updated_on, resulting in an invalid default value being assigned inKoha/Schema/Loader/mysql.pm. Possible added future test might also crash if resulting in these patron objects being updated. This patch fixes this issue, the tests still fail for other reasons: # Failed test 'transferbook tests' # at t/db_dependent/Circulation.t line 5769. Exception 'Koha::Exceptions::MissingParameter' thrown 'The to parameter is mandatory' But will create another issue for this if not due to some strange local issues. -- You are receiving this mail because: You are watching all bug changes.