Bug 9274: Software error in bibtex export
authorFridolyn SOMERS <fridolyn.somers@biblibre.com>
Wed, 12 Dec 2012 14:47:55 +0000 (15:47 +0100)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Sun, 31 Mar 2013 00:59:41 +0000 (20:59 -0400)
commitf355da2e86810fef47442b7effeffa3686bd79bb
treebecf12275d7085eb0c4cae0b97b66f4cb4bc9cab
parent4c7084d4266ff86ab760f8b72fcbb2a7f185a44a
Bug 9274: Software error in bibtex export

Exporting to Bibtex from OPAC returns a software error.
This is because call to C4::Biblio::GetMarcAuthors does
not return only authors but also authority link.
This patch replaces this call by a direct read of
MARC::Record, like for other Bibtex datas.
C4::Biblio::GetMarcAuthors is really destinated to a
direct use in a template.
Also, actually all author subfields are joined with
'and'. According to Bibtext format, authors should be
"firstname surname and ..." or "surname, firstname and
...". I have choosen second one because in non-UNIMARC
it corresponds to $a content.

For example UNIMARC :
700 $aDoe $bJohn
700 $aDoe $bJanne
Gives : Doe, John and Doe, Janne
For example MARC21 :
700 $aDoe, John
700 $aDoe, Janne
Gives : Doe, John and Doe, Janne

Test plan :
Without patch :
Exporting to Bibtex from OPAC returns a software error.
With patch :
Exporting to Bibtex from OPAC succeeds.
Authors are composed using : $a, $b and ... for UNIMARC, $a ... for other marc flavours.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Works as decribed. All record export that produces
error pre-patch, now export without error.
No koha-qa errors

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixes error and output of additional authors.
Main entry in 100 is still missing.
All tests and  QA script pass.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
C4/Record.pm