Bug 19293 - Internal server error when receiving shipment with order with deleted biblio
Summary: Internal server error when receiving shipment with order with deleted biblio
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Aleisha Amohia
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-12 05:15 UTC by Aleisha Amohia
Modified: 2017-09-14 01:34 UTC (History)
0 users

See Also:
Change sponsored?: Sponsored
Patch complexity: Small patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 19293: Prevent error when receiving shipment with order with deleted biblio (6.49 KB, patch)
2017-09-12 05:18 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19293: Prevent error when receiving shipment with order with deleted biblio (5.89 KB, patch)
2017-09-14 01:34 UTC, Dilan Johnpullé
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Aleisha Amohia 2017-09-12 05:15:22 UTC
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.
Comment 1 Aleisha Amohia 2017-09-12 05:18:05 UTC
Created attachment 67070 [details] [review]
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
Comment 2 Dilan Johnpullé 2017-09-14 01:34:35 UTC
Created attachment 67127 [details] [review]
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>