Bug 11066: make RIS and Bibtex exports RDA compatible
authorJoy Nelson <joy@bywatersolutions.com>
Sat, 26 Oct 2013 04:14:48 +0000 (00:14 -0400)
committerGalen Charlton <gmc@esilibrary.com>
Fri, 3 Jan 2014 15:54:38 +0000 (15:54 +0000)
RIS and Bibtex exports from staff side and OPAC edited to
allow for additional publisher RDA tag (264).  Script will
look first for 264 then fall back to 260 when pulling publisher
data from MARC21 records.

Test Plan:
1. Create RDA and non RDA record
2. In OPAC, export both as RIS and Bibtex - verify publisher information
   is exported
3. On staff side, export records as RIS and Bibtex, verify publisher
   information is exported.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixed some tabs pointed out by the QA script.
Works nicely in my tests, no regressions found.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
C4/Record.pm
C4/Ris.pm

index 9d72d5a..adb0c81 100644 (file)
@@ -702,13 +702,13 @@ sub marc2bibtex {
            author    => $author,
            title     => $record->subfield("245", "a") || "",
            editor    => $record->subfield("260", "f") || "",
-           publisher => $record->subfield("260", "b") || "",
-           year      => $record->subfield("260", "c") || $record->subfield("260", "g") || "",
+        publisher => $record->subfield("264", "b") || $record->subfield("260", "b") || "",
+        year      => $record->subfield("264", "c") || $record->subfield("260", "c") || $record->subfield("260", "g") || "",
 
            # Optional
            # unimarc to marc21 specification says not to convert 200$v to marc21
            series  =>  $record->subfield("490", "a") || "",
-           address =>  $record->subfield("260", "a") || "",
+        address =>  $record->subfield("264", "a") || $record->subfield("260", "a") || "",
            edition =>  $record->subfield("250", "a") || "",
            note    =>  $record->subfield("500", "a") || "",
            url     =>  $record->subfield("856", "u") || ""
index ce32ea9..d601c96 100644 (file)
--- a/C4/Ris.pm
+++ b/C4/Ris.pm
@@ -209,7 +209,12 @@ sub marc2ris {
            &print_pubinfo($record->field('210'));
        }
        else { ## marc21, ukmarc
-           &print_pubinfo($record->field('260'));
+            if ($record->field('264')) {
+                 &print_pubinfo($record->field('264'));
+            }
+            else {
+            &print_pubinfo($record->field('260'));
+            }
        }
 
        ## 6XX fields contain KW candidates. We add all of them to a
@@ -252,7 +257,7 @@ sub marc2ris {
        elsif ($intype eq "ukmarc") {
            foreach ('500', '501', '502', '503', '504', '505', '506', '508', '514', '515', '516', '521', '524', '525', '528', '530', '531', '532', '533', '534', '535', '537', '538', '540', '541', '542', '544', '554', '555', '556', '557', '561', '563', '580', '583', '584', '586') {
                &pool_subx(\@notepool, $_, $record->field($_));
-           }
+        }
        }
        else { ## assume marc21
            foreach ('500', '501', '502', '504', '505', '506', '507', '508', '510', '511', '513', '514', '515', '516', '518', '521', '522', '524', '525', '526', '530', '533', '534', '535') {
@@ -642,7 +647,7 @@ sub print_pubinfo {
     my($pubinfofield) = @_;
 
     if (!$pubinfofield) {
-       print "<marc>no publication information found (260)\r\n" if $marcprint;
+    print "<marc>no publication information found (260/264)\r\n" if $marcprint;
        warn("no publication information found") if $marcprint;
     }
     else {