View | Details | Raw Unified | Return to bug 12357
Collapse All | Expand All

(-)a/C4/Ris.pm (+29 lines)
Lines 287-292 sub marc2ris { Link Here
287
        print_uri($record->field('856'));
287
        print_uri($record->field('856'));
288
    }
288
    }
289
289
290
    my $syspref = C4::Context->preference('RisExportAdditionalFields');
291
    if ($syspref) {
292
        $syspref = "$syspref\n\n";
293
        my $yaml = eval { YAML::Load($syspref); };
294
        if ($@) {
295
            warn "Unable to parse RisExportAdditionalFields : $@";
296
        }
297
        else {
298
            my $r;
299
            foreach my $ris_tag ( keys %$yaml ) {
300
                my @fields =
301
                  ref( $yaml->{$ris_tag} ) eq 'ARRAY'
302
                  ? @{ $yaml->{$ris_tag} }
303
                  : $yaml->{$ris_tag};
304
                for my $tag_subfield (@fields) {
305
                    my ( $f, $sf ) = split /\$/, $tag_subfield;
306
                    if ( $f && $sf ) {
307
                        foreach my $field ( $record->field($f) ) {
308
                            my @values = $field->subfield($sf);
309
                            foreach my $v (@values) {
310
                                print "$ris_tag  - $v\r\n";
311
                            }
312
                        }
313
                    }
314
                }
315
            }
316
        }
317
    }
318
290
	## end RIS dataset
319
	## end RIS dataset
291
	print "ER  - \r\n";
320
	print "ER  - \r\n";
292
321
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 343-348 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
343
('ReturnLog','1',NULL,'If ON, enables the circulation (returns) log','YesNo'),
343
('ReturnLog','1',NULL,'If ON, enables the circulation (returns) log','YesNo'),
344
('ReturnToShelvingCart','0','','If set, when any item is \'checked in\', it\'s location code will be changed to CART.','YesNo'),
344
('ReturnToShelvingCart','0','','If set, when any item is \'checked in\', it\'s location code will be changed to CART.','YesNo'),
345
('reviewson','1','','If ON, enables patron reviews of bibliographic records in the OPAC','YesNo'),
345
('reviewson','1','','If ON, enables patron reviews of bibliographic records in the OPAC','YesNo'),
346
('RisExportAdditionalFields',  '', NULL ,  'Define additional RIS tags to export from MARC records in YAML format as an associative array with either a marc tag/subfield combination as the value, or a list of tag/subfield combinations.',  'textarea'),
346
('RoutingListAddReserves','1','','If ON the patrons on routing lists are automatically added to holds on the issue.','YesNo'),
347
('RoutingListAddReserves','1','','If ON the patrons on routing lists are automatically added to holds on the issue.','YesNo'),
347
('RoutingListNote','To change this note edit <a href=\"/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=RoutingListNote#jumped\">RoutingListNote</a> system preference.','70|10','Define a note to be shown on all routing lists','Textarea'),
348
('RoutingListNote','To change this note edit <a href=\"/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=RoutingListNote#jumped\">RoutingListNote</a> system preference.','70|10','Define a note to be shown on all routing lists','Textarea'),
348
('RoutingSerials','1',NULL,'If ON, serials routing is enabled','YesNo'),
349
('RoutingSerials','1',NULL,'If ON, serials routing is enabled','YesNo'),
(-)a/installer/data/mysql/updatedatabase.pl (+10 lines)
Lines 8952-8957 if ( CheckVersion($DBversion) ) { Link Here
8952
    SetVersion($DBversion);
8952
    SetVersion($DBversion);
8953
}
8953
}
8954
8954
8955
$DBversion = "3.17.00.XXX";
8956
if ( CheckVersion($DBversion) ) {
8957
    $dbh->do(q{
8958
        INSERT INTO systempreferences (variable,value,options,explanation,type)
8959
        VALUES ('RisExportAdditionalFields',  '', NULL ,  'Define additional RIS tags to export from MARC records in YAML format as an associative array with either a marc tag/subfield combination as the value, or a list of tag/subfield combinations.',  'textarea')
8960
    });
8961
    print "Upgrade to $DBversion done (Bug XXX - Add ability to export arbitrary MARC fields for RIS and BibTex)\n";
8962
    SetVersion($DBversion);
8963
}
8964
8955
=head1 FUNCTIONS
8965
=head1 FUNCTIONS
8956
8966
8957
=head2 TableExists($table)
8967
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref (-1 / +10 lines)
Lines 199-201 Cataloging: Link Here
199
                  yes: "do"
199
                  yes: "do"
200
                  no: "don't"
200
                  no: "don't"
201
            - attempt to match aggressively by trying all variations of the ISBNs in the imported record as a phrase in the ISBN fields of already cataloged records.  Note that this preference has no effect if UseQueryParser is on.
201
            - attempt to match aggressively by trying all variations of the ISBNs in the imported record as a phrase in the ISBN fields of already cataloged records.  Note that this preference has no effect if UseQueryParser is on.
202
- 
202
    Exporting:
203
        -
204
            - Include following fields when exporting RIS,
205
            - pref: RisExportAdditionalFields
206
              type: textarea
207
            - "Use one line per tag in the format RIS_TAG: TAG$SUBFIELD ( e.g. LC: 010$a )"
208
            - "<br/>"
209
            - "To specificy multiple marc tags/subfields as targets for a repeating RIS tag, use the following format: RIS_TAG: [TAG2$SUBFIELD1, TAG2$SUBFIELD2] ( e.g. XY: [501$a, 505$g] )"
210
            - "<br/>"
211
            - "All values of repeating tags and subfields will be printed with the given RIS tag."

Return to bug 12357