[Koha-bugs] [Bug 16055] New: Deleting a basket group containing baskets fails silently

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Mar 11 18:51:08 CET 2016


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 at lists.koha-community.org
          Reporter: oleonard at myacpl.org
        QA Contact: testopia at 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.


More information about the Koha-bugs mailing list