[Bug 37418] New: Expand delete_patron.pl / Patrons with defined restrictions should not be deleted
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37418 Bug ID: 37418 Summary: Expand delete_patron.pl / Patrons with defined restrictions should not be deleted Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Patrons Assignee: koha-bugs@lists.koha-community.org Reporter: michaela.sieber@kit.edu QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com In some cases we don't want borrowers / patrons not to be deleted if they have certain restrictions. Therefor we add a new parameter to the cronjob delete_patrons.pl (see manual https://koha-community.org/manual/latest/en/html/cron_jobs.html#batch-delete... ) -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37418 Michaela Sieber <michaela.sieber@kit.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |raphael.straub@kit.edu |ity.org | CC| |clemens.tubach@kit.edu -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37418 --- Comment #1 from Raphael Straub <raphael.straub@kit.edu> --- Created attachment 169688 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=169688&action=edit Bug 37418: delete_patrons.pl: Exclude patrons with restrictions Add the option "--without_restriction_type" so that delete_patrons.pl does not delete patrons with given restriction types. To test: 1) Run misc/cronjobs/delete_patrons.pl --not_borrowed_since 2010-01-01 and choose a borrowernumber that would be deleted. 2) In your browser go to /cgi-bin/koha/members/moremember.pl?borrowernumber=<borrowernumber> and add a manual restriction to this patron. 3) Apply the patch. 4) Run misc/cronjobs/delete_patrons.pl --not_borrowed_since 2010-01-01 \ --without_restriction_type MANUAL 5) Check that the patron with the manual restriction would not be deleted. Sponsored-by: Karlsruhe Institute of Technology (KIT) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37418 Raphael Straub <raphael.straub@kit.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37418 Raphael Straub <raphael.straub@kit.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37418 Raphael Straub <raphael.straub@kit.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Change sponsored?|--- |Sponsored -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37418 Roman Dolny <roman.dolny@jezuici.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37418 Roman Dolny <roman.dolny@jezuici.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #169688|0 |1 is obsolete| | --- Comment #2 from Roman Dolny <roman.dolny@jezuici.pl> --- Created attachment 169879 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=169879&action=edit Bug 37418: delete_patrons.pl: Exclude patrons with restrictions Add the option "--without_restriction_type" so that delete_patrons.pl does not delete patrons with given restriction types. To test: 1) Run misc/cronjobs/delete_patrons.pl --not_borrowed_since 2010-01-01 and choose a borrowernumber that would be deleted. 2) In your browser go to /cgi-bin/koha/members/moremember.pl?borrowernumber=<borrowernumber> and add a manual restriction to this patron. 3) Apply the patch. 4) Run misc/cronjobs/delete_patrons.pl --not_borrowed_since 2010-01-01 \ --without_restriction_type MANUAL 5) Check that the patron with the manual restriction would not be deleted. Sponsored-by: Karlsruhe Institute of Technology (KIT) Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37418 Lauren Denny <lauren_denny@sil.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lauren_denny@sil.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37418 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Status|Signed Off |Failed QA --- Comment #3 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Can there be a unit test added to cover the changes to GetBorrowersToExpunge? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37418 --- Comment #4 from Raphael Straub <raphael.straub@kit.edu> --- (In reply to Lucas Gass (lukeg) from comment #3)
Can there be a unit test added to cover the changes to GetBorrowersToExpunge? Yes, I will add a unit test.
-- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37418 --- Comment #5 from Raphael Straub <raphael.straub@kit.edu> --- Created attachment 176777 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176777&action=edit Bug 37418: (follow-up) Add unit tests for GetBorrowersToExpunge() Add unit tests for testing the new parameter without_restriction_types of C4::Members::GetBorrowersToExpunge(). Sponsored-by: Karlsruhe Institute of Technology (KIT) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37418 Raphael Straub <raphael.straub@kit.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37418 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Patch doesn't apply -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37418 Michaela Sieber <michaela.sieber@kit.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |raphael.straub@kit.edu -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37418 Raphael Straub <raphael.straub@kit.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37418 Raphael Straub <raphael.straub@kit.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #169879|0 |1 is obsolete| | --- Comment #6 from Raphael Straub <raphael.straub@kit.edu> --- Created attachment 179151 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=179151&action=edit Bug 37418: delete_patrons.pl: Exclude patrons with restrictions Add the option "--without_restriction_type" so that delete_patrons.pl does not delete patrons with given restriction types. To test: 1) Run misc/cronjobs/delete_patrons.pl --not_borrowed_since 2010-01-01 and choose a borrowernumber that would be deleted. 2) In your browser go to /cgi-bin/koha/members/moremember.pl?borrowernumber=<borrowernumber> and add a manual restriction to this patron. 3) Apply the patch. 4) Run misc/cronjobs/delete_patrons.pl --not_borrowed_since 2010-01-01 \ --without_restriction_type MANUAL 5) Check that the patron with the manual restriction would not be deleted. Sponsored-by: Karlsruhe Institute of Technology (KIT) Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37418 Raphael Straub <raphael.straub@kit.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|raphael.straub@kit.edu | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37418 Thomas Klausner <domm@plix.at> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |domm@plix.at |y.org | CC| |domm@plix.at -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37418 Thomas Klausner <domm@plix.at> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #176777|0 |1 is obsolete| | --- Comment #7 from Thomas Klausner <domm@plix.at> --- Created attachment 180715 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=180715&action=edit Bug 37418: (follow-up) Add unit tests for GetBorrowersToExpunge() Add unit tests for testing the new parameter without_restriction_types of C4::Members::GetBorrowersToExpunge(). Sponsored-by: Karlsruhe Institute of Technology (KIT) Signed-off-by: Thomas Klausner <domm@plix.at> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37418 Thomas Klausner <domm@plix.at> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #179151|0 |1 is obsolete| | --- Comment #8 from Thomas Klausner <domm@plix.at> --- Created attachment 180716 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=180716&action=edit Bug 37418: delete_patrons.pl: Exclude patrons with restrictions Add the option "--without_restriction_type" so that delete_patrons.pl does not delete patrons with given restriction types. To test: 1) Run misc/cronjobs/delete_patrons.pl --not_borrowed_since 2010-01-01 and choose a borrowernumber that would be deleted. 2) In your browser go to /cgi-bin/koha/members/moremember.pl?borrowernumber=<borrowernumber> and add a manual restriction to this patron. 3) Apply the patch. 4) Run misc/cronjobs/delete_patrons.pl --not_borrowed_since 2010-01-01 \ --without_restriction_type MANUAL 5) Check that the patron with the manual restriction would not be deleted. Sponsored-by: Karlsruhe Institute of Technology (KIT) Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Thomas Klausner <domm@plix.at> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37418 Thomas Klausner <domm@plix.at> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #9 from Thomas Klausner <domm@plix.at> --- I had to adapt the test (because of NoWarnings and changed test count upstream) Besides that everything works as advertives in the test plan! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37418 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |robin@catalyst.net.nz Component|Patrons |Command-line Utilities Version|unspecified |Main Summary|Expand delete_patron.pl / |Expand delete_patron.pl |Patrons with defined |with option to not delete |restrictions should not be |patrons with restrictions |deleted | Keywords| |release-notes-needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37418 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |25.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37418 --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 25.05! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37418 Michaela Sieber <michaela.sieber@kit.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This feature adds a new release notes| |parameter to the cronjob | |delete_patrons.pl which | |gives an option to not | |delete patrons with given | |restriction types. | |The | |parameter | |"--without_restriction_type | |" is repeatable. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37418 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lisette@bywatersolutions.co | |m Keywords|release-notes-needed | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37418 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the|This feature adds a new |This feature adds a new release notes|parameter to the cronjob |parameter to the cronjob |delete_patrons.pl which |delete_patrons.pl which |gives an option to not |gives an option to not |delete patrons with given |delete patrons with given |restriction types. |restriction types. |The |The |parameter |parameter |"--without_restriction_type |`--without_restriction_type |" is repeatable. |` is repeatable. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37418 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Needs documenting CC| |fridolin.somers@biblibre.co | |m --- Comment #11 from Fridolin Somers <fridolin.somers@biblibre.com> --- Enhancement not pushed to 24.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37418 Aude Charillon <aude.charillon@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Documentation| |https://gitlab.com/koha-com submission| |munity/koha-manual/-/merge_ | |requests/1172 CC| |aude.charillon@openfifth.co | |.uk Documentation| |Aude Charillon contact| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37418 Aude Charillon <aude.charillon@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Needs documenting |RESOLVED --- Comment #12 from Aude Charillon <aude.charillon@openfifth.co.uk> --- Koha Manual updated. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org