Koha-clms/debian
Nick Clemens ecfd85ebb8
Bug 23260: Add cronjob anonymize_last_borrowers.pl
This patch adds the feature to anonymize patrons from items_last_borrower table. This code is run from batch_anonymize script, which is triggered from a new cron job anonymize_last_borrowers.pl

To test:
 1) apply this patch and the previous ones
 2) perl installer/data/mysql/updatedatabase.pl
 3) set StoreLastBorrower preference to Allow.
 4) set AnonymousPatron preference to a valid patron id
 5) Create a Check out followed by a Check in.
    CHECK => a row should appear in items_last_borrower table with the borrower and the item number.
 6) In mysql, update created_on of items_last_borrower and returndate of old_issues to two days earlier.
 7) perl misc/cronjobs/anonymize_last_borrowers.pl
    CHECK => borrower number in items_last_borrower is not anonymized yet.
 8) Repeat step 5 and 6 but instead of two days earlier, set the new entry in items_last_borrower to three days earlier.
 9) set AnonymizeLastBorrower to 'Anonymize' and AnonymizeLastBorrowerDays to 2 days.
10) perl misc/cronjobs/anonymize_last_borrowers.pl
    SUCCESS => borrower number in items_last_borrower changed to AnonymousPatron id
11) repeat step 8
12) set AnonymousPatron preference to 0
13) perl misc/cronjobs/anonymize_last_borrowers.pl
SUCCESS => borrower number in items_last_borrower changed to null
14) prove t/db_dependent/Koha/Patrons.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Peter Moore <peter@mrcpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-03-05 08:33:46 -07:00
..
docs Bug 32736: Add --all-queues switch to koha-worker 2026-01-12 10:26:06 -07:00
scripts Bug 41337: Add missing Bash variable to `koha-create` 2026-02-26 09:04:15 -07:00
source
…
templates Bug 40993: (QA follow-up) use L flag to stop the rewrite after PT action 2026-01-12 10:53:37 -07:00
README.build
…
bd-to-depends
…
build-git-snapshot Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
changelog
…
clean
…
compat
…
control Bug 40164: (follow-up) Update debian/control 2025-07-08 15:41:58 -06:00
control.in Bug 25691: Replace link to non-existing README with wiki link 2024-01-16 12:06:08 +01:00
copyright Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
koha-common.README.Debian
…
koha-common.bash-completion Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
koha-common.config Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
koha-common.cron.d
…
koha-common.cron.daily Bug 23260: Add cronjob anonymize_last_borrowers.pl 2026-03-05 08:33:46 -07:00
koha-common.cron.hourly Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
koha-common.cron.monthly Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
koha-common.default
…
koha-common.dirs
…
koha-common.docs Bug 35713: Remove outdated debian/docs/LEEME.Debian file 2024-01-11 12:10:45 +01:00
koha-common.init
…
koha-common.install
…
koha-common.links
…
koha-common.logrotate
…
koha-common.postinst Bug 36954: (follow-up) Return to the two logfiles pattern 2025-02-18 10:55:27 +01:00
koha-common.preinst
…
koha-common.service Bug 33371: Add [Install] section to koha-common.service 2023-06-01 11:55:28 -03:00
koha-common.templates
…
koha-core.bash-completion Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
koha-core.config Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
koha-core.default
…
koha-core.dirs
…
koha-core.docs Bug 35713: Remove outdated debian/docs/LEEME.Debian file 2024-01-11 12:10:45 +01:00
koha-core.init
…
koha-core.install
…
koha-core.links
…
koha-core.logrotate
…
koha-core.postinst Bug 36954: (follow-up) Return to the two logfiles pattern 2025-02-18 10:55:27 +01:00
koha-core.preinst
…
koha-core.templates
…
koha-full.postinst
…
koha-post-install-setup Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
koha.README.Debian
…
koha.apache-ports
…
koha.config
…
koha.dirs
…
koha.install
…
koha.postinst Bug 25691: Replace link to non-existing README with wiki link 2024-01-16 12:06:08 +01:00
koha.postrm
…
koha.prerm
…
list-deps Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
rules
…
unavailable.html
…
update-control
…

README.build

In order to build .deb packages, following debian packages need to be present
(installed): 
devscripts
pbuilder
dh-make
fakeroot

As root (or sudo) execute:
pbuilder create

Executing build-git-snapshot without any arguments will leave package and the
rest in some pbuilder dir, eg. /var/cache/pbuilder/result It is highly
recommended that --buildresult option is used.