The items are not issued if the patron category's type is 'X', used for statistics. koha_1 | # Failed test 'ISSUED_TO_ANOTHER question flag should be set if AutoReturnCheckedOutItems is disabled and item is checked out to another' koha_1 | # at t/db_dependent/Circulation.t line 1994. koha_1 | # got: undef koha_1 | # expected: '1' koha_1 | # Looks like you planned 2 tests but ran 1. koha_1 | # Looks like you failed 1 test of 1 run. koha_1 | koha_1 | # Failed test 'CanBookBeIssued + AutoReturnCheckedOutItems' koha_1 | # at t/db_dependent/Circulation.t line 2001. koha_1 | Can't call method "borrowernumber" on an undefined value at t/db_dependent/Circulation.t line 1998.
Created attachment 95524 [details] [review] Bug 24062: [DO NOT PUSH] Proof Only apply this patch and confirm the assumption is correct (test was failing because X was generated for the patron category's type)
Created attachment 95525 [details] [review] Bug 24062: Fix the failing test
Created attachment 95526 [details] [review] Bug 24062: Make sure TestBuilder will stop generate X or other invalid category's types To make sure this kind of random failures will not appear in a future we are going to fix it at TestBuilder level. Test plan: prove t/db_dependent/TestBuilder.t and confirm it returns green You could also only apply the tests against master, run them several times and confirm that they fail most of the time.
Created attachment 95541 [details] [review] Bug 24062: [DO NOT PUSH] Proof Only apply this patch and confirm the assumption is correct (test was failing because X was generated for the patron category's type) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 95542 [details] [review] Bug 24062: Fix the failing test Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 95543 [details] [review] Bug 24062: Make sure TestBuilder will stop generate X or other invalid category's types To make sure this kind of random failures will not appear in a future we are going to fix it at TestBuilder level. Test plan: prove t/db_dependent/TestBuilder.t and confirm it returns green You could also only apply the tests against master, run them several times and confirm that they fail most of the time. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nice fix, works as expected.. thanks Jonathan. Signed Off
Looking here now
Created attachment 95549 [details] [review] Bug 24062: Fix the failing test Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 95550 [details] [review] Bug 24062: Make sure TestBuilder will stop generate X or other invalid category's types To make sure this kind of random failures will not appear in a future we are going to fix it at TestBuilder level. Test plan: prove t/db_dependent/TestBuilder.t and confirm it returns green You could also only apply the tests against master, run them several times and confirm that they fail most of the time. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tric with the sub in gen_default has a slight hacky nature, but ok ;)
(In reply to Marcel de Rooy from comment #11) > Tric with the sub in gen_default has a slight hacky nature, but ok ;) I do not see it hacky but flexible however :) Any suggestions to improve it?
Nice work! Pushed to master for 19.11.00
Backported to 19.05.x branch for 19.05.12