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

(-)a/C4/Ris.pm (-2 / +16 lines)
Lines 64-69 package C4::Ris; Link Here
64
64
65
use vars qw($VERSION @ISA @EXPORT);
65
use vars qw($VERSION @ISA @EXPORT);
66
66
67
use C4::Biblio qw(GetMarcSubfieldStructureFromKohaField);
68
67
# set the version for version checking
69
# set the version for version checking
68
$VERSION = 3.07.00.049;
70
$VERSION = 3.07.00.049;
69
71
Lines 117-124 sub marc2ris { Link Here
117
	## else: other MARC formats do not specify the character encoding
119
	## else: other MARC formats do not specify the character encoding
118
	## we assume it's *not* UTF-8
120
	## we assume it's *not* UTF-8
119
121
120
	## start RIS dataset
122
    ## start RIS dataset
121
	&print_typetag($leader);
123
    if ( C4::Context->preference('RisUseItemtypeAsType') ) {
124
        my $s = GetMarcSubfieldStructureFromKohaField('biblioitems.itemtype');
125
        my $type = $record->subfield( $s->{tagfield}, $s->{tagsubfield} );
126
        if ($type) {
127
            print "TY  - $type\r\n";
128
        }
129
        else {
130
            &print_typetag($leader);
131
        }
132
    }
133
    else {
134
        &print_typetag($leader);
135
    }
122
136
123
	## retrieve all author fields and collect them in a list
137
	## retrieve all author fields and collect them in a list
124
	my @author_fields;
138
	my @author_fields;
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 342-347 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
342
('ReturnToShelvingCart','0','','If set, when any item is \'checked in\', it\'s location code will be changed to CART.','YesNo'),
342
('ReturnToShelvingCart','0','','If set, when any item is \'checked in\', it\'s location code will be changed to CART.','YesNo'),
343
('reviewson','1','','If ON, enables patron reviews of bibliographic records in the OPAC','YesNo'),
343
('reviewson','1','','If ON, enables patron reviews of bibliographic records in the OPAC','YesNo'),
344
('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'),
344
('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'),
345
('RisUseItemtypeAsType',  '0', NULL ,  'Use biblio.itemtype for RIS export type if set',  'YesNo'),
345
('RoutingListAddReserves','1','','If ON the patrons on routing lists are automatically added to holds on the issue.','YesNo'),
346
('RoutingListAddReserves','1','','If ON the patrons on routing lists are automatically added to holds on the issue.','YesNo'),
346
('RoutingListNote','To change this note edit <a href=\"/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=RoutingListNote#jumped\">RoutlingListNote</a> system preference.','70|10','Define a note to be shown on all routing lists','Textarea'),
347
('RoutingListNote','To change this note edit <a href=\"/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=RoutingListNote#jumped\">RoutlingListNote</a> system preference.','70|10','Define a note to be shown on all routing lists','Textarea'),
347
('RoutingSerials','1',NULL,'If ON, serials routing is enabled','YesNo'),
348
('RoutingSerials','1',NULL,'If ON, serials routing is enabled','YesNo'),
(-)a/installer/data/mysql/updatedatabase.pl (+6 lines)
Lines 8566-8571 if ( CheckVersion($DBversion) ) { Link Here
8566
        INSERT INTO systempreferences (variable,value,options,explanation,type)
8566
        INSERT INTO systempreferences (variable,value,options,explanation,type)
8567
        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')
8567
        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')
8568
    });
8568
    });
8569
8570
    $dbh->do(q{
8571
        INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES
8572
        ('RisUseItemtypeAsType',  '0', NULL ,  'Use biblio.itemtype for RIS export type if set',  'YesNo')
8573
    });
8574
8569
    print "Upgrade to $DBversion done (Bug XXX - Add ability to export arbitrary MARC fields for RIS and BibTex)\n";
8575
    print "Upgrade to $DBversion done (Bug XXX - Add ability to export arbitrary MARC fields for RIS and BibTex)\n";
8570
    SetVersion($DBversion);
8576
    SetVersion($DBversion);
8571
}
8577
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref (-1 / +6 lines)
Lines 209-211 Cataloging: Link Here
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] )"
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/>"
210
            - "<br/>"
211
            - "All values of repeating tags and subfields will be printed with the given RIS tag."
211
            - "All values of repeating tags and subfields will be printed with the given RIS tag."
212
- 
212
        -
213
            - pref: RisUseItemtypeAsType
214
              choices:
215
                  yes: "Do"
216
                  no: "Do not"
217
            - use the record level itemtype code for the TY field if it is set. If it is not set, the default TY field handler will be used.

Return to bug 12357