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 344-349 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
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
('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'),
347
('RisUseItemtypeAsType',  '0', NULL ,  'Use biblio.itemtype for RIS export type if set',  'YesNo'),
347
('RoutingListAddReserves','1','','If ON the patrons on routing lists are automatically added to holds on the issue.','YesNo'),
348
('RoutingListAddReserves','1','','If ON the patrons on routing lists are automatically added to holds on the issue.','YesNo'),
348
('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'),
349
('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'),
349
('RoutingSerials','1',NULL,'If ON, serials routing is enabled','YesNo'),
350
('RoutingSerials','1',NULL,'If ON, serials routing is enabled','YesNo'),
(-)a/installer/data/mysql/updatedatabase.pl (+6 lines)
Lines 8757-8762 if ( CheckVersion($DBversion) ) { Link Here
8757
        INSERT INTO systempreferences (variable,value,options,explanation,type)
8757
        INSERT INTO systempreferences (variable,value,options,explanation,type)
8758
        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')
8758
        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')
8759
    });
8759
    });
8760
8761
    $dbh->do(q{
8762
        INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES
8763
        ('RisUseItemtypeAsType',  '0', NULL ,  'Use biblio.itemtype for RIS export type if set',  'YesNo')
8764
    });
8765
8760
    print "Upgrade to $DBversion done (Bug XXX - Add ability to export arbitrary MARC fields for RIS and BibTex)\n";
8766
    print "Upgrade to $DBversion done (Bug XXX - Add ability to export arbitrary MARC fields for RIS and BibTex)\n";
8761
    SetVersion($DBversion);
8767
    SetVersion($DBversion);
8762
}
8768
}
(-)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