From 6c8d620c82c4a7177c6179d41065a0e361f34fc6 Mon Sep 17 00:00:00 2001 From: Mark Tompsett Date: Mon, 25 May 2015 00:06:24 -0400 Subject: [PATCH] [SIGNED_OFF] Bug 12357: Fix comma issues related to additional fields. TEST PLAN --------- 1) Apply patches, except this one. 2) prove t/db_dependent/Record.t -- fails like comment #38 3) Apply this patch 4) prove t/db_dependent/Record.t -- now it passes. 5) koha qa test tools. Signed-off-by: Bernardo Gonzalez Kriegel Make test work, koha-qa problems fixed in next patch --- C4/Record.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/C4/Record.pm b/C4/Record.pm index 2e6ed98..a3bc860 100644 --- a/C4/Record.pm +++ b/C4/Record.pm @@ -782,9 +782,9 @@ sub marc2bibtex { push @elt, qq|\t$bh[$i] = {$bh[$i+1]}|; } $tex .= join(",\n", $id, @elt); - $tex .= "\n"; if ($additional_fields) { + $tex .= ",\n"; foreach my $bibtex_tag ( keys %$additional_fields ) { next if $bibtex_tag eq '@'; @@ -802,6 +802,9 @@ sub marc2bibtex { } } } + else { + $tex .= "\n"; + } $tex .= "}\n"; -- 1.7.9.5