Summary: | Allow patron anonymize/bulk delete tool to be limited by branch | ||
---|---|---|---|
Product: | Koha | Reporter: | Kyle M Hall <kyle.m.hall> |
Component: | Tools | Assignee: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | amy, kyle.m.hall, kyle, nicole, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | Sponsored | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
Bug 15023: Allow patron anonymize/bulk delete tool to be limited by branch
Bug 15023: (followup) Remove warnings [SIGNED-OFF] Bug 15023: Allow patron anonymize/bulk delete tool to be limited by branch [SIGNED-OFF] Bug 15023: (followup) Remove warnings [PASSED QA] Bug 15023: Allow patron anonymize/bulk delete tool to be limited by branch [PASSED QA] Bug 15023: (followup) Remove warnings |
Description
Kyle M Hall
2015-10-16 12:20:35 UTC
Created attachment 52899 [details] [review] Bug 15023: Allow patron anonymize/bulk delete tool to be limited by branch This patch makes the bulk patron delete/anonymize functionality be limited by branch. It does so by adding a branch selection dropdown and using the already defined APIs for filtering by branch. It makes use of C4::Branches::onlymine for the IndependentBranches use case and it adds a way to call it from the Branches template plugin. To test: - Apply the patch 1) Have a superlibrarian user - Go to Tools > Batch patron deletion/anonymization => SUCCESS: Verify you can pick a branch (or all of them) - Try doing some operations => SUCCESS: Verify the selection is respected, and carried around all steps 2) Have a user with tools/delete_anonymize_patrons permissions - Set IndependentBranches on - Go to Tools > Batch patron deletion/anonymization => SUCCESS: It picks the librarian's branch and doesn't let us choose another one - Try doing some operations => SUCCESS: Verify the user's branch is respected, and carried around all steps - Sign off :-D Sponsored-by: VOKAL Created attachment 52900 [details] [review] Bug 15023: (followup) Remove warnings By setting 'use Modern::Perl' some previously hidden warnings arised. This patch removes them by testing the variable $balance for undef before using it in a comparisson. Sponsored-by: VOKAL Created attachment 53463 [details] [review] [SIGNED-OFF] Bug 15023: Allow patron anonymize/bulk delete tool to be limited by branch This patch makes the bulk patron delete/anonymize functionality be limited by branch. It does so by adding a branch selection dropdown and using the already defined APIs for filtering by branch. It makes use of C4::Branches::onlymine for the IndependentBranches use case and it adds a way to call it from the Branches template plugin. To test: - Apply the patch 1) Have a superlibrarian user - Go to Tools > Batch patron deletion/anonymization => SUCCESS: Verify you can pick a branch (or all of them) - Try doing some operations => SUCCESS: Verify the selection is respected, and carried around all steps 2) Have a user with tools/delete_anonymize_patrons permissions - Set IndependentBranches on - Go to Tools > Batch patron deletion/anonymization => SUCCESS: It picks the librarian's branch and doesn't let us choose another one - Try doing some operations => SUCCESS: Verify the user's branch is respected, and carried around all steps - Sign off :-D Sponsored-by: VOKAL Signed-off-by: Liz Rea <liz@catalyst.net.nz> Created attachment 53464 [details] [review] [SIGNED-OFF] Bug 15023: (followup) Remove warnings By setting 'use Modern::Perl' some previously hidden warnings arised. This patch removes them by testing the variable $balance for undef before using it in a comparisson. Sponsored-by: VOKAL Signed-off-by: Liz Rea <liz@catalyst.net.nz> My patron's homebranch is Midway. IndependentBranches is turned off. I am trying to anonymize the checkout history older than yesterday for Springfield patrons. I have one entry in old_issues, where the patron is from Springfield. -> The tool reports: 0 patron's checkout histories will be anonymized. When I choose Midway it reports it will delete the checkout histories of 5 people. When I check old_issues, there seem to be only 4 people with checkout histories to delete: select count(distinct borrowernumber) from old_issues where borrowernumber in (select borrowernumber from borrowers where branchcode = "MPL") Can you please check, what's going on here? We found out: while deleting patrons works by the patron's homebranch, anonymizing uses the checkout branch. As this is the existing behaviour with independent branches turned on, the new behaviour is consistent. Maybe this could be added as a note to documentation. Created attachment 53735 [details] [review] [PASSED QA] Bug 15023: Allow patron anonymize/bulk delete tool to be limited by branch This patch makes the bulk patron delete/anonymize functionality be limited by branch. It does so by adding a branch selection dropdown and using the already defined APIs for filtering by branch. It makes use of C4::Branches::onlymine for the IndependentBranches use case and it adds a way to call it from the Branches template plugin. To test: - Apply the patch 1) Have a superlibrarian user - Go to Tools > Batch patron deletion/anonymization => SUCCESS: Verify you can pick a branch (or all of them) - Try doing some operations => SUCCESS: Verify the selection is respected, and carried around all steps 2) Have a user with tools/delete_anonymize_patrons permissions - Set IndependentBranches on - Go to Tools > Batch patron deletion/anonymization => SUCCESS: It picks the librarian's branch and doesn't let us choose another one - Try doing some operations => SUCCESS: Verify the user's branch is respected, and carried around all steps - Sign off :-D Sponsored-by: VOKAL Signed-off-by: Liz Rea <liz@catalyst.net.nz> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 53736 [details] [review] [PASSED QA] Bug 15023: (followup) Remove warnings By setting 'use Modern::Perl' some previously hidden warnings arised. This patch removes them by testing the variable $balance for undef before using it in a comparisson. Sponsored-by: VOKAL Signed-off-by: Liz Rea <liz@catalyst.net.nz> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Pushed to master for 16.11, thanks Tomas! |