Bug 27828

Summary: New order from staged file is broken
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: AcquisitionsAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: critical    
Priority: P5 - low CC: andrewfh, fridolin.somers, hagud, hayleypelham, martin.renvoize, victor
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.05.00,20.11.04,20.05.10
Bug Depends on: 24469    
Bug Blocks:    
Attachments: Bug 27828: (bug 24469 follow-up) Add missing import
Bug 27828: (bug 24469 follow-up) Add missing import
Bug 27828: (bug 24469 follow-up) Add missing import

Description Jonathan Druart 2021-03-02 10:35:10 UTC
Caused by
  commit 03a9bdc851dcfe114c1676ac55def1e1c5d51970
  Bug 24469: Move the new queries to a dedicated ImportBatch subroutine


Undefined subroutine &CGI::Compile::ROOT::kohadevbox_koha_acqui_neworderempty_2epl::SetMatchedBiblionumber called at /kohadevbox/koha/acqui/neworderempty.pl line 183
Comment 1 Jonathan Druart 2021-03-02 10:38:12 UTC
Created attachment 117501 [details] [review]
Bug 27828: (bug 24469 follow-up) Add missing import

Caused by
  commit 03a9bdc851dcfe114c1676ac55def1e1c5d51970
  Bug 24469: Move the new queries to a dedicated ImportBatch subroutine

Undefined subroutine &CGI::Compile::ROOT::kohadevbox_koha_acqui_neworderempty_2epl::SetMatchedBiblionumber called at /kohadevbox/koha/acqui/neworderempty.pl line 183

Test plan:
Create a new order from a staged file, select "Add order" next to a
title
Comment 2 Fridolin Somers 2021-03-02 10:50:18 UTC
Created attachment 117503 [details] [review]
Bug 27828: (bug 24469 follow-up) Add missing import

Caused by
  commit 03a9bdc851dcfe114c1676ac55def1e1c5d51970
  Bug 24469: Move the new queries to a dedicated ImportBatch subroutine

Undefined subroutine &CGI::Compile::ROOT::kohadevbox_koha_acqui_neworderempty_2epl::SetMatchedBiblionumber called at /kohadevbox/koha/acqui/neworderempty.pl line 183

Test plan:
Create a new order from a staged file, select "Add order" next to a
title

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Comment 3 Andrew Fuerste-Henry 2021-03-02 12:57:01 UTC
Good catch! Just noting for anyone reading this bug because they've run into this error, it seems to be working fine if you use the checkboxes and Save button to add titles to your basket rather than clicking that Add Order link.
That said, I'd honestly never noticed that Add Order button, so I'm just assuming it does the same thing as checking the box for a title and saving your order that way.
Comment 4 Jonathan Druart 2021-03-02 13:45:34 UTC
(In reply to Andrew Fuerste-Henry from comment #3)
> Good catch! Just noting for anyone reading this bug because they've run into
> this error, it seems to be working fine if you use the checkboxes and Save
> button to add titles to your basket rather than clicking that Add Order link.
> That said, I'd honestly never noticed that Add Order button, so I'm just
> assuming it does the same thing as checking the box for a title and saving
> your order that way.

You can only use the link if there is a match, that's the difference between both  actions.
Comment 5 Martin Renvoize 2021-03-03 10:29:44 UTC
Created attachment 117559 [details] [review]
Bug 27828: (bug 24469 follow-up) Add missing import

Caused by
  commit 03a9bdc851dcfe114c1676ac55def1e1c5d51970
  Bug 24469: Move the new queries to a dedicated ImportBatch subroutine

Undefined subroutine &CGI::Compile::ROOT::kohadevbox_koha_acqui_neworderempty_2epl::SetMatchedBiblionumber called at /kohadevbox/koha/acqui/neworderempty.pl line 183

Test plan:
Create a new order from a staged file, select "Add order" next to a
title

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 6 Martin Renvoize 2021-03-03 10:30:05 UTC
Clear and simple fix, works as expected. Passing QA
Comment 7 Jonathan Druart 2021-03-03 10:59:48 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 8 Fridolin Somers 2021-03-04 12:18:40 UTC
Pushed to 20.11.x for 20.11.04
Comment 9 Jonathan Druart 2021-03-11 14:09:28 UTC
*** Bug 27913 has been marked as a duplicate of this bug. ***
Comment 10 Andrew Fuerste-Henry 2021-03-14 19:02:30 UTC
Pushed to 20.05.x for 20.05.10
Comment 11 Victor Grousset/tuxayo 2021-03-23 04:11:24 UTC
Missing dependencies for 19.11.x, not affected, no backport.
Comment 12 Andrew Fuerste-Henry 2021-04-05 19:59:23 UTC
Looks like bug 24469 also causes this error when populating your basket via z39.50, though this patch appears to fix that, too.