Bug 37854 - Barcode fails when adding item during order receive (again)
Summary: Barcode fails when adding item during order receive (again)
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: David Cook
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on: 8179 28103 29689
Blocks:
  Show dependency treegraph
 
Reported: 2024-09-06 01:12 UTC by David Cook
Modified: 2024-11-18 16:45 UTC (History)
1 user (show)

See Also:
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:


Attachments
Bug 37854: Add fieldset.rows so that Javascript works (2.23 KB, patch)
2024-09-06 01:50 UTC, David Cook
Details | Diff | Splinter Review
Bug 37854: Re-indent HTML (whitespace-only) (8.01 KB, patch)
2024-09-06 01:50 UTC, David Cook
Details | Diff | Splinter Review
Bug 37854: Add fieldset.rows so that Javascript works (2.28 KB, patch)
2024-09-09 21:07 UTC, Olivier Vezina
Details | Diff | Splinter Review
Bug 37854: Re-indent HTML (whitespace-only) (8.07 KB, patch)
2024-09-09 21:07 UTC, Olivier Vezina
Details | Diff | Splinter Review
Bug 37854: Add fieldset.rows so that Javascript works (2.38 KB, patch)
2024-11-15 08:18 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 37854: Re-indent HTML (whitespace-only) (8.16 KB, patch)
2024-11-15 08:18 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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!