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

(-)a/installer/data/mysql/atomicupdate/bug_24474.perl (+28 lines)
Line 0 Link Here
1
$DBversion = 'XXX'; # will be replaced by the RM
2
if ( CheckVersion($DBversion) ) {
3
    $dbh->do(q{
4
        UPDATE
5
          systempreferences
6
        SET
7
          options = "batchmod|moredetail|cronjob|additem|pendingreserves|onpayment"
8
        WHERE
9
          variable = "MarkLostItemsAsReturned"
10
    });
11
12
    my $lost_item_returned = C4::Context->preference("MarkLostItemsAsReturned");
13
    my @set = split( ",", $lost_item_returned );
14
    push @set, 'onpayment';
15
    $lost_item_returned = join( ",", @set );
16
17
    $dbh->do(qq{
18
        UPDATE
19
          systempreferences
20
        SET
21
          value = "$lost_item_returned"
22
        WHERE
23
          variable = "MarkLostItemsAsReturned"
24
    });
25
26
    SetVersion($DBversion);
27
    print "Upgrade to $DBversion done (Bug 24474 - Add `onpayment` option to MarkLostItemsAsReturned)\n";
28
}
(-)a/installer/data/mysql/sysprefs.sql (-2 / +1 lines)
Lines 306-312 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
306
('MarcFieldForModifierName','',NULL,'Where to store the name of the record''s last modifier','Free'),
306
('MarcFieldForModifierName','',NULL,'Where to store the name of the record''s last modifier','Free'),
307
('MarcFieldsToOrder','',NULL,'Set the mapping values for a new order line created from a MARC record in a staged file. In a YAML format.','textarea'),
307
('MarcFieldsToOrder','',NULL,'Set the mapping values for a new order line created from a MARC record in a staged file. In a YAML format.','textarea'),
308
('MarcItemFieldsToOrder','',NULL,'Set the mapping values for new item records created from a MARC record in a staged file. In a YAML format.','textarea'),
308
('MarcItemFieldsToOrder','',NULL,'Set the mapping values for new item records created from a MARC record in a staged file. In a YAML format.','textarea'),
309
('MarkLostItemsAsReturned','batchmod,moredetail,cronjob,additem,pendingreserves','batchmod|moredetail|cronjob|additem|pendingreserves','Mark items as returned when flagged as lost','multiple'),
309
('MarkLostItemsAsReturned','batchmod,moredetail,cronjob,additem,pendingreserves,onpayment','batchmod|moredetail|cronjob|additem|pendingreserves|onpayment','Mark items as returned when flagged as lost','multiple'),
310
('MARCOrgCode','OSt','','Define MARC Organization Code for MARC21 records - http://www.loc.gov/marc/organizations/orgshome.html','free'),
310
('MARCOrgCode','OSt','','Define MARC Organization Code for MARC21 records - http://www.loc.gov/marc/organizations/orgshome.html','free'),
311
('MaxFine',NULL,'','Maximum fine a patron can have for all late returns at one moment. Single item caps are specified in the circulation rules matrix.','Integer'),
311
('MaxFine',NULL,'','Maximum fine a patron can have for all late returns at one moment. Single item caps are specified in the circulation rules matrix.','Integer'),
312
('MaxItemsToDisplayForBatchDel','1000',NULL,'Display up to a given number of items in a single item deletionbatch.','Integer'),
312
('MaxItemsToDisplayForBatchDel','1000',NULL,'Display up to a given number of items in a single item deletionbatch.','Integer'),
313
- 

Return to bug 24474