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 (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
: 10890 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-04-07 03:20 UTC by David Cook
Modified: 2021-12-13 21:10 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


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