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

Return to bug 23260