Koha/koha-tmpl/intranet-tmpl/prog/en/modules/tools
Jonathan Druart 286be46e8a Bug 16966: Koha::Patrons - Move GetBorrowersWithIssuesHistoryOlderThan to search_patrons_to_anonymise
The C4::Members::GetBorrowersWithIssuesHistoryOlderThan subroutine is supposed
to return the patrons with an issue history older than a given date.

It would make more sense to return a list of Koha::Patrons.

On the way, the code from AnonymiseIssueHistory will be moved as well to
anonymise_issue_history.

Note that these 2 subroutines are strongly linked: one is used to know the
number of patrons we will anonymise the history, the other one is used to
anonymise the issues history. The problem is that the first one is not used to
do the action, but only for displayed purpose.

In some cases, these 2 values can differ, which could be confusing.
Case 1:
The logged in librarian is not superlibrarian and IndependentBranches is set:
if 2+ patrons from different libraries match the date parameter, the interface
will display "Checkout history for 2 patrons will be anonymized", when actually
only 1 will be.
Case 2:
If 2+ patrons match the date parameter but one of them has his privacy set to
forever (privacy=0), the same issue will appear.

This patch moves the code from C4::Members::GetBorrowersWithIssuesHistoryOlderThan
to Koha::Patrons->search_patrons_to_anonymise and from
C4::Circulation::AnonymiseIssueHistory to
Koha::Patrons->anonymise_issue_history

Test plan:
1/ Confirm the 2 issues and make sure they are fixed using the Batch
patron anonymization tool (tools/cleanborrowers.pl)
2/ At the OPAC, use the 'Immediate deletion' button to delete all your
reading history (regardless the setting of the privacy rule)
3/ Use the cronjob script (misc/cronjobs/batch_anonymise.pl) to
anonymise patrons.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2017-03-03 17:20:03 +00:00
..
automatic_item_modification_by_age.tt Bug 16239: Update templates 2017-01-13 14:41:22 +00:00
batch_delete_records.tt Bug 16949: Simplify the checkbox checked condition 2016-09-13 17:24:38 +00:00
batch_record_modification.tt Bug 16239 [CSS Follow-up] Upgrade Bootstrap in the staff client 2017-01-13 14:41:23 +00:00
batchMod-del.tt Bug 16239: Update templates 2017-01-13 14:41:22 +00:00
batchMod-edit.tt Bug 18095: Batch item modification: Better message if no item is modified 2017-02-14 14:31:44 +00:00
batchMod.tt Bug 10887: Batch item deletion -- doesn't need Use default values section 2015-04-08 11:09:08 -03:00
cleanborrowers.tt Bug 16966: Koha::Patrons - Move GetBorrowersWithIssuesHistoryOlderThan to search_patrons_to_anonymise 2017-03-03 17:20:03 +00:00
csv-profiles.tt Bug 16239: Update templates 2017-01-13 14:41:22 +00:00
export.tt Bug 18087: Handle invalid filetypes 2017-03-03 17:07:39 +00:00
holidays.tt Bug 16239: Update templates 2017-01-13 14:41:22 +00:00
import_borrowers.tt Bug 15758: Koha::Libraries - Remove GetBranchesLoop 2016-09-08 14:36:02 +00:00
inventory.tt Bug 18099 - Put call number in its own column on inventory screen 2017-02-17 17:09:22 +00:00
koha-news.tt Bug 17960: Rename opac_news.new with opac_news.content 2017-02-06 17:42:12 +00:00
letter.tt Bug 16239: Update templates 2017-01-13 14:41:22 +00:00
manage-marc-import.tt Bug 18063: Remove dead code from tools/manage-marc-import.tt 2017-02-17 15:47:31 +00:00
marc_modification_templates.tt Bug 16239: Update templates 2017-01-13 14:41:22 +00:00
modborrowers.tt Bug 11932: Move delete checkbox on patron modification to right 2017-02-17 17:11:59 +00:00
overduerules.tt Bug 15758: Koha::Libraries - Remove GetBranchesLoop 2016-09-08 14:36:02 +00:00
picture-upload.tt Bug 17146: Fix CSRF in picture-upload.pl 2016-09-15 13:33:58 +00:00
quotes-upload.tt Bug 16513 - Improvements and fixes for quote upload process 2016-06-24 13:47:34 +00:00
quotes.tt Bug 16513 - Improvements and fixes for quote upload process 2016-06-24 13:47:34 +00:00
scheduler.tt
showdiffmarc.tt
stage-marc-import.tt Bug 16239: Update templates 2017-01-13 14:41:22 +00:00
tools-home.tt Revert "Bug 12461 - Add patron clubs feature" 2017-02-26 20:41:27 -05:00
upload-images.tt Bug 18040: Updating buttons in Tools -> Upload local cover image 2017-02-17 15:46:39 +00:00
upload.tt Bug 14854: Add DataTables on upload results table 2017-02-17 11:36:06 +00:00
viewlog.tt Bug 15758: Koha::Libraries - Remove GetBranchName 2016-09-08 14:36:01 +00:00