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: CLOSED FIXED
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:
Keywords:
: 19293 (view as bug list)
Depends on: 17631 18256
Blocks:
  Show dependency treegraph
 
Reported: 2017-11-08 17:53 UTC by Nick Clemens
Modified: 2019-10-14 19:57 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


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!
Comment 8 Jonathan Druart 2017-12-21 13:29:13 UTC
*** Bug 19293 has been marked as a duplicate of this bug. ***
Comment 9 Mason James 2018-01-31 02:40:11 UTC
(In reply to Jonathan Druart from comment #7)
> Pushed to master for 17.11, thanks to everybody involved!

Fridolin, can we get this backported to 17.05.x please :)
Comment 10 Mason James 2018-01-31 02:52:18 UTC
(In reply to Mason James from comment #9)
> (In reply to Jonathan Druart from comment #7)
> > Pushed to master for 17.11, thanks to everybody involved!
> 
> Fridolin, can we get this backported to 17.05.x please :)

fyi: it seems this patch can be skipped for 16.11.x
Comment 11 Fridolin Somers 2018-02-05 10:34:49 UTC
(In reply to Mason James from comment #10)
> (In reply to Mason James from comment #9)
> > (In reply to Jonathan Druart from comment #7)
> > > Pushed to master for 17.11, thanks to everybody involved!
> > 
> > Fridolin, can we get this backported to 17.05.x please :)
> 
> fyi: it seems this patch can be skipped for 16.11.x

Thanks for pointing this.
Pushed to 17.05.x for v17.05.09