Bug 19562 - Inventory: How can we skip convolutes marked as problematic with no_barcode?
Summary: Inventory: How can we skip convolutes marked as problematic with no_barcode?
Status: CLOSED WONTFIX
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Marcel de Rooy
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-02 09:31 UTC by Marcel de Rooy
Modified: 2018-04-06 08:04 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 19562: Do not mark convolute items without barcode as problematic (2.03 KB, patch)
2017-11-08 15:19 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel de Rooy 2017-11-02 09:31:41 UTC
We have two biblio records, but one item. It is a convolute, a bound set of actually two items. We added one item to each biblio, added Convolute in the item notes and gave the bound set one barcode recorded in one of the items.
When doing inventory and comparing with a barcode file, you can imagine that the item without the barcode (having the same callnumber as the item with the barcode) is reported as a problem (no_barcode).

A simple custom solution is:
$item->{problems}->{no_barcode} = 1 unless $item->{itemnotes} =~ /convolute/i;

Do you have any suggestions or ideas to resolve similar problems with convolutes, if you have them ? How do you record this situation ?
Comment 1 Marcel de Rooy 2017-11-02 12:09:44 UTC
(In reply to Marcel de Rooy from comment #0)
> A simple custom solution is:
> $item->{problems}->{no_barcode} = 1 unless $item->{itemnotes} =~
> /convolute/i;

This actually is too simple, since GetItemsForInventory does not return itemnotes. But you get the point.
Comment 2 Marcel de Rooy 2017-11-08 15:19:45 UTC
Created attachment 69030 [details] [review]
Bug 19562: Do not mark convolute items without barcode as problematic

Convolute items are bound together (belong to different biblio records)
and only one item has a barcode. All items are marked with a phrase like
Convolute (see regex below) in itemnotes.

This patch skips the convolute items without barcode and does not mark
them as problematic during inventory when the item notes contain the phrase.
The regex used is:
    $item->{itemnotes} =~ /convoluu?t/i;

This regex will cover at least the following languages:
Danish, Dutch, English, Finnish, French, Italian, Norwegian,
Portuguese, Spanish, Swedish and probably other languages too. And can
be easily extended if needed.

Note: Since the item hash does not contain itemnotes, we need to call
Koha::Items->find. We will only do so when the item does not have a
barcode.

Test plan:
[1] Update an item so that it has no barcode, callnumber is X and item
    notes contain Convolute.
[2] Upload a barcode file (contents may even be empty), filter on
    callnumber X. Compare should not report the updated convolute.
[3] Remove the Convolute note. Repeat step 2. Inventory should report
    the item now.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 3 Marcel de Rooy 2017-11-08 15:21:42 UTC
The solution marked before as 'custom' might on second thought be generalized enough to be selected for inclusion.
So my proposal submitted.
Feedback welcome.
Comment 4 Marcel de Rooy 2018-02-20 15:04:29 UTC
(In reply to Marcel de Rooy from comment #3)
> The solution marked before as 'custom' might on second thought be
> generalized enough to be selected for inclusion.
> So my proposal submitted.
> Feedback welcome.

No feedback. Closing this one.
I agree that the solution is arguable..
Still curious if other libraries use convolutes in Koha though.
Comment 5 Katrin Fischer 2018-04-01 10:47:59 UTC
In German it's slightly different: Konvolut.

I think having a proper solution in Koha for these kinds of items would be nice. EasyAnalytics is one way, but because of the way it uses fields in the record it's not usable in our union catalog setting.

We have implemented something for the OPAC using the notes fields to create linkings, here is an example:

https://bbf.bsz-bw.de/cgi-bin/koha/opac-detail.pl?biblionumber=22022

Note says: bound with... clicking on the search link brings up the other items, it's bound with and that have no barcode (in this case 1, but can be many). 

From the items without barcode a link leads back to the barcode item.

Links are created by putting ## callnumber or %% callnumber into the item notes, with the option to have specific notes before the separator.
Comment 6 Marcel de Rooy 2018-04-06 07:06:23 UTC
(In reply to Katrin Fischer from comment #5)
> In German it's slightly different: Konvolut.
> 
> I think having a proper solution in Koha for these kinds of items would be
> nice. EasyAnalytics is one way, but because of the way it uses fields in the
> record it's not usable in our union catalog setting.
> 
> We have implemented something for the OPAC using the notes fields to create
> linkings, here is an example:
> 
> https://bbf.bsz-bw.de/cgi-bin/koha/opac-detail.pl?biblionumber=22022
> 
> Note says: bound with... clicking on the search link brings up the other
> items, it's bound with and that have no barcode (in this case 1, but can be
> many). 
> 
> From the items without barcode a link leads back to the barcode item.
> 
> Links are created by putting ## callnumber or %% callnumber into the item
> notes, with the option to have specific notes before the separator.

Thx for the example, Katrin.
Comment 7 Katrin Fischer 2018-04-06 08:04:28 UTC
... forgot to say: the rest is jQuery. So this is a solution using only configuration options, if someone else is interested.