Summary: | Koha::Account::Line->item should return undef if no item linked | ||
---|---|---|---|
Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
Component: | Architecture, internals, and plumbing | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Severity: | normal | ||
Priority: | P5 - low | CC: | fridolin.somers, lucas, martin.renvoize, nick, pierre-marc.thibault, tomascohen |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | 12001 | ||
Bug Blocks: | 19489 | ||
Attachments: |
Bug 22006: Add tests
Bug 22006: Handle undefined itemnumber for Koha::Account::Line->item Bug 22006: Add tests Bug 22006: Handle undefined itemnumber for Koha::Account::Line->item Bug 22006: Add tests Bug 22006: Handle undefined itemnumber for Koha::Account::Line->item |
Description
Jonathan Druart
2018-12-14 19:11:38 UTC
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 |