This bug report will add new classes for: * Koha::Old::Patron[s] * Koha::Old::Biblio[s] * Koha::Old::Item[s] * Koha::Old::Biblioitem[s]
Created attachment 95954 [details] [review] Bug 24150: Add Koha::Old::*[s] This bug report will add new classes for: * Koha::Old::Patron[s] * Koha::Old::Biblio[s] * Koha::Old::Item[s] * Koha::Old::Biblioitem[s] Sponsored-by: Association KohaLa - https://koha-fr.org/
Created attachment 95955 [details] [review] Bug 24150: Add tests
Those classes will be used directly from bug 25151. Adding them on a separate bug report in case someone else needs them. There is no useful test plan apart from proving the new tests.
Created attachment 96266 [details] [review] Bug 24150: Add Koha::Old::*[s] This bug report will add new classes for: * Koha::Old::Patron[s] * Koha::Old::Biblio[s] * Koha::Old::Item[s] * Koha::Old::Biblioitem[s] Sponsored-by: Association KohaLa - https://koha-fr.org/ Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 96267 [details] [review] Bug 24150: Add tests Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 96268 [details] [review] Bug 24150: fix wrong semicolon Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 96428 [details] [review] Bug 24150: Add Koha::Old::*[s] This bug report will add new classes for: * Koha::Old::Patron[s] * Koha::Old::Biblio[s] * Koha::Old::Item[s] * Koha::Old::Biblioitem[s] Sponsored-by: Association KohaLa - https://koha-fr.org/ Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Squashed and Passing QA
Nice work everyone! Pushed to master for 20.05
Created attachment 96867 [details] [review] Bug 24150: Add missing koha_object[s]_class methods
Tests are failing with: koha_1 | # Failed test 'Testing Koha::Old::Patrons' koha_1 | # at t/db_dependent/TestBuilder.t line 397. koha_1 | # got: '' koha_1 | # expected: 'Koha::Old::Patron' koha_1 | koha_1 | # Failed test 'Module Koha::Old::Patrons should have koha_object[s]_class method if needed' koha_1 | # at t/db_dependent/TestBuilder.t line 399. koha_1 | # got: 'Can't call method "get_from_storage" on an undefined value at t/db_dependent/TestBuilder.t line 398. koha_1 | # ' koha_1 | # expected: '' koha_1 | # Looks like you failed 2 tests of 70. koha_1 | koha_1 | # Failed test 'Test all classes' koha_1 | # at t/db_dependent/TestBuilder.t line 409. koha_1 | # Looks like you planned 5 tests but ran 4. koha_1 | # Looks like you failed 1 test of 4 run. koha_1 | koha_1 | # Failed test 'build_object() tests' koha_1 | # at t/db_dependent/TestBuilder.t line 425. koha_1 | Can't call method "_result" on an undefined value at t/db_dependent/TestBuilder.t line 402. This patch is not enough to fix them, a PK is missing on deletedborrowers, I am going to fix that ASAP, certainly will need to open a new bug report to deal with that. Do not backport!
Created attachment 96871 [details] [review] Bug 24150: Add missing koha_object[s]_class methods and skip for deletedborrowers deletedborrowers does not have a PK, and adding it is out of the scope of this patchset. Indeed we will have to handle possible duplication of borrowernumber values, which does not seem trivial. Having bug 20271 in mind, we will have to deal with this problematic anyway later.
RMaints: we should not backport this patchset.
Created attachment 96897 [details] [review] Bug 24150: Prevent random failure comparing updated_on Jenkins is currently failing (slow server, datetime comparison, etc.) koha_1 | # Failed test at t/db_dependent/Koha/Old.t line 48. koha_1 | # Structures begin differing at: koha_1 | # $got->{updated_on} = '2020-01-07 14:15:22' koha_1 | # $expected->{updated_on} = '2020-01-07 14:15:21' koha_1 | # Looks like you failed 1 test of 1. koha_1 | koha_1 | # Failed test 'Koha::Old::Patrons' koha_1 | # at t/db_dependent/Koha/Old.t line 49. koha_1 | # Looks like you failed 1 test of 2. koha_1 | [14:15:22] t/db_dependent/Koha/Old.t ...............................................
Not backported to 19.11.x