Summary: | Add Koha::Items->safe_delete | ||
---|---|---|---|
Product: | Koha | Reporter: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Component: | Architecture, internals, and plumbing | Assignee: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Status: | In Discussion --- | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | dcook, jonathan.druart, kyle, martin.renvoize |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | Small patch | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Attachments: |
Bug 26509: Add CannotBeDeleted object exception
Bug 26509: Add Koha::Items->safe_delete Bug 26509: Add CannotBeDeleted object exception Bug 26509: Add Koha::Items->safe_delete Bug 26509: Add CannotBeDeleted object exception Bug 26509: Add Koha::Items->safe_delete Bug 26509: Make safe_delete return the number of deleted objects |
Description
Tomás Cohen Arazi (tcohen)
2020-09-22 15:28:37 UTC
Created attachment 110563 [details] [review] Bug 26509: Add CannotBeDeleted object exception This patch adds a new exception with tests for the stringification. To test: 1. Apply this patch 2. Run: $ kshell k$ prove t/Koha/Exceptions.t => SUCCESS: Tests pass 3. Sign off :-D Created attachment 110564 [details] [review] Bug 26509: Add Koha::Items->safe_delete This patch adds a handy method that can be used to call safe_delete on a resultset. To test: 1. Apply this patch 2. Run: $ kshell k$ prove t/db_dependent/Koha/Items.t => SUCCESS: Tests pass! 3. Sign off :-D Created attachment 110579 [details] [review] Bug 26509: Add CannotBeDeleted object exception This patch adds a new exception with tests for the stringification. To test: 1. Apply this patch 2. Run: $ kshell k$ prove t/Koha/Exceptions.t => SUCCESS: Tests pass 3. Sign off :-D Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 110580 [details] [review] Bug 26509: Add Koha::Items->safe_delete This patch adds a handy method that can be used to call safe_delete on a resultset. To test: 1. Apply this patch 2. Run: $ kshell k$ prove t/db_dependent/Koha/Items.t => SUCCESS: Tests pass! 3. Sign off :-D Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> All works as expected. Created attachment 110629 [details] [review] Bug 26509: Add CannotBeDeleted object exception This patch adds a new exception with tests for the stringification. To test: 1. Apply this patch 2. Run: $ kshell k$ prove t/Koha/Exceptions.t => SUCCESS: Tests pass 3. Sign off :-D Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 110630 [details] [review] Bug 26509: Add Koha::Items->safe_delete This patch adds a handy method that can be used to call safe_delete on a resultset. To test: 1. Apply this patch 2. Run: $ kshell k$ prove t/db_dependent/Koha/Items.t => SUCCESS: Tests pass! 3. Sign off :-D Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> FYI I don't plan to push patches that add new methods which are not effectively used. (In reply to Jonathan Druart from comment #8) > FYI I don't plan to push patches that add new methods which are not > effectively used. Yes, this is part of a tree that makes use of it. This is used in bug 26515, which I'm currently rewriting. Created attachment 111373 [details] [review] Bug 26509: Make safe_delete return the number of deleted objects It must the behaviour for all Koha::Objects->delete methods There are doubts about the usefulness of this method. I dropped its use on bug 26515. Setting 'In discussion' until there's a real use for it. |