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

(-)a/authorities/authorities.pl (-1 / +2 lines)
Lines 119-125 sub create_input { Link Here
119
    my $applydefaults = C4::Context->preference('ApplyFrameworkDefaults');
119
    my $applydefaults = C4::Context->preference('ApplyFrameworkDefaults');
120
    if ( $value eq '' && (
120
    if ( $value eq '' && (
121
        ( $applydefaults =~ /new/ && !$cgi->param('authid') ) ||
121
        ( $applydefaults =~ /new/ && !$cgi->param('authid') ) ||
122
        ( $applydefaults =~ /duplicate/ && $cgi->param('op') eq 'duplicate' )
122
        ( $applydefaults =~ /duplicate/ && $cgi->param('op') eq 'duplicate' ) ||
123
        ( $applydefaults =~ /imported/ && $cgi->param('breedingid') )
123
    ) ) {
124
    ) ) {
124
        $value = $tagslib->{$tag}->{$subfield}->{defaultvalue};
125
        $value = $tagslib->{$tag}->{$subfield}->{defaultvalue};
125
        if (!defined $value) {
126
        if (!defined $value) {
(-)a/cataloguing/addbiblio.pl (-2 / +4 lines)
Lines 285-303 sub GetMandatoryFieldZ3950 { Link Here
285
285
286
sub create_input {
286
sub create_input {
287
    my ( $tag, $subfield, $value, $index_tag, $rec, $authorised_values_sth,$cgi ) = @_;
287
    my ( $tag, $subfield, $value, $index_tag, $rec, $authorised_values_sth,$cgi ) = @_;
288
    
288
289
    my $index_subfield = CreateKey(); # create a specifique key for each subfield
289
    my $index_subfield = CreateKey(); # create a specifique key for each subfield
290
290
291
    # Apply optional framework default value when it is a new record,
291
    # Apply optional framework default value when it is a new record,
292
    # or when editing as new (duplicating a record),
292
    # or when editing as new (duplicating a record),
293
    # or when changing a record's framework,
293
    # or when changing a record's framework,
294
    # or when importing a record,
294
    # based on the ApplyFrameworkDefaults setting.
295
    # based on the ApplyFrameworkDefaults setting.
295
    # Substitute date parts, user name
296
    # Substitute date parts, user name
296
    my $applydefaults = C4::Context->preference('ApplyFrameworkDefaults');
297
    my $applydefaults = C4::Context->preference('ApplyFrameworkDefaults');
297
    if ( $value eq '' && (
298
    if ( $value eq '' && (
298
        ( $applydefaults =~ /new/ && !$cgi->param('biblionumber') ) ||
299
        ( $applydefaults =~ /new/ && !$cgi->param('biblionumber') ) ||
299
        ( $applydefaults =~ /duplicate/ && $cgi->param('op') eq 'duplicate' ) ||
300
        ( $applydefaults =~ /duplicate/ && $cgi->param('op') eq 'duplicate' ) ||
300
        ( $applydefaults =~ /changed/ && $cgi->param('changed_framework') )
301
        ( $applydefaults =~ /changed/ && $cgi->param('changed_framework') ) ||
302
        ( $applydefaults =~ /imported/ && $cgi->param('breedingid') )
301
    ) ) {
303
    ) ) {
302
        $value = $tagslib->{$tag}->{$subfield}->{defaultvalue} // q{};
304
        $value = $tagslib->{$tag}->{$subfield}->{defaultvalue} // q{};
303
305
(-)a/installer/data/mysql/atomicupdate/bug_30250_-_add_ApplyFrameworkDefaults_syspref.pl (-1 / +1 lines)
Lines 7-12 return { Link Here
7
        my ($args) = @_;
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
9
10
        $dbh->do(q{INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('ApplyFrameworkDefaults', 'new', "new|duplicate|changed", "Configure when to apply framework default values - when cataloguing a new record, or when editing a record as new (duplicating), or when changing framework", 'multiple') });
10
        $dbh->do(q{INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('ApplyFrameworkDefaults', 'new', "new|duplicate|changed|imported", "Configure when to apply framework default values - when cataloguing a new record, or when editing a record as new (duplicating), or when changing framework, or when importing a record", 'multiple') });
11
    },
11
    },
12
};
12
};
(-)a/installer/data/mysql/mandatory/sysprefs.sql (-1 / +1 lines)
Lines 55-61 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
55
('AmazonLocale','US','US|CA|DE|FR|IN|JP|UK','Use to set the Locale of your Amazon.com Web Services','Choice'),
55
('AmazonLocale','US','US|CA|DE|FR|IN|JP|UK','Use to set the Locale of your Amazon.com Web Services','Choice'),
56
('AnonSuggestions','0',NULL,'Set to enable Anonymous suggestions to AnonymousPatron borrowernumber','YesNo'),
56
('AnonSuggestions','0',NULL,'Set to enable Anonymous suggestions to AnonymousPatron borrowernumber','YesNo'),
57
('AnonymousPatron','0',NULL,'Set the identifier (borrowernumber) of the anonymous patron. Used for suggestion and checkout history privacy',''),
57
('AnonymousPatron','0',NULL,'Set the identifier (borrowernumber) of the anonymous patron. Used for suggestion and checkout history privacy',''),
58
('ApplyFrameworkDefaults', 'new', 'new|duplicate|changed', 'Configure when to apply framework default values - when cataloguing a new record, or when editing a record as new (duplicating), or when changing framework', 'multiple'),
58
('ApplyFrameworkDefaults', 'new', 'new|duplicate|changed|imported', 'Configure when to apply framework default values - when cataloguing a new record, or when editing a record as new (duplicating), or when changing framework, or when importing a record', 'multiple'),
59
('ArticleRequests', '0', NULL, 'Enables the article request feature', 'YesNo'),
59
('ArticleRequests', '0', NULL, 'Enables the article request feature', 'YesNo'),
60
('ArticleRequestsOpacHostRedirection', '0', NULL, 'Enables redirection from child to host when requesting articles on the Opac', 'YesNo'),
60
('ArticleRequestsOpacHostRedirection', '0', NULL, 'Enables redirection from child to host when requesting articles on the Opac', 'YesNo'),
61
('ArticleRequestsLinkControl', 'calc', 'always|calc', 'Control display of article request link on search results', 'Choice'),
61
('ArticleRequestsLinkControl', 'calc', 'always|calc', 'Control display of article request link on search results', 'Choice'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref (-1 / +1 lines)
Lines 172-177 Cataloging: Link Here
172
                new: "when cataloguing new records"
172
                new: "when cataloguing new records"
173
                duplicate: "when editing records as new (duplicating)"
173
                duplicate: "when editing records as new (duplicating)"
174
                changed: "when changing the framework while editing the existing record"
174
                changed: "when changing the framework while editing the existing record"
175
                imported: "when importing a record"
175
    Display:
176
    Display:
176
        -
177
        -
177
            - 'Separate main entry and subdivisions with '
178
            - 'Separate main entry and subdivisions with '
178
- 

Return to bug 30250