Bug 21184: (follow-up) Fix adding barcode to waiting hold item in SIP

Test plan:
1) Set up your SIP: https://wiki.koha-community.org/wiki/Koha_SIP2_server_setup
2) Run:
misc/sip_cli_emulator.pl -a localhost -p 6001 -su <login> -sp <passsword> -l <library_code> --patron <borrowernumber> -s "Y         " -m patron_information

the -s parameter says what kind of additional information you want to see

3) Check the response: if the requested patron has waiting hold, there
is field "AS" with the barcode of waiting item

The right response looks like this:
64              00120180817
052434000100000000000000000000AOCPL|AA1|AEKoha Admin|BLY|CC5|AS39999000004410|PCS|PIY|AFGreetings from Koha. |

More reading ;)
http://multimedia.3m.com/mws/media/355361O/sip2-protocol.pdf

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
Josef Moravec 2018-08-17 05:26:57 +00:00 committed by Nick Clemens
parent ff1557fef4
commit a42af28317

View file

@ -317,7 +317,7 @@ sub hold_items {
my $item_arr = $self->x_items('hold_items', @_);
foreach my $item (@{$item_arr}) {
my $item_obj = Koha::Items->find($item->{itemnumber});
$item_arr->{barcode} = $item_obj ? $item_obj->barcode : undef;
$item->{barcode} = $item_obj ? $item_obj->barcode : undef;
}
return $item_arr;
}