[Bug 16055] New: Deleting a basket group containing baskets fails silently
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16055 Bug ID: 16055 Summary: Deleting a basket group containing baskets fails silently Change sponsored?: --- Product: Koha Version: master Hardware: All URL: /cgi-bin/koha/acqui/basketgroup.pl OS: All Status: NEW Severity: normal Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: oleonard@myacpl.org QA Contact: testopia@bugs.koha-community.org In the list of basket groups for a vendor there is a "delete" option for each basket group whether or not the basket group contains baskets. If you choose "delete" for a basket group containing a basket it will fail silently and an error will be logged: DBD::mysql::st execute failed: Cannot delete or update a parent row: a foreign key constraint fails (`aqbasket`, CONSTRAINT `aqbasket_ibfk_3` FOREIGN KEY (`basketgroupid`) REFERENCES `aqbasketgroups` (`id`) ON UPDATE CASCADE) [for Statement "DELETE FROM aqbasketgroups WHERE id=?" with ParamValues: 0="3"] Since the template knows the number of baskets in a basket group it should be easy to hide or disable the delete button in those cases. It also would be nice to add a JavaScript confirmation before deleting a basket. Right now deletions are completed without any warning. Keep in mind the work being done in Bug 16038 and Bug 11708 when considering this one. -- 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=16055 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=16055 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 49897 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49897&action=edit Bug 16055: Do not allow basketgroup deletion unless empty If a basketgroup has basket attached, it should not be deletable. This patch just removes the Delete button from the interface if it cannot be deleted. When editing a basketgroup, the "Delete basket group" button is no longer displayed. Test plan: 1/ Create a basketgroup 2/ Attach 1+ baskets to this basketgroup 3/ Confirm you are not able to delete it 4/ Remove the baskets from this basketgroup 5/ Confirm you are able to delete 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=16055 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |jonathan.druart@bugs.koha-c |ity.org |ommunity.org CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Owen Leonard from comment #0)
Keep in mind the work being done in Bug 16038 and Bug 11708 when considering this one.
One is blocked and the other one does not apply. Moreover this is a bug fix and it could be great to backport it. I think this patch should be pushed before the 2 others. -- 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=16055 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch 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=16055 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #49897|0 |1 is obsolete| | --- Comment #3 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 49925 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49925&action=edit [SIGNED-OFF] Bug 16055: Do not allow basketgroup deletion unless empty If a basketgroup has basket attached, it should not be deletable. This patch just removes the Delete button from the interface if it cannot be deleted. When editing a basketgroup, the "Delete basket group" button is no longer displayed. Test plan: 1/ Create a basketgroup 2/ Attach 1+ baskets to this basketgroup 3/ Confirm you are not able to delete it 4/ Remove the baskets from this basketgroup 5/ Confirm you are able to delete it 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=16055 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Should we have icons on those buttons? If yes... please add on another bug :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16055 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=16055 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #49925|0 |1 is obsolete| | --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 49932 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49932&action=edit [PASSED QA] Bug 16055: Do not allow basketgroup deletion unless empty If a basketgroup has basket attached, it should not be deletable. This patch just removes the Delete button from the interface if it cannot be deleted. When editing a basketgroup, the "Delete basket group" button is no longer displayed. Test plan: 1/ Create a basketgroup 2/ Attach 1+ baskets to this basketgroup 3/ Confirm you are not able to delete it 4/ Remove the baskets from this basketgroup 5/ Confirm you are able to delete it Signed-off-by: Owen Leonard <oleonard@myacpl.org> 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=16055 Brendan Gallagher <brendan@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |brendan@bywatersolutions.co | |m --- Comment #6 from Brendan Gallagher <brendan@bywatersolutions.com> --- Pushed to Master - Should be in the May 2016 Release. Thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16055 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |julian.maurice@biblibre.com Status|Pushed to Master |Pushed to Stable --- Comment #7 from Julian Maurice <julian.maurice@biblibre.com> --- Patch pushed to 3.22.x, will be in 3.22.6 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org