Bug 28103

Summary: Barcode fails when adding item during order receive
Product: Koha Reporter: David Cook <dcook>
Component: AcquisitionsAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: andrewfh, fridolin.somers, jonathan.druart, victor
Version: Main   
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.05,20.05.11
Attachments: Bug 28103: Fix barcode plugin on the order receive view
Bug 28103: Fix barcode plugin on the order receive view
Bug 28103: Fix barcode plugin on the order receive view

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 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.