Bug 28103 - Barcode fails when adding item during order receive
Summary: Barcode fails when adding item during order receive
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
: 10890 (view as bug list)
Depends on:
Blocks: 37854
  Show dependency treegraph
 
Reported: 2021-04-07 03:20 UTC by David Cook
Modified: 2024-09-06 01:12 UTC (History)
4 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:
21.05.00,20.11.05,20.05.11
Circulation function:


Attachments
Bug 28103: Fix barcode plugin on the order receive view (1.60 KB, patch)
2021-04-09 10:00 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28103: Fix barcode plugin on the order receive view (1.65 KB, patch)
2021-04-09 12:38 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 28103: Fix barcode plugin on the order receive view (1.71 KB, patch)
2021-04-15 18:37 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description David Cook 2021-04-07 03:20:29 UTC
Set "AcqCreateItem" to "receiving an order"
Set "autoBarcode" to "generated in the form <branchcode>yymm0001"

Create an order and go to receive it at a path like /cgi-bin/koha/acqui/orderreceive.pl?ordernumber=2&invoiceid=1

When you try to generate a barcode, you should get a Javascript error like this in the console:

Uncaught TypeError: Cannot read property 'field_value' of null

It's because the form can't be selected by the Javascript written in C4/Barcodes/ValueBuilder.pm
Comment 1 Jonathan Druart 2021-04-09 10:00:09 UTC
Created attachment 119368 [details] [review]
Bug 28103: Fix barcode plugin on the order receive view

Fix the following error:
Uncaught TypeError: Cannot read property 'field_value' of null

Test plan:
Set "AcqCreateItem" to "receiving an order"
Set "autoBarcode" to "generated in the form <branchcode>yymm0001"

Create an order and go to receive it at a path like /cgi-bin/koha/acqui/orderreceive.pl?ordernumber=2&invoiceid=1

Click on the barcode input and confirm that it's prefilled automatically
Comment 2 Jonathan Druart 2021-04-09 10:02:13 UTC
*** Bug 10890 has been marked as a duplicate of this bug. ***
Comment 3 Owen Leonard 2021-04-09 12:38:35 UTC
Created attachment 119375 [details] [review]
Bug 28103: Fix barcode plugin on the order receive view

Fix the following error:
Uncaught TypeError: Cannot read property 'field_value' of null

Test plan:
Set "AcqCreateItem" to "receiving an order"
Set "autoBarcode" to "generated in the form <branchcode>yymm0001"

Create an order and go to receive it at a path like
/cgi-bin/koha/acqui/orderreceive.pl?ordernumber=2&invoiceid=1

Click on the barcode input and confirm that it's prefilled
automatically

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 4 Nick Clemens (kidclamp) 2021-04-15 18:37:34 UTC
Created attachment 119675 [details] [review]
Bug 28103: Fix barcode plugin on the order receive view

Fix the following error:
Uncaught TypeError: Cannot read property 'field_value' of null

Test plan:
Set "AcqCreateItem" to "receiving an order"
Set "autoBarcode" to "generated in the form <branchcode>yymm0001"

Create an order and go to receive it at a path like
/cgi-bin/koha/acqui/orderreceive.pl?ordernumber=2&invoiceid=1

Click on the barcode input and confirm that it's prefilled
automatically

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 5 Jonathan Druart 2021-04-16 10:30:08 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 6 Fridolin Somers 2021-04-22 14:16:29 UTC
Pushed to 20.11.x for 20.11.05
Comment 7 Andrew Fuerste-Henry 2021-04-25 16:19:47 UTC
Pushed to 20.05.x for 20.05.11
Comment 8 Victor Grousset/tuxayo 2021-04-25 20:43:43 UTC
Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed.
Comment 9 David Cook 2024-09-06 01:08:27 UTC
Oh cool this is broken again in 23.11+ at least :D