[Bug 15244] New: t/db_dependent/Reserves.t fails with test 14
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15244 Bug ID: 15244 Summary: t/db_dependent/Reserves.t fails with test 14 Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: veron@veron.ch QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com Running t/db_dependent/Reserves.t results in: not ok 14 - for generous library, its items fill first hold request in line (bug 10272) # Failed test 'for generous library, its items fill first hold request in line (bug 10272)' # at t/db_dependent/Reserves.t line 284. # got: '276' # expected: '277' -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15244 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |15243 Referenced Bugs: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15243 [Bug 15243] Place a hold on... Fix display issue and improve translatability -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15244 Jesse Weaver <jweaver@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jweaver@bywatersolutions.co | |m --- Comment #1 from Jesse Weaver <jweaver@bywatersolutions.com> --- Cannot duplicate on latest master: [elf]:~/p/koha> prove t/db_dependent/Reserves.t -- [2015-12-01 09:12] ----------------------------------------------------------------------------------------------------------------------- t/db_dependent/Reserves.t .. 1/73 Subroutine C4::Context::userenv redefined at t/db_dependent/Reserves.t line 44. t/db_dependent/Reserves.t .. 2/73 C4::Context->userenv not defined! at /home/feoh3/p/koha/C4/Items.pm line 2336. t/db_dependent/Reserves.t .. ok All tests successful. Files=1, Tests=73, 3 wallclock secs ( 0.03 usr 0.00 sys + 1.34 cusr 0.06 csys = 1.43 CPU) Result: PASS That's even more worrisome, though. Marc, what's confusing to me is that borrower 277 shouldn't exist, from my reading of the test. $requestors{RPL} is the last borrower to be added. If this is reproducible, could you add in a: warn Dumper( GetMember( borrowernumber => $messages->{ResFound}->{borrowernumber} ) ); just before the failing test? -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15244 --- Comment #2 from Marc Véron <veron@veron.ch> --- With additional line 280: warn Dumper( GetMember( borrowernumber => $messages->{ResFound}->{borrowernumber} ) ); ...I get... ok 13 - restrictive library's items only fill requests by own patrons (bug 10272) $VAR1 = { 'category_type' => 'A', 'categorycode' => 'PT', 'B_address' => undef, 'ethnicity' => undef, 'contactnote' => undef, 'email' => undef, 'password' => '!', 'B_country' => undef, 'borrowernumber' => '267', 'branchcode' => 'CPL', 'lost' => undef, 'description' => 'Erwachsener', 'streettype' => undef, 'altcontactaddress3' => undef, 'contactfirstname' => undef, 'title' => undef, 'ethnotes' => undef, 'relationship' => undef, 'mobile' => undef, 'fax' => undef, 'primary_contact_method' => undef, 'altcontactphone' => undef, 'contactname' => undef, 'country' => undef, 'dateenrolled' => '2015-11-25', 'altcontactstate' => undef, 'guarantorid' => undef, 'address2' => undef, 'borrowernotes' => undef, 'dateexpiry' => '2016-11-25', 'sort2' => undef, 'contacttitle' => undef, 'phonepro' => undef, 'smsalertnumber' => undef, 'B_streetnumber' => undef, 'emailpro' => undef, 'altcontactcountry' => undef, 'firstname' => undef, 'gonenoaddress' => undef, 'othernames' => undef, 'dateofbirth' => undef, 'state' => undef, 'altcontactaddress2' => undef, 'B_streettype' => undef, 'debarred' => undef, 'B_state' => undef, 'B_address2' => undef, 'address' => '', 'privacy' => '1', 'streetnumber' => undef, 'surname' => 'borrower from CPL', 'cardnumber' => undef, 'altcontactsurname' => undef, 'altcontactzipcode' => undef, 'altcontactfirstname' => undef, 'opacnote' => undef, 'userid' => 'borrowerfromcpl', 'B_zipcode' => undef, 'B_email' => undef, 'city' => '', 'B_phone' => undef, 'debarredcomment' => undef, 'initials' => undef, 'sort1' => undef, 'flags' => undef, 'zipcode' => undef, 'phone' => undef, 'sex' => undef, 'altcontactaddress1' => undef, 'B_city' => undef }; not ok 14 - for generous library, its items fill first hold request in line (bug 10272) # Failed test 'for generous library, its items fill first hold request in line (bug 10272)' -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15244 --- Comment #3 from Marc Véron <veron@veron.ch> --- If I dump $messages (line 284) (undef, $messages, undef, undef) = AddReturn('bug10272_FPL', 'FPL'); warn Dumper( $messages ); ...I get...: $VAR1 = { 'NotIssued' => 'bug10272_FPL', 'ResFound' => { 'itemnumber' => '295', 'priority' => 2, 'reservenotes' => '', 'ResFound' => 'Reserved', 'reservedate' => '2015-12-01', 'found' => undef, 'timestamp' => '2015-12-01 18:04:24', 'biblionumber' => '45049', 'waitingdate' => undef, 'cancellationdate' => undef, 'reserve_id' => '151', 'borrowernumber' => '276', 'branchcode' => 'FPL' } }; That means that the item was not issued? - Test expects 'ResFound' -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15244 --- Comment #4 from Marc Véron <veron@veron.ch> --- Ok previous comment was a mistake. I added the following after AddReturn (line 285): warn Dumper( $messages ); warn Dumper ($messages->{ResFound}->{borrowernumber}); warn Dumper ($requesters{'RPL'}); And I get: $VAR1 = { 'NotIssued' => 'bug10272_FPL', 'ResFound' => { 'itemnumber' => '301', 'priority' => 2, 'reservenotes' => '', 'ResFound' => 'Reserved', 'reservedate' => '2015-12-01', 'found' => undef, 'timestamp' => '2015-12-01 18:25:57', 'biblionumber' => '45053', 'waitingdate' => undef, 'cancellationdate' => undef, 'reserve_id' => '203', 'borrowernumber' => '292', 'branchcode' => 'FPL' } }; $VAR1 = '292'; $VAR1 = '293'; ...and for the next run it is $VAR1 = '300'; $VAR1 = '301'; Hmm, is the database not properly reset after the tests? The borrower numbers increase with every run. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15244 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com --- Comment #5 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Marc Véron from comment #4)
$VAR1 = '292'; $VAR1 = '293';
...and for the next run it is $VAR1 = '300'; $VAR1 = '301';
Hmm, is the database not properly reset after the tests? The borrower numbers increase with every run.
That's because the rollback is not resetting the AUTO_INCREMENT fields counter. MySQL behaviour. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15244 --- Comment #6 from Marc Véron <veron@veron.ch> --- Found after systematically switching sysprefs: Syspref LocalHoldsPriority was set to "[Give] priority for filling holds to patrons whose... If I set it to [Don't give] the test passes OK. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15244 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|t/db_dependent/Reserves.t |Fix failing test 14 in |fails with test 14 |t/db_dependent/Reserves.t -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15244 --- Comment #7 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Maybe the bug could be named "t/db_dependent/Reserves.t depends on external data/configuration" as the problem here is that the test doesn't set its needed variables before running. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15244 --- Comment #8 from Marc Véron <veron@veron.ch> --- Created attachment 45286 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45286&action=edit Bug 15244: Fix failing test 14 in t/db_dependent/Reserves.t Test 14 in t/db_dependent/Reserves.t fails if syspref LocalHoldsPriority is set to "[Give] priority for filling holds to patrons whose... To verify: - Set syspref as above and run test. Test 14 fails. - Set syspref to [Don't give] and run test agein, it passes OK. To test: - Apply patch - Run test again with syspref set / not set Expected result: In both cases test should pass -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15244 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Fix failing test 14 in |t/db_dependent/Reserves.t |t/db_dependent/Reserves.t |depends on external | |data/configuration -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15244 --- Comment #9 from Marc Véron <veron@veron.ch> --- Created attachment 45287 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45287&action=edit Bug 15244: t/db_dependent/Reserves.t depends on external data/configuration Test 14 in t/db_dependent/Reserves.t fails if syspref LocalHoldsPriority is set to "[Give] priority for filling holds to patrons whose... To verify: - Set syspref as above and run test. Test 14 fails. - Set syspref to [Don't give] and run test agein, it passes OK. To test: - Apply patch - Run test again with syspref set / not set Expected result: In both cases test should pass (AMended to change bug title) -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15244 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #45286|0 |1 is obsolete| | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15244 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|NEW |Needs Signoff Assignee|koha-bugs@lists.koha-commun |veron@veron.ch |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15244 --- Comment #10 from Marc Véron <veron@veron.ch> --- Created attachment 45291 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45291&action=edit Bug 15243 - Place a hold on... Fix display issue and improve translatability This patch fixes strings in request.tt that are untranslatable because of splitting by html tags inside the strings. Additionally, the value of maxreserves was used in one string, but not filled in every case. That's why the patch introduces a new function GetAllowedReserves in C4/Reserves.pm to retrieve the maximum count of allowed reserves (depending on syspref maxreserves and on issuingrules). To test: - If not yet done, apply patch from Bug 15244 - Run t/db_dependent/Reserves.t, verify that it passes OK - Apply this patch - Run t/db_dependent/Reserves.t again, should pass OK - Set syspref 'maxreserves' to 1 - Try to place a hold for a patron who already has holds - Verify that the warning message displays the value above - Set the syspref to a high value - Try to place a hold for a patron who has reached the maximum allowed holds defined by issuing rules - Verify that the warning message with the maximum number of holds allowed by issuing rules - Try to trigger other warning messages and/or carefully review code in request.tt line 307 and following. Additonal messages to trigger are: - Already in possession - Hold already placed - Age restricted - No items available - Too many holds -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15244 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #45291|0 |1 is obsolete| | --- Comment #11 from Marc Véron <veron@veron.ch> --- Comment on attachment 45291 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45291 Bug 15243 - Place a hold on... Fix display issue and improve translatability Sorry, mistaked with bug number... -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15244 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15244 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #45287|0 |1 is obsolete| | --- Comment #12 from Galen Charlton <gmcharlt@gmail.com> --- Created attachment 45431 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45431&action=edit Bug 15244: t/db_dependent/Reserves.t depends on external data/configuration Test 14 in t/db_dependent/Reserves.t fails if syspref LocalHoldsPriority is set to "[Give] priority for filling holds to patrons whose... To verify: - Set syspref as above and run test. Test 14 fails. - Set syspref to [Don't give] and run test agein, it passes OK. To test: - Apply patch - Run test again with syspref set / not set Expected result: In both cases test should pass (AMended to change bug title) Signed-off-by: Galen Charlton <gmcharlt@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15244 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15244 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #45431|0 |1 is obsolete| | --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 45437 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45437&action=edit [PASSED QA] Bug 15244: t/db_dependent/Reserves.t depends on external data/configuration Test 14 in t/db_dependent/Reserves.t fails if syspref LocalHoldsPriority is set to "[Give] priority for filling holds to patrons whose... To verify: - Set syspref as above and run test. Test 14 fails. - Set syspref to [Don't give] and run test agein, it passes OK. To test: - Apply patch - Run test again with syspref set / not set Expected result: In both cases test should pass (AMended to change bug title) Signed-off-by: Galen Charlton <gmcharlt@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15244 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |kyle@bywatersolutions.com --- Comment #14 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to master! Thanks Marc! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15244 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |julian.maurice@biblibre.com Status|Pushed to Master |Pushed to Stable --- Comment #15 from Julian Maurice <julian.maurice@biblibre.com> --- Patch pushed to 3.22.x, will be in 3.22.1 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15244 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |frederic@tamil.fr --- Comment #16 from Frédéric Demians <frederic@tamil.fr> --- This patch has been pushed to 3.20.x, will be in 3.20.7. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org