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 4184-4190 DROP TABLE IF EXISTS `items_last_borrower`; Link Here
4184
CREATE TABLE `items_last_borrower` (
4184
CREATE TABLE `items_last_borrower` (
4185
  `id` int(11) NOT NULL AUTO_INCREMENT,
4185
  `id` int(11) NOT NULL AUTO_INCREMENT,
4186
  `itemnumber` int(11) NOT NULL,
4186
  `itemnumber` int(11) NOT NULL,
4187
  `borrowernumber` int(11) NOT NULL,
4187
  `borrowernumber` int(11) NULL,
4188
  `created_on` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
4188
  `created_on` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
4189
  PRIMARY KEY (`id`),
4189
  PRIMARY KEY (`id`),
4190
  UNIQUE KEY `itemnumber` (`itemnumber`),
4190
  UNIQUE KEY `itemnumber` (`itemnumber`),
(-)a/installer/data/mysql/mandatory/sysprefs.sql (+2 lines)
Lines 62-67 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
62
('AmazonCoverImages','0','','Display Cover Images in staff interface from Amazon Web Services','YesNo'),
62
('AmazonCoverImages','0','','Display Cover Images in staff interface from Amazon Web Services','YesNo'),
63
('AmazonLocale','US','US|CA|DE|FR|IN|JP|UK','Use to set the Locale of your Amazon.com Web Services','Choice'),
63
('AmazonLocale','US','US|CA|DE|FR|IN|JP|UK','Use to set the Locale of your Amazon.com Web Services','Choice'),
64
('AnonSuggestions','0',NULL,'Set to enable Anonymous suggestions to AnonymousPatron borrowernumber','YesNo'),
64
('AnonSuggestions','0',NULL,'Set to enable Anonymous suggestions to AnonymousPatron borrowernumber','YesNo'),
65
('AnonymizeLastBorrower','0',NULL,'If enabled, anonymise item\'s last borrower','YesNo'),
66
('AnonymizeLastBorrowerDays','0',NULL,'Item\'s last borrower older than this preference will be anonymised','Integer'),
65
('AnonymousPatron','0',NULL,'Set the identifier (borrowernumber) of the anonymous patron. Used for suggestion and checkout history privacy',''),
67
('AnonymousPatron','0',NULL,'Set the identifier (borrowernumber) of the anonymous patron. Used for suggestion and checkout history privacy',''),
66
('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'),
68
('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'),
67
('ArticleRequests', '0', NULL, 'Enables the article request feature', 'YesNo'),
69
('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 461-466 Patrons: Link Here
461
           initiator: populateCookieConsentedJS
461
           initiator: populateCookieConsentedJS
462
           processor: prepareCookieConsentedJS
462
           processor: prepareCookieConsentedJS
463
         - '<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.'
463
         - '<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.'
464
     -
465
         - pref: AnonymizeLastBorrower
466
           choices:
467
               yes: Anonymize
468
               no: "Don't anonymize"
469
         - " item's last borrower after "
470
         - pref: AnonymizeLastBorrowerDays
471
         - days.
464
    Security:
472
    Security:
465
     -
473
     -
466
         - Login passwords for staff and patrons must be at least
474
         - Login passwords for staff and patrons must be at least
467
- 

Return to bug 23260