[Koha-bugs] [Bug 18276] Koha::Biblio - Remove GetBiblioFromItemNumber

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue May 9 17:14:39 CEST 2017


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18276

--- Comment #43 from Josef Moravec <josef.moravec at gmail.com> ---
Created attachment 63297
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63297&action=edit
[SIGNED-OFF] Bug 18276: Remove GetBiblioFromItemNumber - Easy ones

The subroutine C4::Biblio::GetBiblioFromItemNumber was wrong for several
reasons:
- badly named, we can get biblio info from a barcode
- SELECT * from items, biblio and biblioitems
makes things hard to follow and debug, we never know where do come from
the value we display
- sometimes called only for trivial information such as biblionumber,
author or title

This patchset suggests to replace it with calls to:
- Koha::Items->find for item's info
- $item->biblio for biblio's info
- $item->biblio->biblioitem for biblioitem's info

Test plan:
Item's info should correctly be displayed on the following pages:
- circulation history
- transfer book
- checkin
- waiting holds

QA will check the other changes reading the code, it's trivial

Signed-off-by: Josef Moravec <josef.moravec at gmail.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list