Koha/cataloguing
Jonathan Druart f466a856a9 Bug 18295: C4::Items - Remove get_itemnumbers_of
The code from scripts and subroutines using this subroutine was not very
elegant. Most of the time the code was unnecessarily complex.
This patch removes this subroutine and adapt the code to use
Koha::Items instead.

1. C4::Items::get_hostitemnumbers_of
I did not understand why the code was so complicated, it seems that we
only want to know if a given item has a given biblionumber
2. cataloguing/merge.pl
We want to retrieve the itemnumber for a given biblio.
We could also have done that with:
  Koha::Biblios->find( $biblionumber )->items;
3. labels/label-item-search.pl
We want to loop over the items for a given biblio, no need to use
get_itemnumbers_of and GetItemInfosOf.
We just need to use:
  Koha::Items->search({ biblionumber => $biblionumber })
4. reserve/request.pl
We want to retrieve the itemnumbers of the biblio's items
We could also have done that with:
  Koha::Biblios->find( $biblionumber )->items->get_column('itemnumber');

Test plan:
1.You need to create analytical record relationships (
EasyAnalyticalRecords needs to be set). Link an item to a biblio using
the 'Edit > Link to host item' menu from the biblio detail page.
From the staff interface place a hold on the biblio. You should see the
items from the biblio and the one you just linked
2. Merge two bibliographic records (with items), the resulting record
should contain items from both original records
3. Create a new label batch, edit it.
Add items to this batch ('Add items' button).
Fill the input with a barcode.
You should see all the items of a biblio.

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>
2017-06-05 11:43:16 -03:00
..
value_builder Bug 17233 - Add 008 value builder plugin for MARC21 classifications 2017-03-31 13:48:16 +00:00
addbiblio.pl Bug 17835: Replace GetItemTypes with Koha::ItemTypes 2017-04-14 10:43:51 -04:00
addbooks.pl Bug 15801: Koha::BiblioFrameworks - Remove C4::Koha::getframeworks 2016-10-28 12:04:59 +00:00
additem.pl Bug 18432 : Follow up - Updating to use they/them 2017-04-21 10:56:43 -04:00
editor.pl Bug 11559: (QA followup) fix several small issues 2015-10-27 12:25:01 -03:00
linkitem.pl Bug 15758: Koha::Libraries - Ultimate duel for C4::Branch 2016-09-08 14:36:04 +00:00
merge.pl Bug 18295: C4::Items - Remove get_itemnumbers_of 2017-06-05 11:43:16 -03:00
merge_ajax.pl Bug 14588: Simplify merge_ajax.pl 2015-08-21 10:21:39 -03:00
moveitem.pl Bug 15758: Koha::Libraries - Ultimate duel for C4::Branch 2016-09-08 14:36:04 +00:00
plugin_launcher.pl Bug 16154: CGI->multi_param - Force scalar context 2016-04-26 23:16:43 +00:00
ysearch.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
z3950_auth_search.pl Bug 16154: CGI->multi_param - Force scalar context 2016-04-26 23:16:43 +00:00
z3950_search.pl Bug 16154: CGI->multi_param - Declare a list 2016-04-26 23:16:42 +00:00