[Bug 25531] New: Patron may not be debarred if backdated return
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25531 Bug ID: 25531 Summary: Patron may not be debarred if backdated return Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: ASSIGNED Severity: major Priority: P5 - low Component: Circulation Assignee: jonathan.druart@bugs.koha-community.org Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com This has been caught by a test failing randomly: 15:41:14 koha_1 | # Failed test 'AddReturn must have debarred the patron' 15:41:14 koha_1 | # at t/db_dependent/Circulation.t line 88. 15:41:14 koha_1 | # got: '' 15:41:14 koha_1 | # expected: '1' 15:41:14 koha_1 | # AddReturn returned message $VAR1 = { 15:41:14 koha_1 | # 'WasReturned' => 1 15:41:14 koha_1 | # }; 15:41:14 koha_1 | 15:41:14 koha_1 | # Failed test 'Test at line 2282' 15:41:14 koha_1 | # at t/db_dependent/Circulation.t line 92. 15:41:14 koha_1 | # got: '0' 15:41:14 koha_1 | # expected: '1' 15:41:14 koha_1 | 15:41:14 koha_1 | # Failed test 'Test at line 2282' 15:41:14 koha_1 | # at t/db_dependent/Circulation.t line 95. 15:41:14 koha_1 | # got: undef 15:41:14 koha_1 | # expected: '2020-06-01' 15:41:14 koha_1 | # Looks like you failed 3 tests of 21. 15:41:14 koha_1 | 15:41:14 koha_1 | # Failed test 'AddReturn + suspension_chargeperiod' 15:41:14 koha_1 | # at t/db_dependent/Circulation.t line 2291. 15:41:28 koha_1 | # Looks like you failed 1 test of 48. 15:41:28 koha_1 | [13:41:28] t/db_dependent/Circulation.t To know if an issue is overdue, we compared it with today. But we should compare it with the return date is provided -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25531 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25531 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 105030 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105030&action=edit Bug 25531: Add tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25531 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 105031 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105031&action=edit Bug 25531: Debar patron if needed when checkin is backdated If think this case does not apply to real-life, but the logic needs to be fixed. If an item is due now, and AddReturn is called now with a return date in the future, the issue is overdue and the patron must be debarred. However it is not as we compare with now and not the return date -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25531 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25531 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net --- Comment #3 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Shouldn't the test fail when the implementation isn't applied? My plan was - apply 1st patch (test) - run => fail - apply second patch (fix) - run => ok -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25531 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #105030|0 |1 is obsolete| | --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 105064 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105064&action=edit Bug 25531: Add tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25531 --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Victor Grousset/tuxayo from comment #3)
Shouldn't the test fail when the implementation isn't applied? My plan was - apply 1st patch (test) - run => fail - apply second patch (fix) - run => ok
Hum yes, it should, and it did for me twice in a row yesterday and assumed it was *always*. Now the adjusted test should fail on each run. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25531 --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Original failure appeared again, Master_U18 #791 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25531 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #105064|0 |1 is obsolete| | --- Comment #7 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 105096 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105096&action=edit Bug 25531: Add tests Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25531 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #105031|0 |1 is obsolete| | --- Comment #8 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 105097 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105097&action=edit Bug 25531: Debar patron if needed when checkin is backdated If think this case does not apply to real-life, but the logic needs to be fixed. If an item is due now, and AddReturn is called now with a return date in the future, the issue is overdue and the patron must be debarred. However it is not as we compare with now and not the return date Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25531 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #9 from Victor Grousset/tuxayo <victor@tuxayo.net> --- It works :D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25531 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |nick@bywatersolutions.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25531 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #105096|0 |1 is obsolete| | --- Comment #10 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 105102 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105102&action=edit Bug 25531: Add tests Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25531 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #105097|0 |1 is obsolete| | --- Comment #11 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 105103 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105103&action=edit Bug 25531: Debar patron if needed when checkin is backdated If think this case does not apply to real-life, but the logic needs to be fixed. If an item is due now, and AddReturn is called now with a return date in the future, the issue is overdue and the patron must be debarred. However it is not as we compare with now and not the return date Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25531 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |martin.renvoize@ptfs-europe | |.com --- Comment #12 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- I agree the test is a little 'unreal', but the logic is sound and the fix seems sound. Passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25531 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |20.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25531 --- Comment #13 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work everyone! Pushed to master for 20.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25531 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |25551 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25551 [Bug 25551] [OMNIBUS] Some tests are failing randomly -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25531 Joy Nelson <joy@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |joy@bywatersolutions.com --- Comment #14 from Joy Nelson <joy@bywatersolutions.com> --- tests do not pass on 19.11.x FAIL valid Global symbol "$now" requires explicit package name (did you forget to declare "my $now"?) Global symbol "$now" requires explicit package name (did you forget to declare "my $now"?) Global symbol "$now" requires explicit package name (did you forget to declare "my $now"?) t/db_dependent/Circulation.t had compilation errors. Not backported to 19.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25531 --- Comment #15 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 105168 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105168&action=edit Bug 24881: [19.11.x] Try to fix random failure from Circulation.t This is a follow-up of bug 22917. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25531 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #105168|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25531 --- Comment #16 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Joy Nelson from comment #14)
tests do not pass on 19.11.x FAIL valid Global symbol "$now" requires explicit package name (did you forget to declare "my $now"?) Global symbol "$now" requires explicit package name (did you forget to declare "my $now"?) Global symbol "$now" requires explicit package name (did you forget to declare "my $now"?) t/db_dependent/Circulation.t had compilation errors.
Not backported to 19.11.x
Hi Joy, I attached a patch for 19.11.x on bug 24881. The tests should pass after you applied it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25531 Joy Nelson <joy@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|20.05.00 |20.05.00, 19.11.06 released in| | --- Comment #17 from Joy Nelson <joy@bywatersolutions.com> --- pushed to 19.11.x for 19.11.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25531 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25531 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|20.05.00, 19.11.06 |20.05.00, 19.11.06, released in| |19.05.12 Status|Pushed to oldstable |Pushed to oldoldstable --- Comment #18 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Backported to 19.05.x branch for 19.05.12 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org