Bug 31854

Summary: Document conflict with delete_patrons.pl --not_borrowed_since and anonymization
Product: Koha Reporter: Magnus Enger <magnus>
Component: Command-line UtilitiesAssignee: Magnus Enger <magnus>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: caroline.cyr-la-rose, david, lucas, robin
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Caroline Cyr La Rose Documentation submission: https://gitlab.com/koha-community/koha-manual/-/merge_requests/678
Text to go in the release notes:
Version(s) released in:
22.11.00
Attachments: Bug 31854: Document --not_borrowed_since and anonymization
Bug 31854: Document --not_borrowed_since and anonymization
Bug 31854: Document --not_borrowed_since and anonymization
Bug 31854: (QA follow-up) Terminology: loans > checkouts

Description Magnus Enger 2022-10-18 12:20:37 UTC
delete_patrons.pl has this option: 

    --not_borrowed_since
        Delete patrons who have not borrowed since this date.

This sounds easy enough, but if you have patrons with borrowers.privacy = 2, they will have their issues/loans anonymized as they are returned, resulting in an empty history, and they will be deleted the next time delete_patrons.pl is run, even if they have just been active. 

This is not a problem in itself, but a reminder could be added to the documentation for --not_borrowed_since, to avoid patrons being unduly deleted.
Comment 1 Magnus Enger 2022-10-18 12:43:50 UTC
There could be more reasons for anonymization than borrowers.privacy = 2. Also: 

- borrowers.privacy = 1 + misc/cronjobs/batch_anonymise.pl
- patrons choosing to anonymize their history in the OPAC
Comment 2 Magnus Enger 2022-10-18 12:58:41 UTC
Created attachment 142055 [details] [review]
Bug 31854: Document --not_borrowed_since and anonymization

To test:
- Run "perldoc misc/cronjobs/delete_patrons.pl"
- Note the absence of information about the potential conflict
  between --not_borrowed_since and anonymization
- Apply this patch
- Re-run the perldoc command and make sure the note about
  anonymization make sense
Comment 3 David Nind 2022-11-01 01:34:38 UTC
Created attachment 142849 [details] [review]
Bug 31854: Document --not_borrowed_since and anonymization

To test:
- Run "perldoc misc/cronjobs/delete_patrons.pl"
- Note the absence of information about the potential conflict
  between --not_borrowed_since and anonymization
- Apply this patch
- Re-run the perldoc command and make sure the note about
  anonymization make sense

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 David Nind 2022-11-01 01:35:48 UTC
Updated the assignee...
Comment 5 Katrin Fischer 2022-11-02 19:09:40 UTC
Created attachment 143027 [details] [review]
Bug 31854: Document --not_borrowed_since and anonymization

To test:
- Run "perldoc misc/cronjobs/delete_patrons.pl"
- Note the absence of information about the potential conflict
  between --not_borrowed_since and anonymization
- Apply this patch
- Re-run the perldoc command and make sure the note about
  anonymization make sense

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Katrin Fischer 2022-11-02 19:11:11 UTC
Created attachment 143028 [details] [review]
Bug 31854: (QA follow-up) Terminology: loans > checkouts
Comment 7 Tomás Cohen Arazi 2022-11-03 14:32:17 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!