Bug 20747: DB Rev
This patch adds a DB rev to update the system preference in existing installations. # Please enter the commit message for your changes. Lines starting Signed-off-by: Jason Robb <jrobb@sekls.org> Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
e061d0a718
commit
ea67f54de1
|
|
@ -0,0 +1,25 @@
|
|||
use Modern::Perl;
|
||||
|
||||
return {
|
||||
bug_number => "20747",
|
||||
description => "Allow LocalHoldsPriority to fill by hierarchical groups system rather than individual library ",
|
||||
up => sub {
|
||||
my ($args) = @_;
|
||||
my ( $dbh, $out ) = @$args{qw(dbh out)};
|
||||
my $local_holds_priority = C4::Context->preference('LocalHoldsPriority');
|
||||
|
||||
# Do you stuffs here
|
||||
$dbh->do(
|
||||
q{
|
||||
UPDATE systempreferences
|
||||
SET options='GiveLibrary|None|GiveLibraryGroup|GiveLibraryAndGroup',
|
||||
value=CASE value WHEN '1' THEN 'GiveLibrary' ELSE 'None' END,
|
||||
type="Choice"
|
||||
WHERE variable="LocalHoldsPriority"
|
||||
'Enables the LocalHoldsPriority feature', 'None' 'Choice'),
|
||||
},
|
||||
);
|
||||
|
||||
say $out "Updated system preference 'LocalHoldsPriority'";
|
||||
},
|
||||
};
|
||||
Loading…
Reference in New Issue