From 95286aad85d246bd7ac9280186cff7ec07fb833c Mon Sep 17 00:00:00 2001 From: Mark Tompsett Date: Mon, 25 May 2015 00:06:24 -0400 Subject: [PATCH] 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 Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi --- C4/Record.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/C4/Record.pm b/C4/Record.pm index 2e6ed98863..a3bc86032c 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"; -- 2.39.5