Browse Source

Bug 19974: DBRev 17.12.00.034

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
18.05.x
Jonathan Druart 4 years ago
parent
commit
db3e175c46
  1. 2
      Koha.pm
  2. 26
      installer/data/mysql/atomicupdate/bug_19974.perl
  3. 27
      installer/data/mysql/updatedatabase.pl

2
Koha.pm

@ -29,7 +29,7 @@ use vars qw{ $VERSION };
# - #4 : the developer version. The 4th number is the database subversion.
# used by developers when the database changes. updatedatabase take care of the changes itself
# and is automatically called by Auth.pm when needed.
$VERSION = "17.12.00.034";
$VERSION = "17.12.00.035";
sub version {
return $VERSION;

26
installer/data/mysql/atomicupdate/bug_19974.perl

@ -1,26 +0,0 @@
$DBversion = 'XXX'; # will be replaced by the RM
if( CheckVersion( $DBversion ) ) {
my ( $original_value ) = $dbh->selectrow_array(q|
SELECT value FROM systempreferences WHERE variable="MarkLostItemsAsReturned"
|);
if ( $original_value and $original_value eq '1' ) {
$dbh->do(q{
UPDATE systempreferences
SET type="multiple",
options="batchmod|moredetail|cronjob|additem",
value="batchmod,moredetail,cronjob,additem"
WHERE variable="MarkLostItemsAsReturned"
});
} else {
$dbh->do(q{
UPDATE systempreferences
SET type="multiple",
options="batchmod|moredetail|cronjob|additem",
value=""
WHERE variable="MarkLostItemsAsReturned"
});
}
SetVersion( $DBversion );
print "Upgrade to $DBversion done (Bug 19974 - Make MarkLostItemsAsReturned multiple)\n";
}

27
installer/data/mysql/updatedatabase.pl

@ -15883,6 +15883,33 @@ if( CheckVersion( $DBversion ) ) {
print "Upgrade to $DBversion done (Bug 18790 - Add ability to void payment)\n";
}
$DBversion = '17.12.00.035';
if( CheckVersion( $DBversion ) ) {
my ( $original_value ) = $dbh->selectrow_array(q|
SELECT value FROM systempreferences WHERE variable="MarkLostItemsAsReturned"
|);
if ( $original_value and $original_value eq '1' ) {
$dbh->do(q{
UPDATE systempreferences
SET type="multiple",
options="batchmod|moredetail|cronjob|additem",
value="batchmod,moredetail,cronjob,additem"
WHERE variable="MarkLostItemsAsReturned"
});
} else {
$dbh->do(q{
UPDATE systempreferences
SET type="multiple",
options="batchmod|moredetail|cronjob|additem",
value=""
WHERE variable="MarkLostItemsAsReturned"
});
}
SetVersion( $DBversion );
print "Upgrade to $DBversion done (Bug 19974 - Make MarkLostItemsAsReturned multiple)\n";
}
# SEE bug 13068
# if there is anything in the atomicupdate, read and execute it.

Loading…
Cancel
Save