| Summary: | SIP/ILS/Item missing title | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Stefan Berndtsson <stefan.berndtsson> |
| Component: | SIP2 | Assignee: | 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, m.de.rooy |
| Version: | Main | ||
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Crowdfunding goal: | 0 |
| Patch complexity: | Trivial patch | Documentation contact: | |
| Documentation submission: | Text to go in the release notes: | ||
| Version(s) released in: | Circulation function: | ||
| 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 |
||
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. 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.
Created attachment 69303 [details] [review] [PATCH] Bug 19651 - SIP/ILS/Item missing title Signed-off-by: Benjamin Rokseth <bensinober@gmail.com> 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. 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. Patch pushed to Master! Thanks Stephan and congrats for your first patch in! |
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.