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

(-)a/installer/data/mysql/atomicupdate/bug_23260.perl (+22 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number  => "23260",
5
    description => "Make borrowernumber from items_last_borrower nullable, and add AnonymizeLastBorrower and AnonymizeLastBorrowerDays preferences",
6
    up          => sub {
7
        my ($args) = @_;
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
9
10
        # Do you stuffs here
11
        $dbh->do(q{});
12
        $dbh->do( "ALTER TABLE items_last_borrower MODIFY COLUMN `borrowernumber` int(11) default NULL" );
13
        say $out "items_last_borrower updated to allow NULL borrowernumbers";
14
15
        $dbh->do(q{
16
            INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
17
            ('AnonymizeLastBorrower','0',NULL,'If enabled, anonymize item\'s last borrower','YesNo'),
18
            ('AnonymizeLastBorrowerDays','0',NULL,'Item\'s last borrower older than this preference will be anonymized','Integer')
19
        });
20
        say $out "Added new system preferences 'AnonymizeLastBorrower' and 'AnonymizeLastBorrowerDays'";
21
    },
22
};
(-)a/installer/data/mysql/kohastructure.sql (-1 / +1 lines)
Lines 4067-4073 DROP TABLE IF EXISTS `items_last_borrower`; Link Here
4067
CREATE TABLE `items_last_borrower` (
4067
CREATE TABLE `items_last_borrower` (
4068
  `id` int(11) NOT NULL AUTO_INCREMENT,
4068
  `id` int(11) NOT NULL AUTO_INCREMENT,
4069
  `itemnumber` int(11) NOT NULL,
4069
  `itemnumber` int(11) NOT NULL,
4070
  `borrowernumber` int(11) NOT NULL,
4070
  `borrowernumber` int(11) NULL,
4071
  `created_on` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
4071
  `created_on` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
4072
  PRIMARY KEY (`id`),
4072
  PRIMARY KEY (`id`),
4073
  UNIQUE KEY `itemnumber` (`itemnumber`),
4073
  UNIQUE KEY `itemnumber` (`itemnumber`),
(-)a/installer/data/mysql/mandatory/sysprefs.sql (+2 lines)
Lines 57-62 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
57
('AmazonCoverImages','0','','Display Cover Images in staff interface from Amazon Web Services','YesNo'),
57
('AmazonCoverImages','0','','Display Cover Images in staff interface from Amazon Web Services','YesNo'),
58
('AmazonLocale','US','US|CA|DE|FR|IN|JP|UK','Use to set the Locale of your Amazon.com Web Services','Choice'),
58
('AmazonLocale','US','US|CA|DE|FR|IN|JP|UK','Use to set the Locale of your Amazon.com Web Services','Choice'),
59
('AnonSuggestions','0',NULL,'Set to enable Anonymous suggestions to AnonymousPatron borrowernumber','YesNo'),
59
('AnonSuggestions','0',NULL,'Set to enable Anonymous suggestions to AnonymousPatron borrowernumber','YesNo'),
60
('AnonymizeLastBorrower','0',NULL,'If enabled, anonymise item\'s last borrower','YesNo'),
61
('AnonymizeLastBorrowerDays','0',NULL,'Item\'s last borrower older than this preference will be anonymised','Integer'),
60
('AnonymousPatron','0',NULL,'Set the identifier (borrowernumber) of the anonymous patron. Used for suggestion and checkout history privacy',''),
62
('AnonymousPatron','0',NULL,'Set the identifier (borrowernumber) of the anonymous patron. Used for suggestion and checkout history privacy',''),
61
('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'),
63
('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'),
62
('ArticleRequests', '0', NULL, 'Enables the article request feature', 'YesNo'),
64
('ArticleRequests', '0', NULL, 'Enables the article request feature', 'YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref (-1 / +8 lines)
Lines 428-433 Patrons: Link Here
428
           initiator: populateCookieConsentedJS
428
           initiator: populateCookieConsentedJS
429
           processor: prepareCookieConsentedJS
429
           processor: prepareCookieConsentedJS
430
         - '<br><strong>NOTE:</strong> The cookie consent modal can be customised using the <a href="/cgi-bin/koha/tools/additional-contents.pl?category=html_customizations" target="_blank">CookieConsentPopup</a> html customisation.'
430
         - '<br><strong>NOTE:</strong> The cookie consent modal can be customised using the <a href="/cgi-bin/koha/tools/additional-contents.pl?category=html_customizations" target="_blank">CookieConsentPopup</a> html customisation.'
431
     -
432
         - pref: AnonymizeLastBorrower
433
           choices:
434
               yes: Anonymize
435
               no: "Don't anonymize"
436
         - " item's last borrower after "
437
         - pref: AnonymizeLastBorrowerDays
438
         - days.
431
    Security:
439
    Security:
432
     -
440
     -
433
         - Login passwords for staff and patrons must be at least
441
         - Login passwords for staff and patrons must be at least
434
- 

Return to bug 23260