Bug 19596 - Internal server error if open order with deleted biblio / null biblionumber
Summary: Internal server error if open order with deleted biblio / null biblionumber
Status: Pushed to Master
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: master
Hardware: All All
: P5 - low major (vote)
Assignee: Nick Clemens
QA Contact: Marcel de Rooy
URL:
Whiteboard:
Keywords:
Depends on: 17631 18256
Blocks:
  Show dependency treegraph
 
Reported: 2017-11-08 17:53 UTC by Nick Clemens
Modified: 2017-12-01 19:00 UTC (History)
3 users (show)

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


Attachments
Bug 19596 - Don't try to get hold or items count for non-existent biblios (1.25 KB, patch)
2017-11-08 17:56 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 19596 - Don't try to get hold or items count for non-existent biblios (1.38 KB, patch)
2017-11-08 21:42 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 19596 - Don't try to get hold or items count for non-existent biblios (1.38 KB, patch)
2017-11-21 05:07 UTC, Dilan Johnpullé
Details | Diff | Splinter Review
Bug 19596 - Don't try to get hold or items count for non-existent biblios (1.48 KB, patch)
2017-11-24 08:11 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 Nick Clemens 2017-11-08 17:53:39 UTC

    
Comment 1 Nick Clemens 2017-11-08 17:56:58 UTC
Created attachment 69043 [details] [review]
Bug 19596 - Don't try to get hold or items count for non-existent biblios

To test:
1 - Create some orders
2 - Delete the bibs (or NULL biblionumber from DB)
3 - Try to recieve some orders
4 - Internal server error
5 - Apply patch
6 - Things should work
Comment 2 Jonathan Druart 2017-11-08 18:26:30 UTC
Reading the changes, there is this line 2 lines before:
    my $cnt_subscriptions = $biblio->subscriptions->count;
I guess it will explode as well
Comment 3 Nick Clemens 2017-11-08 21:42:22 UTC
Created attachment 69047 [details] [review]
Bug 19596 - Don't try to get hold or items count for non-existent biblios

To test:
1 - Create some orders
2 - Delete the bibs (or NULL biblionumber from DB)
3 - Try to recieve some orders
4 - Internal server error
5 - Apply patch
6 - Things should work


Current status: Needs Signoff
Comment 4 Nick Clemens 2017-11-08 21:43:07 UTC
(In reply to Jonathan Druart from comment #2)
> Reading the changes, there is this line 2 lines before:
>     my $cnt_subscriptions = $biblio->subscriptions->count;
> I guess it will explode as well

Good call, I was debugging from 17.05 - the first patch without the added line will be needed there.
Comment 5 Dilan Johnpullé 2017-11-21 05:07:52 UTC
Created attachment 69242 [details] [review]
Bug 19596 - Don't try to get hold or items count for non-existent biblios

Patch applies and works as expected.
Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au>
Comment 6 Marcel de Rooy 2017-11-24 08:11:18 UTC
Created attachment 69328 [details] [review]
Bug 19596 - Don't try to get hold or items count for non-existent biblios

Patch applies and works as expected.

Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 7 Jonathan Druart 2017-11-26 16:26:39 UTC
Pushed to master for 17.11, thanks to everybody involved!