[Bug 26992] New: On serial collection page, impossible to delete issues and related items
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26992 Bug ID: 26992 Summary: On serial collection page, impossible to delete issues and related items Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Serials Assignee: koha-bugs@lists.koha-community.org Reporter: frederic@tamil.fr QA Contact: testopia@bugs.koha-community.org CC: colin.campbell@ptfs-europe.com Since bug 17674, it's possible to delete subscriptions issues and their items in batch. But items deletion doesn't work anymore because it uses C4::Items::DelItemCheck() function which has been obsoleted. -- 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=26992 --- Comment #1 from Frédéric Demians <frederic@tamil.fr> --- Created attachment 113417 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113417&action=edit Bug 26992 - On serial collection page, impossible to delete issues and related items serial-collection.pl uses C4::Items::DelItemCheck() function which is obsolte. Test plan: 1. Create a subscription with items created when receiving. 2. Receive several issues, and create corresponding items. 3. On Serial collection page (serial-collection.pl), select several issues. 4. Click on button Delete selected issues 5. A confirmation page is displayed. Enable "Delete associated items?". Then click on "Yes, delete" button. You get this error: Undefined subroutine &C4::Items::DelItemCheck 6. Apply the patch an repeat steps 3-5. Check that issues and related items are deleted. -- 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=26992 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Severity|enhancement |normal Assignee|koha-bugs@lists.koha-commun |frederic@tamil.fr |ity.org | -- 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=26992 Blou <philippe.blouin@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #113417|0 |1 is obsolete| | --- Comment #2 from Blou <philippe.blouin@inlibro.com> --- Created attachment 113582 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113582&action=edit Bug 26992 - On serial collection page, impossible to delete issues and related items serial-collection.pl uses C4::Items::DelItemCheck() function which is obsolte. Test plan: 1. Create a subscription with items created when receiving. 2. Receive several issues, and create corresponding items. 3. On Serial collection page (serial-collection.pl), select several issues. 4. Click on button Delete selected issues 5. A confirmation page is displayed. Enable "Delete associated items?". Then click on "Yes, delete" button. You get this error: Undefined subroutine &C4::Items::DelItemCheck 6. Apply the patch an repeat steps 3-5. Check that issues and related items are deleted. Signed-off-by: Blou <blou@inlibro.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26992 Blou <philippe.blouin@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |philippe.blouin@inlibro.com Priority|P5 - low |P3 Status|Needs Signoff |Signed Off Severity|normal |critical Patch complexity|--- |Small patch --- Comment #3 from Blou <philippe.blouin@inlibro.com> --- This functionality crashes without this patch. Not sure how it got this far (probably not used much), but this should be fixed for 20.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26992 Julian Maurice <julian.maurice@biblibre.com> 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=26992 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #113582|0 |1 is obsolete| | --- Comment #4 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 113599 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113599&action=edit Bug 26992: Fix serial issue and related items deletion on serial collection page serial-collection.pl uses C4::Items::DelItemCheck() function which is obsolete. Test plan: 1. Create a subscription with items created when receiving. 2. Receive several issues, and create corresponding items. 3. On Serial collection page (serial-collection.pl), select several issues. 4. Click on button Delete selected issues 5. A confirmation page is displayed. Enable "Delete associated items?". Then click on "Yes, delete" button. You get this error: Undefined subroutine &C4::Items::DelItemCheck 6. Apply the patch an repeat steps 3-5. Check that issues and related items are deleted. Signed-off-by: Blou <blou@inlibro.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26992 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Why not using find? for my $itemnumber (@itemnumbers) { my $items = Koha::Items->search({ itemnumber => $itemnumber }); while ( my $item = $items->next ) { my $deleted_item = eval { $item->safe_delete }; vs for my $itemnumber (@itemnumbers) { my $item = Koha::Items->find( $itemnumber ); my $deleted_item = eval { $item->safe_delete }; or, even my $items = Koha::Items->search({ itemnumber => \@itemnumbers }); while ( my $item = $items->next ) { my $deleted_item = eval { $item->safe_delete }; -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26992 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |23463, 17674 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17674 [Bug 17674] Allow UI to delete serials issues in batch https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23463 [Bug 23463] Move C4::Items CRUD subroutines to Koha::Item -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26992 --- Comment #6 from Frédéric Demians <frederic@tamil.fr> ---
my $items = Koha::Items->search({ itemnumber => \@itemnumbers }); while ( my $item = $items->next ) { my $deleted_item = eval { $item->safe_delete };
Yes, it's better. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26992 --- Comment #7 from Frédéric Demians <frederic@tamil.fr> --- Created attachment 113661 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113661&action=edit Bug 26992 - On serial collection page, impossible to delete issues and related items serial-collection.pl uses C4::Items::DelItemCheck() function which is obsolte. Test plan: 1. Create a subscription with items created when receiving. 2. Receive several issues, and create corresponding items. 3. On Serial collection page (serial-collection.pl), select several issues. 4. Click on button Delete selected issues 5. A confirmation page is displayed. Enable "Delete associated items?". Then click on "Yes, delete" button. You get this error: Undefined subroutine &C4::Items::DelItemCheck 6. Apply the patch an repeat steps 3-5. Check that issues and related items are deleted. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26992 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #113599|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=26992 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed 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=26992 --- Comment #8 from Frédéric Demians <frederic@tamil.fr> --- Sorry, I had to reverse to "Needs Signoff" -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26992 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_20_11_target -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26992 David Nind <david@davidnind.com> 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=26992 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #113661|0 |1 is obsolete| | --- Comment #9 from David Nind <david@davidnind.com> --- Created attachment 113681 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113681&action=edit Bug 26992 - On serial collection page, impossible to delete issues and related items serial-collection.pl uses C4::Items::DelItemCheck() function which is obsolte. Test plan: 1. Create a subscription with items created when receiving. 2. Receive several issues, and create corresponding items. 3. On Serial collection page (serial-collection.pl), select several issues. 4. Click on button Delete selected issues 5. A confirmation page is displayed. Enable "Delete associated items?". Then click on "Yes, delete" button. You get this error: Undefined subroutine &C4::Items::DelItemCheck 6. Apply the patch an repeat steps 3-5. Check that issues and related items are deleted. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26992 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |joonas.kylmala@helsinki.fi Status|Signed Off |Failed QA --- Comment #10 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- The commit title needs to tell what the commit does, not what the bug is (<https://wiki.koha-community.org/wiki/Commit_messages#Examples>). Also the formatting is not right, so something like Bug 26992: Fix broken issues deletion on serial collection page would be better. Then I'm also wondering why there needs to be eval here:
my $deleted_item = eval { $item->safe_delete };
-- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26992 --- Comment #11 from Frédéric Demians <frederic@tamil.fr> ---
Then I'm also wondering why there needs to be eval here:
my $deleted_item = eval { $item->safe_delete };
I copy-paste this from somewhere, I don't recall where... It seems from the Koha::Item module, and usage from other scripts, that the canonical form should be now: my $error = $item->safe_delete; if ($error eq 1) { # not deleted I will re-factorize the patch appropriately. Thanks. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26992 Frédéric Demians <frederic@tamil.fr> 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=26992 --- Comment #12 from Frédéric Demians <frederic@tamil.fr> --- Created attachment 113694 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113694&action=edit Bug 26992 - Fix serial issue and related items deletion on serial collection page serial-collection.pl uses C4::Items::DelItemCheck() function which is obsolete. Test plan: 1. Create a subscription with items created when receiving. 2. Receive several issues, and create corresponding items. 3. On Serial collection page (serial-collection.pl), select several issues. 4. Click on button Delete selected issues 5. A confirmation page is displayed. Enable "Delete associated items?". Then click on "Yes, delete" button. You get this error: Undefined subroutine &C4::Items::DelItemCheck 6. Apply the patch an repeat steps 3-5. Check that issues and related items are deleted. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26992 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #113681|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=26992 --- Comment #13 from Frédéric Demians <frederic@tamil.fr> --- To David Nind: very sorry for having to resubmit and clear your signoff. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26992 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #14 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Thanks, one more thing: please use the "Bug XXX: syntax" instead of "Bug XXX -" -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26992 Jonathan Druart <jonathan.druart@bugs.koha-community.org> 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=26992 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #113694|0 |1 is obsolete| | --- Comment #15 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 113703 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113703&action=edit Bug 26992: Fix serial issue and related items deletion on serial collection page serial-collection.pl uses C4::Items::DelItemCheck() function which is obsolete. Test plan: 1. Create a subscription with items created when receiving. 2. Receive several issues, and create corresponding items. 3. On Serial collection page (serial-collection.pl), select several issues. 4. Click on button Delete selected issues 5. A confirmation page is displayed. Enable "Delete associated items?". Then click on "Yes, delete" button. You get this error: Undefined subroutine &C4::Items::DelItemCheck 6. Apply the patch an repeat steps 3-5. Check that issues and related items are deleted. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26992 --- Comment #16 from Frédéric Demians <frederic@tamil.fr> --- Thanks Joonas and Jonathan. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26992 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #17 from David Nind <david@davidnind.com> --- (In reply to Frédéric Demians from comment #13)
To David Nind: very sorry for having to resubmit and clear your signoff.
No problem! Sign off on the way. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26992 David Nind <david@davidnind.com> 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=26992 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #113703|0 |1 is obsolete| | --- Comment #18 from David Nind <david@davidnind.com> --- Created attachment 113753 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113753&action=edit Bug 26992: Fix serial issue and related items deletion on serial collection page serial-collection.pl uses C4::Items::DelItemCheck() function which is obsolete. Test plan: 1. Create a subscription with items created when receiving. 2. Receive several issues, and create corresponding items. 3. On Serial collection page (serial-collection.pl), select several issues. 4. Click on button Delete selected issues 5. A confirmation page is displayed. Enable "Delete associated items?". Then click on "Yes, delete" button. You get this error: Undefined subroutine &C4::Items::DelItemCheck 6. Apply the patch an repeat steps 3-5. Check that issues and related items are deleted. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26992 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com QA Contact|testopia@bugs.koha-communit |tomascohen@gmail.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26992 Tomás Cohen Arazi <tomascohen@gmail.com> 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=26992 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #113753|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=26992 --- Comment #19 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 113815 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113815&action=edit Bug 26992: Fix serial issue and related items deletion on serial collection page serial-collection.pl uses C4::Items::DelItemCheck() function which is obsolete. Test plan: 1. Create a subscription with items created when receiving. 2. Receive several issues, and create corresponding items. 3. On Serial collection page (serial-collection.pl), select several issues. 4. Click on button Delete selected issues 5. A confirmation page is displayed. Enable "Delete associated items?". Then click on "Yes, delete" button. You get this error: Undefined subroutine &C4::Items::DelItemCheck 6. Apply the patch an repeat steps 3-5. Check that issues and related items are deleted. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26992 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |20.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=26992 --- Comment #20 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 20.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26992 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_20_11_target | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26992 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|20.11.00 |20.11.00, 20.05.07 released in| | Status|Pushed to master |Pushed to stable CC| |andrew@bywatersolutions.com --- Comment #21 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Pushed to 20.05.x for 20.05.07 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26992 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26992 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net Resolution|--- |FIXED Status|Pushed to oldstable |RESOLVED --- Comment #22 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Missing dependencies for 19.11.x, shouldn't affect it then. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26992 Bug 26992 depends on bug 17674, which changed state. Bug 17674 Summary: Allow UI to delete serials issues in batch https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17674 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org