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

(-)a/installer/data/mysql/db_revs/bug_20747-updatelocalholdspriority_syspref.pl (-1 / +25 lines)
Line 0 Link Here
0
- 
1
use Modern::Perl;
2
3
return {
4
    bug_number  => "20747",
5
    description => "Allow LocalHoldsPriority to fill by hierarchical groups system rather than individual library ",
6
    up          => sub {
7
        my ($args) = @_;
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
9
        my $local_holds_priority = C4::Context->preference('LocalHoldsPriority');
10
11
        # Do you stuffs here
12
        $dbh->do(
13
            q{
14
            UPDATE systempreferences
15
            SET options='GiveLibrary|None|GiveLibraryGroup|GiveLibraryAndGroup',
16
                value=CASE value WHEN '1' THEN 'GiveLibrary' ELSE 'None' END,
17
                type="Choice"
18
            WHERE variable="LocalHoldsPriority"
19
            'Enables the LocalHoldsPriority feature', 'None'  'Choice'),
20
        },
21
        );
22
23
        say $out "Updated system preference 'LocalHoldsPriority'";
24
    },
25
};

Return to bug 20747