Bug 20303 - Receive order fails if no "authorised_by" value
Summary: Receive order fails if no "authorised_by" value
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low major (vote)
Assignee: Jonathan Druart
QA Contact: Josef Moravec
URL:
Keywords:
Depends on: 17829
Blocks:
  Show dependency treegraph
 
Reported: 2018-02-27 13:03 UTC by Barry Cannon
Modified: 2019-06-27 09:24 UTC (History)
4 users (show)

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


Attachments
Bug 20303: Do not explode when receiving an order if authorisedby not set (1.46 KB, patch)
2018-02-27 18:55 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 20303: Do not explode when receiving an order if authorisedby not set (1.51 KB, patch)
2018-03-07 20:36 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 20303: Do not explode when receiving an order if authorisedby not set (1.56 KB, patch)
2018-03-08 12:55 UTC, Josef Moravec
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Barry Cannon 2018-02-27 13:03:46 UTC
If there is no "authorised by" value on the order the "receive" option fails with 500 error. The file called is orderreceive.pl?ordernumber=1234&invoiceid=1234

orderreceive.pl should check if authorised_by exists before looking up patron information.
Comment 1 Jonathan Druart 2018-02-27 18:50:43 UTC
I guess this is caused by bug 17829.
Comment 2 Jonathan Druart 2018-02-27 18:55:00 UTC
Created attachment 72281 [details] [review]
Bug 20303: Do not explode when receiving an order if authorisedby not set
Comment 3 Jonathan Druart 2018-02-27 18:56:17 UTC
Barry, do you have more info about how it happens?

I guess it can happen on a very old DB (before aqbaskets.authorisedby) or if the librarian record has been deleted.
Comment 4 Barry Cannon 2018-02-28 13:01:28 UTC
Yes, this manifested itself after an upgrade from an older version so it could be that this might not be possible if starting acquisitions from current.
Comment 5 Mark Tompsett 2018-03-07 20:36:34 UTC
Created attachment 72522 [details] [review]
Bug 20303: Do not explode when receiving an order if authorisedby not set

Reproduced by deleting user and patron to notify before clicking Receive.
Patch works.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Comment 6 Josef Moravec 2018-03-08 12:55:25 UTC
Created attachment 72536 [details] [review]
Bug 20303: Do not explode when receiving an order if authorisedby not set

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 7 Nick Clemens 2018-03-15 09:21:11 UTC
Pushed to master for 18.05, thanks to all for your hard work.
Comment 8 Nick Clemens 2018-03-23 12:51:56 UTC
Awesome work all! Pushed to stable for 17.11.04
Comment 9 Fridolin Somers 2018-03-27 11:44:34 UTC
Not in 17.05.x since Bug 17829 not in it