Bug 35975 - Downloaded cart with BibTeX contains hash value instead of the record number
Summary: Downloaded cart with BibTeX contains hash value instead of the record number
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Lari Taskula
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-01 13:43 UTC by Marcel de Rooy
Modified: 2025-01-03 23:20 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This fixes the contents of the BibTeX file downloaded from an OPAC cart - it now correctly shows the record number, instead of Koha::Hash(xxx). Example of incorrect BibTeX file format: @book{Koha::Biblio=HASH(0x560e89ade4b8), <--- should have been 262 author = {Christiansen, Tom. and Foy, Brian D.}, title = {Programming Perl /}, publisher = {O'Reilly,}, year = {c2012.}, address = {Beijing ;}, edition = {4th ed.}, note = {Rev. ed. of: Programming Perl / Larry Wall, Tom Christiansen & Jon Orwant. 2000. 3rd ed.} }
Version(s) released in:
25.05.00
Circulation function:


Attachments
Bug 35975: Show biblionumber when download cart as BibTeX (1.17 KB, patch)
2024-12-19 11:00 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 35975: Show biblionumber when download cart as BibTeX (1.22 KB, patch)
2024-12-19 12:25 UTC, Owen Leonard
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel de Rooy 2024-02-01 13:43:55 UTC
@book{Koha::Biblio=HASH(0x560e89ade4b8),
	author = {Schwartz, Randal L. and Phoenix, Tom},
	title = {Learning Perl /},
etc
Comment 1 Katrin Fischer 2024-03-17 16:56:50 UTC
Can't really test, because it seems almost all export options now result in an error 500:
Bug 36336 - Exporting records from detail page is broken
Comment 2 Lari Taskula 2024-12-19 10:16:20 UTC
I also noticed this. C4::Record::marc2bibtex($marc_record, $biblionumber) second parameter expects a biblionumber. opac-downloadcart.pl is passing it a Koha::Biblio.
Comment 3 Lari Taskula 2024-12-19 11:00:51 UTC
Created attachment 175698 [details] [review]
Bug 35975: Show biblionumber when download cart as BibTeX

To test:
1. In OPAC, add a record to your cart
2. Go to your cart
3. Click Download -> BibTeX
4. Observe downloaded file in your favorite text editor
5. Observe Koha::Hash(xxx) within file contents
6. Apply patch
7. Repeat steps 3 and 4
8. Observe Koha::Hash has been replaced with biblionumber
Comment 4 Owen Leonard 2024-12-19 12:25:49 UTC
Created attachment 175720 [details] [review]
Bug 35975: Show biblionumber when download cart as BibTeX

To test:
1. In OPAC, add a record to your cart
2. Go to your cart
3. Click Download -> BibTeX
4. Observe downloaded file in your favorite text editor
5. Observe Koha::Hash(xxx) within file contents
6. Apply patch
7. Repeat steps 3 and 4
8. Observe Koha::Hash has been replaced with biblionumber

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 5 Katrin Fischer 2024-12-27 16:07:03 UTC
QA by RM.

Also checked the staff interface: the error didn't exist there.
Comment 6 Katrin Fischer 2024-12-27 16:36:08 UTC
Pushed for 25.05!

Well done everyone, thank you!