[Bug 19293] New: Internal server error when receiving shipment with order with deleted biblio
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19293 Bug ID: 19293 Summary: Internal server error when receiving shipment with order with deleted biblio Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: aleisha@catalyst.net.nz QA Contact: testopia@bugs.koha-community.org To test: 1) Find or create a basket 2) Add an item to it 3) Find the record for that item in a separate tab, delete the record 4) Notice the order in the basket now says 'deleted bibliographic record' 5) close the basket and receive the shipment 6) After entering an invoice number and clicking next, you'll see the error: Can't call method "subscriptions" on an undefined value at /home/vagrant/kohaclone/acqui/parcel.pl line 245. Note that if you cancel the order, this error is not triggered and everything works as expected. -- 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=19293 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|NEW |Needs Signoff -- 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=19293 --- Comment #1 from Aleisha Amohia <aleisha@catalyst.net.nz> --- Created attachment 67070 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=67070&action=edit Bug 19293: Prevent error when receiving shipment with order with deleted biblio This patch checks if the biblio exists when receiving a shipment, and will skip the order if the biblio does not exist. To test: 1) Find or create a basket 2) Add TWO items to it 3) Find the record for one item in a separate tab, delete the record 4) Notice the order in the basket for that item now says 'deleted bibliographic record' 5) close the basket and receive the shipment 6) After entering an invoice number and clicking next, you'll see the error: Can't call method "subscriptions" on an undefined value at /home/vagrant/kohaclone/acqui/parcel.pl line 245. 7) Apply the patch and go back to the basket to receive the shipment 8) Put in an invoice number and click next 9) This should now work as expected, skipping the deleted biblio, and the other item should show as ready to receive Sponsored-by: Catalyst IT -- 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=19293 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Change sponsored?|--- |Sponsored Assignee|koha-bugs@lists.koha-commun |aleisha@catalyst.net.nz |ity.org | -- 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=19293 Dilan Johnpullé <dilan@calyx.net.au> 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=19293 Dilan Johnpullé <dilan@calyx.net.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #67070|0 |1 is obsolete| | --- Comment #2 from Dilan Johnpullé <dilan@calyx.net.au> --- Created attachment 67127 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=67127&action=edit Bug 19293: Prevent error when receiving shipment with order with deleted biblio Patch applies and works as described when test plan is followed. Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19293 --- Comment #3 from Lari Taskula <lari.taskula@jns.fi> --- Comment on attachment 67070 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=67070 Bug 19293: Prevent error when receiving shipment with order with deleted biblio Review of attachment 67070: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=19293&attachment=67070) ----------------------------------------------------------------- Test plan works, just some small thoughts for the patch. Also I noticed test plan was dropped from the commit message after the sign-off. ::: acqui/parcel.pl @@ +225,4 @@
for (my $i = 0 ; $i < $countpendings ; $i++) { my $order = $pendingorders->[$i];
+ unless( !defined $order->{biblionumber} ){ # if this biblio has been deleted and the orderline hasn't been cancelled
if ( defined $order->{biblionumber} ) { Or perhaps even next unless defined $order->{biblionumber}; to avoid having to fix indendation of 80+ lines below. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19293 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lari.taskula@jns.fi --- Comment #4 from Lari Taskula <lari.taskula@jns.fi> --- (In reply to Lari Taskula from comment #3)
Comment on attachment 67070 [details] [review] to avoid having to fix indendation of 80+ lines below. 40+ lines, sorry :)
-- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19293 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #67127|0 |1 is obsolete| | --- Comment #5 from Aleisha Amohia <aleisha@catalyst.net.nz> --- Created attachment 67624 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=67624&action=edit [SIGNED-OFF] Bug 19293: Prevent error when receiving shipment with order with deleted biblio This patch checks if the biblio exists when receiving a shipment, and will skip the order if the biblio does not exist. To test: 1) Find or create a basket 2) Add TWO items to it 3) Find the record for one item in a separate tab, delete the record 4) Notice the order in the basket for that item now says 'deleted bibliographic record' 5) close the basket and receive the shipment 6) After entering an invoice number and clicking next, you'll see the error: Can't call method "subscriptions" on an undefined value at /home/vagrant/kohaclone/acqui/parcel.pl line 245. 7) Apply the patch and go back to the basket to receive the shipment 8) Put in an invoice number and click next 9) This should now work as expected, skipping the deleted biblio, and the other item should show as ready to receive Sponsored-by: Catalyst IT Patch applies and works as described when test plan is followed. Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19293 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #67624|0 |1 is obsolete| | --- Comment #6 from Aleisha Amohia <aleisha@catalyst.net.nz> --- Created attachment 67625 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=67625&action=edit [SIGNED-OFF] Bug 19293: Prevent error when receiving shipment with order with deleted biblio This patch checks if the biblio exists when receiving a shipment, and will skip the order if the biblio does not exist. To test: 1) Find or create a basket 2) Add TWO items to it 3) Find the record for one item in a separate tab, delete the record 4) Notice the order in the basket for that item now says 'deleted bibliographic record' 5) close the basket and receive the shipment 6) After entering an invoice number and clicking next, you'll see the error: Can't call method "subscriptions" on an undefined value at /home/vagrant/kohaclone/acqui/parcel.pl line 245. 7) Apply the patch and go back to the basket to receive the shipment 8) Put in an invoice number and click next 9) This should now work as expected, skipping the deleted biblio, and the other item should show as ready to receive Sponsored-by: Catalyst IT Patch applies and works as described when test plan is followed. Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19293 --- Comment #7 from Aleisha Amohia <aleisha@catalyst.net.nz> --- (In reply to Lari Taskula from comment #3)
Comment on attachment 67070 [details] [review] Bug 19293: Prevent error when receiving shipment with order with deleted biblio
Review of attachment 67070 [details] [review]: -----------------------------------------------------------------
Test plan works, just some small thoughts for the patch. Also I noticed test plan was dropped from the commit message after the sign-off.
::: acqui/parcel.pl @@ +225,4 @@
for (my $i = 0 ; $i < $countpendings ; $i++) { my $order = $pendingorders->[$i];
+ unless( !defined $order->{biblionumber} ){ # if this biblio has been deleted and the orderline hasn't been cancelled
if ( defined $order->{biblionumber} ) {
Or perhaps even next unless defined $order->{biblionumber}; to avoid having to fix indendation of 80+ lines below.
There we go, changed the line to if ( defined $order->{biblionumber} ) { and put test plan back in commit message. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19293 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #67625|0 |1 is obsolete| | --- Comment #8 from Lari Taskula <lari.taskula@jns.fi> --- Created attachment 67839 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=67839&action=edit Bug 19293: Prevent error when receiving shipment with order with deleted biblio This patch checks if the biblio exists when receiving a shipment, and will skip the order if the biblio does not exist. To test: 1) Find or create a basket 2) Add TWO items to it 3) Find the record for one item in a separate tab, delete the record 4) Notice the order in the basket for that item now says 'deleted bibliographic record' 5) close the basket and receive the shipment 6) After entering an invoice number and clicking next, you'll see the error: Can't call method "subscriptions" on an undefined value at /home/vagrant/kohaclone/acqui/parcel.pl line 245. 7) Apply the patch and go back to the basket to receive the shipment 8) Put in an invoice number and click next 9) This should now work as expected, skipping the deleted biblio, and the other item should show as ready to receive Sponsored-by: Catalyst IT Patch applies and works as described when test plan is followed. Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au> Signed-off-by: Lari Taskula <lari.taskula@jns.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19293 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org Severity|enhancement |major -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19293 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |DUPLICATE Status|Signed Off |RESOLVED --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Fixed already by bug 19596. *** This bug has been marked as a duplicate of bug 19596 *** -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org