[Bug 25081] New: new item for a received issue is (stochastically) not created
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25081 Bug ID: 25081 Summary: new item for a received issue is (stochastically) not created Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Serials Assignee: koha-bugs@lists.koha-community.org Reporter: januszop@gmail.com QA Contact: testopia@bugs.koha-community.org CC: colin.campbell@ptfs-europe.com 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. So, to reproduce, 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. (Sometimes it occurs also while receiving back issues). 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. A patch will follow. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25081 Janusz Kaczmarek <januszop@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aleisha@catalyst.net.nz -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25081 Janusz Kaczmarek <januszop@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|koha-bugs@lists.koha-commun |januszop@gmail.com |ity.org | --- Comment #1 from Janusz Kaczmarek <januszop@gmail.com> --- Created attachment 102527 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=102527&action=edit Bug 25081 - new item for a received issue is (stochastically) not created 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. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25081 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25081 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #102527|0 |1 is obsolete| | --- Comment #2 from Aleisha Amohia <aleisha@catalyst.net.nz> --- Created attachment 102528 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=102528&action=edit Bug 25081 - new item for a received issue is (stochastically) not created 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@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25081 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |23435 CC| |jonathan.druart@bugs.koha-c | |ommunity.org Severity|normal |major Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23435 [Bug 23435] Add multiple copies of an item when receiving in serials -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25081 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25081 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #102528|0 |1 is obsolete| | --- Comment #3 from Jonathan Druart <jonathan.druart@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@hotmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25081 --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 102545 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=102545&action=edit Bug 25081: Fix wrong comment Not directly related to previous patch, coming from 23435. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25081 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |20.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25081 --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work everyone! Pushed to master for 20.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25081 --- Comment #6 from Janusz Kaczmarek <januszop@gmail.com> --- (In reply to Martin Renvoize from comment #5)
Nice work everyone!
Pushed to master for 20.05
I would suggest pushing it to 19.11.XX as well since 19.11 is affected. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25081 Joy Nelson <joy@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |joy@bywatersolutions.com Status|Pushed to master |Pushed to stable Version(s)|20.05.00 |20.05.00, 19.11.06 released in| | --- Comment #7 from Joy Nelson <joy@bywatersolutions.com> --- backported to 19.11.x for 19.11.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25081 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Status|Pushed to stable |RESOLVED Resolution|--- |FIXED --- Comment #8 from Lucas Gass <lucas@bywatersolutions.com> --- missing dependencies for 19.05.x, no backport -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org