Bug 19651

Summary: SIP/ILS/Item missing title
Product: Koha Reporter: Stefan Berndtsson <stefan.berndtsson>
Component: SIP2Assignee: Stefan Berndtsson <stefan.berndtsson>
Status: CLOSED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: critical    
Priority: P5 - low CC: benjamin.rokseth, colin.campbell, fridolin.somers, jonathan.druart, katrin.fischer, m.de.rooy
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 18276    
Bug Blocks:    
Attachments: Add title and author from biblio to SIP/ILS/Item.pm
[PATCH] Bug 19651 - SIP/ILS/Item missing title
Bug 19651: SIP/ILS/Item misses title and author

Description Stefan Berndtsson 2017-11-20 11:47:46 UTC
In 17.05 of C4/SIP/ILS/Item.pm (sub new) $item is fetched via GetBiblioFromItemNumber(). I assume this means that "title" was available as a property on the $item object.

In master however, $item is fetched using Koha::Item->find() which means it is a pure Item object, and does not contain biblio data. $item->{title} is therefor lost.

The "title" property has to be reinserted from $biblio explicitly. Looking at the %fields hash in the same file, "author" is probably another field that needs fixing too.
Comment 1 Stefan Berndtsson 2017-11-23 12:10:48 UTC
Created attachment 69302 [details] [review]
Add title and author from biblio to SIP/ILS/Item.pm

Adding title and author manually lite this is a simple fix that solves the problem.
Comment 2 Benjamin Rokseth 2017-11-23 13:05:21 UTC
We Oslo Public Library can confirm this is an issue. 
Problem is that $item->unblessed overloads $self, and thus no $self->{author} or $self->{title} as was in GetBiblioFromItemnumber.

This solution is a workaround, probably needs rework, and tests, later. But since release 17.11 is so close, and it will break any Item information response and probably any self checkout device, I propose this be added as is.
Comment 3 Benjamin Rokseth 2017-11-23 13:49:21 UTC
Created attachment 69303 [details] [review]
[PATCH] Bug 19651 - SIP/ILS/Item missing title

Signed-off-by: Benjamin Rokseth <bensinober@gmail.com>
Comment 4 Benjamin Rokseth 2017-11-23 13:55:45 UTC
Took the liberty of adding git bz required info to your patch. It is needed for using git bz (https://wiki.koha-community.org/wiki/Git_bz_configuration) which Koha community uses for bugtracking.

Basically it is email version of git issues, very old and tedioius, but this is what is used.
Comment 5 Marcel de Rooy 2017-11-24 07:10:43 UTC
Created attachment 69327 [details] [review]
Bug 19651: SIP/ILS/Item misses title and author

Signed-off-by: Benjamin Rokseth <bensinober@gmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended $item->biblio by $biblio.
Comment 6 Jonathan Druart 2017-11-26 16:05:19 UTC
Caused by bug 18276.
Comment 7 Jonathan Druart 2017-11-26 16:26:25 UTC
Patch pushed to Master!
Thanks Stephan and congrats for your first patch in!
Comment 8 Fridolin Somers 2017-12-11 08:04:28 UTC
Bug 18276 not in 17.05.x