[Koha-bugs] [Bug 25081] new item for a received issue is (stochastically) not created

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Apr 8 11:47:44 CEST 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25081

Jonathan Druart <jonathan.druart at bugs.koha-community.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #102528|0                           |1
        is obsolete|                            |

--- Comment #3 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
Created attachment 102544
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=102544&action=edit
Bug 25081: Fix creation of new item for a received issue

The Bug 23435 introduced the idea of multiple copies added while
receiving a new issue.  Unfortunately, under some circumstances, it
causes no items being added at all.  It occurs stochastically, only
under some conditions.  But it is quite likely to happen while receiving
a supplemental issue.

The reason fot hist is that, in serials-edit.pl, line ca 292 and infra,
@num_copies is treated in the same way as @tags, while it should be
treated similarly to @bibnums.  It will be obvious after examining the
content of parameters tag, subfield, field_value, ..., number_of_copies.
In other words, for every edited issue number_of_copies is a scalar.

Nota bene:
a) beter to initialize $countdistinct with zero;
b) note that in master, now, before applying the patch,
$itemhash{$item}->{'num_copies'} is treated once as a scalar
and in the next line--as an array:

$itemhash{$item}->{'num_copies'} //= 1;

for (my $copy = 0; $copy < $itemhash{$item}->{'num_copies'}[$index];){

TEST PLAN
=========
1. Have a subscription with the option "Create an item
record when receiving this serial" active and try to receive a
supplemental issue.  Control that a new item under the biblio record
(usually) will not be created.
2. Apply the patch.
3. Repeat p. 1 -- a new item should be created.

Signed-off-by: Aleisha Amohia <aleishaamohia at hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart at bugs.koha-community.org>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list