Bug 37854

Summary: Barcode fails when adding item during order receive (again)
Product: Koha Reporter: David Cook <dcook>
Component: AcquisitionsAssignee: David Cook <dcook>
Status: Pushed to main --- QA Contact: Marcel de Rooy <m.de.rooy>
Severity: normal    
Priority: P5 - low CC: ovezina
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.11.00
Circulation function:
Bug Depends on: 8179, 28103, 29689    
Bug Blocks:    
Attachments: Bug 37854: Add fieldset.rows so that Javascript works
Bug 37854: Re-indent HTML (whitespace-only)
Bug 37854: Add fieldset.rows so that Javascript works
Bug 37854: Re-indent HTML (whitespace-only)
Bug 37854: Add fieldset.rows so that Javascript works
Bug 37854: Re-indent HTML (whitespace-only)

Description David Cook 2024-09-06 01:12:45 UTC
Basically the same bug as 28103 but newer Koha version, and this time we get "undefined" instead of a console error.

--

0. Set "autoBarcode" to "generated in the form <branchcode>yymm0001"
1. Create a vendor
2. Create a backet with "Create items when" set to "receiving an order"
3. Add an order (any order)
4. Close the basket
5. Receive the shipment
6. Click in the barcode field
7. Note that you get a barcode like undefined24090001
Comment 1 David Cook 2024-09-06 01:22:05 UTC
This time it's because the Javascript code written by C4/Barcodes/ValueBuilder.pm only works for the MARC basic editor.
Comment 2 David Cook 2024-09-06 01:31:57 UTC
Fortunately, there's a very simple "fix" for this. Yikes...
Comment 3 David Cook 2024-09-06 01:34:40 UTC
(In reply to David Cook from comment #2)
> Fortunately, there's a very simple "fix" for this. Yikes...

Oh I take that back. Fixes the Javascript but wrecks the styling :D
Comment 4 David Cook 2024-09-06 01:50:35 UTC
Created attachment 171115 [details] [review]
Bug 37854: Add fieldset.rows so that Javascript works

This change adds a fieldset.rows that the Javascript produced
by C4/Barcodes/ValueBuilder.pm will work here too like it
does for /cgi-bin/koha/cataloguing/additem.pl and
/cgi-bin/koha/acqui/neworderempty.pl

The fieldset.rows element ruins the styling, so we add some context
specific styling to the styling is preserved.

Test plan:
0. Apply the patch
1. Set "autoBarcode" to "generated in the form <branchcode>yymm0001"
2. Create a vendor
3. Create a backet with "Create items when" set to "receiving an order"
4. Add an order (any order)
5. Close the basket
6. Receive the shipment
7. Click in the barcode field
8. Note that you get a barcode like CPL24090001 and not undefined24090001
Comment 5 David Cook 2024-09-06 01:50:38 UTC
Created attachment 171116 [details] [review]
Bug 37854: Re-indent HTML (whitespace-only)

This whitespace only change re-indents the HTML
Comment 6 David Cook 2024-09-06 01:58:36 UTC
Looking like bug 8179 is what broke this one
Comment 7 Olivier Vezina 2024-09-09 21:07:24 UTC
Created attachment 171234 [details] [review]
Bug 37854: Add fieldset.rows so that Javascript works

This change adds a fieldset.rows that the Javascript produced
by C4/Barcodes/ValueBuilder.pm will work here too like it
does for /cgi-bin/koha/cataloguing/additem.pl and
/cgi-bin/koha/acqui/neworderempty.pl

The fieldset.rows element ruins the styling, so we add some context
specific styling to the styling is preserved.

Test plan:
0. Apply the patch
1. Set "autoBarcode" to "generated in the form <branchcode>yymm0001"
2. Create a vendor
3. Create a backet with "Create items when" set to "receiving an order"
4. Add an order (any order)
5. Close the basket
6. Receive the shipment
7. Click in the barcode field
8. Note that you get a barcode like CPL24090001 and not undefined24090001

Signed-off-by: Olivier V <olivier.vezina@inLibro.com>
Comment 8 Olivier Vezina 2024-09-09 21:07:25 UTC
Created attachment 171235 [details] [review]
Bug 37854: Re-indent HTML (whitespace-only)

This whitespace only change re-indents the HTML

Signed-off-by: Olivier V <olivier.vezina@inLibro.com>
Comment 9 Marcel de Rooy 2024-11-15 08:18:24 UTC
Created attachment 174546 [details] [review]
Bug 37854: Add fieldset.rows so that Javascript works

This change adds a fieldset.rows that the Javascript produced
by C4/Barcodes/ValueBuilder.pm will work here too like it
does for /cgi-bin/koha/cataloguing/additem.pl and
/cgi-bin/koha/acqui/neworderempty.pl

The fieldset.rows element ruins the styling, so we add some context
specific styling to the styling is preserved.

Test plan:
0. Apply the patch
1. Set "autoBarcode" to "generated in the form <branchcode>yymm0001"
2. Create a vendor
3. Create a backet with "Create items when" set to "receiving an order"
4. Add an order (any order)
5. Close the basket
6. Receive the shipment
7. Click in the barcode field
8. Note that you get a barcode like CPL24090001 and not undefined24090001

Signed-off-by: Olivier V <olivier.vezina@inLibro.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 10 Marcel de Rooy 2024-11-15 08:18:26 UTC
Created attachment 174547 [details] [review]
Bug 37854: Re-indent HTML (whitespace-only)

This whitespace only change re-indents the HTML

Signed-off-by: Olivier V <olivier.vezina@inLibro.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 11 Katrin Fischer 2024-11-18 16:45:43 UTC
Pushed for 24.11!

Well done everyone, thank you!