[Koha-bugs] [Bug 16966] New: Koha:: Patrons - Move GetBorrowersWithIssuesHistoryOlderThan to search_patrons_to_anonymise

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Jul 22 18:35:48 CEST 2016


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16966

            Bug ID: 16966
           Summary: Koha::Patrons - Move
                    GetBorrowersWithIssuesHistoryOlderThan to
                    search_patrons_to_anonymise
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: ASSIGNED
          Severity: enhancement
          Priority: P5 - low
         Component: Architecture, internals, and plumbing
          Assignee: jonathan.druart at bugs.koha-community.org
          Reporter: jonathan.druart at bugs.koha-community.org
        QA Contact: testopia at bugs.koha-community.org
        Depends on: 16961, 16965
            Blocks: 16846

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.

The patches provided will refactor the code and fix these 2 issues.


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16846
[Bug 16846] Move patron related code to Koha::Patron
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16961
[Bug 16961] Add the Koha::Objects->update method
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16965
[Bug 16965] Add the Koha::Objects->search_related method
-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list