[Bug 23219] New: Prevent patron delete if holds
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23219 Bug ID: 23219 Summary: Prevent patron delete if holds Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Patrons Assignee: koha-bugs@lists.koha-community.org Reporter: emmi.takkinen@outlook.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com Target Milestone: --- Currently it's possible to delete patron with holds. This should be prevented like deleting patrons with checkouts. In this way it would be in-line to checkout and account handling. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23219 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I think this was discussed a long time ago and we had decided that holds should be cancel. Not sure if there is consensus here - cancelling a lot of holds manually could be time consuming. Maybe a confirmation question with an option to cancel them? -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23219 --- Comment #2 from Owen Leonard <oleonard@myacpl.org> --- I would think that the problem would be limited to waiting holds. If a patron has a hold which is unfulfilled why not automatically cancel it? -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23219 --- Comment #3 from Emmi Takkinen <emmi.takkinen@outlook.com> --- We have noticed that when you delete patron with holds the holds just disappear and there is no data in old_reserves. Maybe other solution is to move holds to the old_reserves when deleting? -- 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=23219 Emmi Takkinen <emmi.takkinen@outlook.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|koha-bugs@lists.koha-commun |emmi.takkinen@outlook.com |ity.org | --- Comment #4 from Emmi Takkinen <emmi.takkinen@outlook.com> --- Created attachment 91175 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91175&action=edit Bug 23219: Cancel patrons holds when patron delete Currently deleting a patron deletes all their holds and leaves no record to the "old_reserves" table. Steps to reproduce: - Create a patron - Add holds for patron - Holds are recorded to "reserves" table - Delete patron - Confirm delete =>Patron and all holds are deleted and no record of holds is left in "old_reserves" table This patch displays alert text notifying user that deleting patron cancels all their holds. Holds are cancelled instead of deleting them. This patch also writes stringified datetime to holds cancel log instead of whole datetime object. To test: - Apply this patch - Create a patron - Add holds for patron - Holds are recorded to "reserves" table - Delete patron - Alert text of holds is displayed - Confirm patron delete => Patron is deleted, their holds are cancelled and moved to "old_reserves" table -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23219 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #5 from Owen Leonard <oleonard@myacpl.org> --- Everything looks like it's working as it should. There's just one minor complaint from the QA tool: FAIL koha-tmpl/intranet-tmpl/prog/en/modules/members/deletemem.tt FAIL filters missing_filter at line 41 ( <h3>Patron has [% ItemsOnHold %] hold(s). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23219 Emmi Takkinen <emmi.takkinen@outlook.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #91175|0 |1 is obsolete| | --- Comment #6 from Emmi Takkinen <emmi.takkinen@outlook.com> --- Created attachment 91281 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91281&action=edit Bug 23219: Cancel patrons holds when patron delete Fixed missing filter from "ItemsOnHold". -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23219 Emmi Takkinen <emmi.takkinen@outlook.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23219 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off 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=23219 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #91281|0 |1 is obsolete| | --- Comment #7 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 91331 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91331&action=edit Bug 23219: Cancel patrons holds when patron delete Currently deleting a patron deletes all their holds and leaves no record to the "old_reserves" table. Steps to reproduce: - Create a patron - Add holds for patron - Holds are recorded to "reserves" table - Delete patron - Confirm delete =>Patron and all holds are deleted and no record of holds is left in "old_reserves" table This patch displays alert text notifying user that deleting patron cancels all their holds. Holds are cancelled instead of deleting them. This patch also writes stringified datetime to holds cancel log instead of whole datetime object. To test: - Apply this patch - Create a patron - Add holds for patron - Holds are recorded to "reserves" table - Delete patron - Alert text of holds is displayed - Confirm patron delete => Patron is deleted, their holds are cancelled and moved to "old_reserves" table Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23219 Nadine Pierre <nadine.pierre@InLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #91331|0 |1 is obsolete| | --- Comment #8 from Nadine Pierre <nadine.pierre@InLibro.com> --- Created attachment 91333 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91333&action=edit Bug 23219: Cancel patrons holds when patron delete Currently deleting a patron deletes all their holds and leaves no record to the "old_reserves" table. Steps to reproduce: - Create a patron - Add holds for patron - Holds are recorded to "reserves" table - Delete patron - Confirm delete =>Patron and all holds are deleted and no record of holds is left in "old_reserves" table This patch displays alert text notifying user that deleting patron cancels all their holds. Holds are cancelled instead of deleting them. This patch also writes stringified datetime to holds cancel log instead of whole datetime object. To test: - Apply this patch - Create a patron - Add holds for patron - Holds are recorded to "reserves" table - Delete patron - Alert text of holds is displayed - Confirm patron delete => Patron is deleted, their holds are cancelled and moved to "old_reserves" table Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23219 Arthur Bousquet <arthur.bousquet@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #91333|0 |1 is obsolete| | --- Comment #9 from Arthur Bousquet <arthur.bousquet@inlibro.com> --- Created attachment 91351 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91351&action=edit Bug 23219: Cancel patrons holds when patron delete Currently deleting a patron deletes all their holds and leaves no record to the "old_reserves" table. Steps to reproduce: - Create a patron - Add holds for patron - Holds are recorded to "reserves" table - Delete patron - Confirm delete =>Patron and all holds are deleted and no record of holds is left in "old_reserves" table This patch displays alert text notifying user that deleting patron cancels all their holds. Holds are cancelled instead of deleting them. This patch also writes stringified datetime to holds cancel log instead of whole datetime object. To test: - Apply this patch - Create a patron - Add holds for patron - Holds are recorded to "reserves" table - Delete patron - Alert text of holds is displayed - Confirm patron delete => Patron is deleted, their holds are cancelled and moved to "old_reserves" table Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com> Signed-off-by: Arthur Bousquet <arthur.bousquet@inlibro.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23219 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Prevent patron delete if |Show a warning about |holds |cancelling their holds | |before a patron is deleted -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23219 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #91351|0 |1 is obsolete| | --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 91395 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91395&action=edit Bug 23219: Cancel patrons holds when patron delete Currently deleting a patron deletes all their holds and leaves no record to the "old_reserves" table. Steps to reproduce: - Create a patron - Add holds for patron - Holds are recorded to "reserves" table - Delete patron - Confirm delete =>Patron and all holds are deleted and no record of holds is left in "old_reserves" table This patch displays alert text notifying user that deleting patron cancels all their holds. Holds are cancelled instead of deleting them. This patch also writes stringified datetime to holds cancel log instead of whole datetime object. To test: - Apply this patch - Create a patron - Add holds for patron - Holds are recorded to "reserves" table - Delete patron - Alert text of holds is displayed - Confirm patron delete => Patron is deleted, their holds are cancelled and moved to "old_reserves" table Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com> Signed-off-by: Arthur Bousquet <arthur.bousquet@inlibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23219 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Emmi, this works really well, but according to our coding guidelines any change to one of the C4 or Koha routines should be accompanied by a unit test testing the changed/new behaviour. Would you be able to provide a test? Let us know if we can help. With the test, you can switch back to Signed off straight away. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23219 --- Comment #12 from Emmi Takkinen <emmi.takkinen@outlook.com> --- Created attachment 91423 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91423&action=edit Bug 23219: (QA Follow up) Cancel patrons holds when patron Adds test for patrons holds cancelation when patron is deleted. Test plan: Run t/db_dependent/Koha/Patrons.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23219 Emmi Takkinen <emmi.takkinen@outlook.com> 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=23219 --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Emmi, for the tests - should this line not be removed now or changed? As we don't want to delete but cancel: is( Koha::Holds->search( { borrowernumber => $patron->{borrowernumber} } )->count, 0, q|Koha::Patron->delete should have deleted patron's holds| ); I'll change the wording in a follow-up. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23219 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23219 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #91395|0 |1 is obsolete| | --- Comment #14 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 91473 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91473&action=edit Bug 23219: Cancel patrons holds when patron delete Currently deleting a patron deletes all their holds and leaves no record to the "old_reserves" table. Steps to reproduce: - Create a patron - Add holds for patron - Holds are recorded to "reserves" table - Delete patron - Confirm delete =>Patron and all holds are deleted and no record of holds is left in "old_reserves" table This patch displays alert text notifying user that deleting patron cancels all their holds. Holds are cancelled instead of deleting them. This patch also writes stringified datetime to holds cancel log instead of whole datetime object. To test: - Apply this patch - Create a patron - Add holds for patron - Holds are recorded to "reserves" table - Delete patron - Alert text of holds is displayed - Confirm patron delete => Patron is deleted, their holds are cancelled and moved to "old_reserves" table Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com> Signed-off-by: Arthur Bousquet <arthur.bousquet@inlibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23219 --- Comment #15 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 91474 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91474&action=edit Bug 23219: (QA Follow up) Cancel patrons holds when patron delete Adds test for patrons holds cancelation when patron is deleted. Test plan: Run t/db_dependent/Koha/Patrons.t Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23219 --- Comment #16 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 91475 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91475&action=edit Bug 23219: (QA follow-up) Change wording of test slightly We no longer delete, but cancel the holds when deleting a patron. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23219 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Attachment #91423|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23219 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |19.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23219 --- Comment #17 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work! Pushed to master for 19.11.00 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23219 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |Manual, | |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=23219 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com --- Comment #18 from Nick Clemens <nick@bywatersolutions.com> --- *** Bug 24182 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23219 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|release-notes-needed | -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org