https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43437

--- Comment #1 from Laura Escamilla <[email protected]> ---
Created attachment 204610
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=204610&action=edit
Bug 43437: Fix barcode range printing with bibliographic data

To test

1. Go to Tools > Label creator > Manage > Layouts.
2. Create or edit a label layout.
3. Set "Choose layout type" to "Bibliographic data precedes barcode" (BIBBAR).
4. Configure the bibliographic data to include a MARC field, for example 245a.
5. Save the layout.
6. Go to Tools > Label creator > New > Barcode range.
7. Enter the barcode of an existing item in both the "From" and "To" fields.
8. Click "Print range."
9. Select a template and the BIBBAR layout created above.
10. Click "Export."
11. Click "Download as PDF."

=> An Error 500 is returned.

The logs contain something similar to:

    Can't call method "field" on an undefined value
    at C4/Labels/Label.pm line 180.

12. Apply the patch.

13. Repeat steps 6-11 using the same BIBBAR layout and barcode.

=> The PDF is generated successfully.
=> The bibliographic data, including the 245a field, is present.
=> The barcode is present and correct.

14. Create or select a barcode-only layout.
15. Repeat the barcode range export using the same barcode.

=> The PDF is generated successfully.
=> The barcode is present and correct.

16. Test a normal single-item label export using the item's itemnumber rather
than the barcode range functionality.

=> The PDF is generated successfully.
=> Bibliographic data and barcode output are unchanged.

17. Test a normal saved label batch.

=> The PDF is generated successfully.
=> Existing batch label behavior is unchanged.

18. Test a barcode range that includes one or more barcodes which do not exist
in the items table.

=> Existing items in the range are printed.
=> Missing barcodes do not cause an Error 500.

19. Run the automated label tests:

    prove t/db_dependent/Labels/t_Label.t

=> All tests pass.

20. Verify the new tests specifically confirm:
    - An existing barcode resolves to the correct itemnumber.
    - A nonexistent barcode does not return an itemnumber.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to