Bug 28968 - recreateIssueStatistics.pl should (optionally?) ignore the anonymous borrower
Summary: recreateIssueStatistics.pl should (optionally?) ignore the anonymous borrower
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 28969
  Show dependency treegraph
 
Reported: 2021-09-07 21:23 UTC by Andrew Fuerste-Henry
Modified: 2023-07-01 13:40 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Fuerste-Henry 2021-09-07 21:23:04 UTC
The script recreateIssueStatistics.pl compares issues/old_issues to statistics to determine if there are any borrowernumber/itemnumber/date combinations present in the former that are not present in the latter. If it finds anything in (old_)issues that's not in statistics, it writes it into statistics to correct things.

However, this goes awry really quickly if one is anonymizing reading history. In those cases, we expect to have a bunch of entries in old_issues tied to the anonymous borrower, but we never expect to find the anonymous borrower in the statistics table because we're maintaining the actual patron's borrowernumber there.

recreateIssueStatistics.pl should have the option to *not* copy/recreate issues tied to the anonymous borrower.
Comment 1 Katrin Fischer 2023-07-01 13:40:02 UTC
But won't this lead to missing checkouts/checking if you use statistics table for statistics? It might be better as a switch/option on the script.