]> git.koha-community.org Git - koha.git/commit
Bug 18169: Make 'before' param non mandatory for Koha::Patrons->anonymise_issue_history
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 24 Feb 2017 12:26:29 +0000 (13:26 +0100)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 3 Mar 2017 18:16:54 +0000 (18:16 +0000)
commitff647be07c54191f1c1ee5693be96bf4d0040672
treee4b11b0f1ebb5662523119ec186d54561977f831
parentb6cb18c4a8292cabe5fd611b349b51d5c79b5fe4
Bug 18169: Make 'before' param non mandatory for Koha::Patrons->anonymise_issue_history

From opac-privacy.pl:

    # delete all reading records for items returned
    # uses a hardcoded date ridiculously far in the future

    my $rows = eval {
        Koha::Patrons->search({ 'me.borrowernumber' => $borrowernumber })->anonymise_issue_history( { before => '2999-12-12' } );
    };

It sounds better to make this before parameter not mandatory, and remove the condition from the sql query if it is not passed.

Test plan:
1. Anonymise your reading history at the OPAC.
2. Confirm that all your reading history has been anonymised

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Koha/Patrons.pm
opac/opac-privacy.pl
t/db_dependent/Koha/Patrons.t