If there is no item linked to an account line, the ->item method should return undef. Now it explodes with: Carp::croak('DBIC result _type isn\'t of the _type Item') called at /home/vagrant/kohaclone/Koha/Object.pm line 102 Exists since the introduction of this method by bug 12001
Created attachment 83240 [details] [review] Bug 22006: Add tests
Created attachment 83241 [details] [review] Bug 22006: Handle undefined itemnumber for Koha::Account::Line->item If there is no item linked to an account line, the ->item method should return undef. Without this patch it explodes with: Carp::croak('DBIC result _type isn\'t of the _type Item') called at /home/vagrant/kohaclone/Koha/Object.pm line 102 Exists since the introduction of this method by bug 12001 Reported on bug 19489 comment 18. Test plan: prove t/db_dependent/Koha/Account/Lines.t must return green
Created attachment 83246 [details] [review] Bug 22006: Add tests Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Created attachment 83247 [details] [review] Bug 22006: Handle undefined itemnumber for Koha::Account::Line->item If there is no item linked to an account line, the ->item method should return undef. Without this patch it explodes with: Carp::croak('DBIC result _type isn\'t of the _type Item') called at /home/vagrant/kohaclone/Koha/Object.pm line 102 Exists since the introduction of this method by bug 12001 Reported on bug 19489 comment 18. Test plan: prove t/db_dependent/Koha/Account/Lines.t must return green Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Created attachment 84000 [details] [review] Bug 22006: Add tests Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 84001 [details] [review] Bug 22006: Handle undefined itemnumber for Koha::Account::Line->item If there is no item linked to an account line, the ->item method should return undef. Without this patch it explodes with: Carp::croak('DBIC result _type isn\'t of the _type Item') called at /home/vagrant/kohaclone/Koha/Object.pm line 102 Exists since the introduction of this method by bug 12001 Reported on bug 19489 comment 18. Test plan: prove t/db_dependent/Koha/Account/Lines.t must return green Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Awesome work all! Pushed to master for 19.05
Pushed to 18.11.x for 18.11.03
backported to 18.05 for 18.05.09
Depends on Bug 12001 not in 17.11.x