]> git.koha-community.org Git - koha.git/commit
Bug 18276: Remove GetBiblioFromItemNumber - Easy ones
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 15 Mar 2017 19:02:38 +0000 (16:02 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 10 Jul 2017 15:22:29 +0000 (12:22 -0300)
commit6eade474ed3a84a5ba372a26ac27bf9fb4bd2299
tree60996ff0e922938b7460650bc1c003b5c5b01e23
parent1544f9a5d4a8acd47c97d7c6ac55dee8e759d3ff
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@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
17 files changed:
C4/Circulation.pm
C4/Members.pm
C4/SIP/ILS/Item.pm
C4/SIP/ILS/Transaction/Hold.pm
catalogue/issuehistory.pl
cataloguing/moveitem.pl
circ/branchtransfers.pl
circ/returns.pl
circ/transferstoreceive.pl
circ/waitingreserves.pl
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/moveitem.tt
misc/cronjobs/advance_notices.pl
offline_circ/enqueue_koc.pl
offline_circ/list.pl
offline_circ/process_koc.pl
opac/opac-shelves.pl
virtualshelves/shelves.pl