[Bug 26509] New: Add Koha::Items->safe_delete
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26509 Bug ID: 26509 Summary: Add Koha::Items->safe_delete Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org It would be handy to be able to safe_delete on an items result set. For example, if we wanted to cancel an order in the Koha:: namespace, we could just call $self->items->safe_delete; -- 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=26509 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | Status|NEW |ASSIGNED -- 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=26509 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff CC| |kyle@bywatersolutions.com, | |martin.renvoize@ptfs-europe | |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26509 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 110563 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110563&action=edit 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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26509 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 110564 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110564&action=edit 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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26509 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26509 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #110563|0 |1 is obsolete| | --- Comment #3 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 110579 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110579&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26509 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #110564|0 |1 is obsolete| | --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 110580 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110580&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26509 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- All works as expected. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26509 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |26515 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26515 [Bug 26515] Add Koha::Acquisition::Order->cancel -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26509 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA 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=26509 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #110579|0 |1 is obsolete| | --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 110629 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110629&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26509 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #110580|0 |1 is obsolete| | --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 110630 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110630&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26509 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- FYI I don't plan to push patches that add new methods which are not effectively used. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26509 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |enhancement -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26509 --- Comment #9 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (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. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26509 --- Comment #10 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 111373 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111373&action=edit Bug 26509: Make safe_delete return the number of deleted objects It must the behaviour for all Koha::Objects->delete methods -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26509 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|26515 | Status|Passed QA |In Discussion --- Comment #11 from Tomás Cohen Arazi <tomascohen@gmail.com> --- 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. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26515 [Bug 26515] Add Koha::Acquisition::Order->cancel -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org