Bug 6201 - BibTeX export does not incude MARC21 main entry
Summary: BibTeX export does not incude MARC21 main entry
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: MARC Bibliographic data support (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Eric Bégin
QA Contact: Bugs List
URL:
Keywords:
Depends on: 9274
Blocks:
  Show dependency treegraph
 
Reported: 2011-04-18 14:28 UTC by Jared Camins-Esakov
Modified: 2015-06-04 23:23 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
BibTeX export now includes MARC21 main entry (2.48 KB, patch)
2013-09-26 19:01 UTC, Blou
Details | Diff | Splinter Review
Fix marc2bibtex to consider fields 1xx on author. (2.30 KB, patch)
2013-09-26 19:47 UTC, Blou
Details | Diff | Splinter Review
Add fields 1xxx to marc2bibtex (2.60 KB, patch)
2013-09-27 14:15 UTC, Blou
Details | Diff | Splinter Review
Add fields 1xxx to marc2bibtex (2.61 KB, patch)
2013-09-27 20:41 UTC, Blou
Details | Diff | Splinter Review
Bug 6201 - Add fields 1xx to marc2bibtex (2.48 KB, patch)
2013-09-29 05:11 UTC, Chris Cormack
Details | Diff | Splinter Review
[PASSED QA] Bug 6201 - Add fields 1xx to marc2bibtex (2.70 KB, patch)
2013-09-29 17:48 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jared Camins-Esakov 2011-04-18 14:28:18 UTC
The BibTeX export does not include 1xx fields when exporting MARC21 records because GetMarcAuthors only retrieves 7xx authors. 1xx fields should be included.
Comment 1 Owen Leonard 2013-03-26 22:48:41 UTC
This bug is still present in master as of 3.12 beta1
Comment 2 Blou 2013-09-26 19:01:50 UTC Comment hidden (obsolete)
Comment 3 Blou 2013-09-26 19:05:07 UTC
Patch attached
Comment 4 Eric Bégin 2013-09-26 19:24:06 UTC
How to test :
- Search any books in the OPAC with a main entry (1XX in MARC21, 700-720 in Unimarc)
- Export the record in the bibtex format

» The output won't contains the main entry.

---- Apply the patch

- Export the record

The output file will contain the main entry
Comment 5 Blou 2013-09-26 19:47:49 UTC Comment hidden (obsolete)
Comment 6 Eric Bégin 2013-09-26 20:00:38 UTC
Sponsored-by: Institut universitaire en santé mentale de Montréal
Comment 7 Blou 2013-09-27 14:15:52 UTC Comment hidden (obsolete)
Comment 8 Blou 2013-09-27 20:41:58 UTC Comment hidden (obsolete)
Comment 9 I'm just a bot 2013-09-29 04:55:59 UTC
Patch applied cleanly, go forth and signoff
Comment 10 Chris Cormack 2013-09-29 05:11:16 UTC Comment hidden (obsolete)
Comment 11 Katrin Fischer 2013-09-29 17:45:13 UTC
Comment on attachment 21571 [details] [review]
Bug 6201 - Add fields 1xx to marc2bibtex

Review of attachment 21571 [details] [review]:
-----------------------------------------------------------------

::: C4/Record.pm
@@ +668,2 @@
>      }
>      $author = join ' and ', @texauthors;

This is an old line, but also a bug. We should never hardcode English strings in Perl modules. Never ever.
Comment 12 Katrin Fischer 2013-09-29 17:48:55 UTC
Created attachment 21604 [details] [review]
[PASSED QA] Bug 6201 - Add fields 1xx to marc2bibtex

Modified Record::marc2bibtex to varlidate fields 100,110 and 111 in non-Unimarc flavours.

Test plan:
1)Search any books in the OPAC with a main entry (1XX in MARC21, 700-720 in Unimarc)
2)Export the record in the bibtex format
==>The output won't contains the main entry.
3)Apply the patch
4)Export the record
==>The record will contain the main entry

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixes a long standing bug.
Passes all tests and QA script.
Tested with multiple records, seems to work well.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comment 13 Eric Bégin 2013-09-29 21:51:46 UTC
> >      $author = join ' and ', @texauthors;
> 
> This is an old line, but also a bug. We should never hardcode English
> strings in Perl modules. Never ever.

From what I know, the 'and' is part of the bibtex standard and is language agnostic.
Comment 14 Katrin Fischer 2013-09-29 22:13:27 UTC
Hm, weird format:)
Comment 15 Galen Charlton 2013-10-09 05:30:38 UTC
Pushed to master.  Thanks, Philippe!  Also, looks like this is your first patch accepted into Koha.  Congratulations!
Comment 16 Tomás Cohen Arazi 2013-12-02 18:16:38 UTC
This patch has been pushed to 3.12.x, will be in 3.12.8.

Thanks Philippe and congratulations!