Bug 16966 sought to move the patron selection routines from GetBorrowersWithIssuesHistoryOlderThan in C4 to a dbic centric query in Koha::Patrons. However, in do so, the resultant query was changed in such a way that rather than filtering patrons to anonymise by their home branch you are actually filtering by patrons who have ever had an biblio issued to them from a particular branch. This is a surprising and unexpected change in functionality for users upgrading to 17.05.
Created attachment 76169 [details] [review] Bug 20964: Restore original filtering behaviour after bug 16966 Bug 16966 altered the filter criteria of the anonymise selection, this patch restores the original behaviour.
I take that back.. it's not a change of behaviour... but a counter-intuitive behaviour to start with :(