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 289-307 sub GetMandatoryFieldZ3950 { Link Here
289
289
290
sub create_input {
290
sub create_input {
291
    my ( $tag, $subfield, $value, $index_tag, $rec, $authorised_values_sth,$cgi ) = @_;
291
    my ( $tag, $subfield, $value, $index_tag, $rec, $authorised_values_sth,$cgi ) = @_;
292
    
292
293
    my $index_subfield = CreateKey(); # create a specifique key for each subfield
293
    my $index_subfield = CreateKey(); # create a specifique key for each subfield
294
294
295
    # Apply optional framework default value when it is a new record,
295
    # Apply optional framework default value when it is a new record,
296
    # or when editing as new (duplicating a record),
296
    # or when editing as new (duplicating a record),
297
    # or when changing a record's framework,
297
    # or when changing a record's framework,
298
    # or when importing a record,
298
    # based on the ApplyFrameworkDefaults setting.
299
    # based on the ApplyFrameworkDefaults setting.
299
    # Substitute date parts, user name
300
    # Substitute date parts, user name
300
    my $applydefaults = C4::Context->preference('ApplyFrameworkDefaults');
301
    my $applydefaults = C4::Context->preference('ApplyFrameworkDefaults');
301
    if ( $value eq '' && (
302
    if ( $value eq '' && (
302
        ( $applydefaults =~ /new/ && !$cgi->param('biblionumber') ) ||
303
        ( $applydefaults =~ /new/ && !$cgi->param('biblionumber') ) ||
303
        ( $applydefaults =~ /duplicate/ && $cgi->param('op') eq 'duplicate' ) ||
304
        ( $applydefaults =~ /duplicate/ && $cgi->param('op') eq 'duplicate' ) ||
304
        ( $applydefaults =~ /changed/ && $cgi->param('changed_framework') )
305
        ( $applydefaults =~ /changed/ && $cgi->param('changed_framework') ) ||
306
        ( $applydefaults =~ /imported/ && $cgi->param('breedingid') )
305
    ) ) {
307
    ) ) {
306
        $value = $tagslib->{$tag}->{$subfield}->{defaultvalue} // q{};
308
        $value = $tagslib->{$tag}->{$subfield}->{defaultvalue} // q{};
307
309
(-)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 184-189 Cataloging: Link Here
184
                new: "when cataloguing new records"
184
                new: "when cataloguing new records"
185
                duplicate: "when editing records as new (duplicating)"
185
                duplicate: "when editing records as new (duplicating)"
186
                changed: "when changing the framework while editing the existing record"
186
                changed: "when changing the framework while editing the existing record"
187
                imported: "when importing a record"
187
    Display:
188
    Display:
188
        -
189
        -
189
            - 'Separate main entry and subdivisions with '
190
            - 'Separate main entry and subdivisions with '
190
- 

Return to bug 30250