[Koha-bugs] [Bug 36101] New: Deleting an item removes the itemnumber from old_reserves when it should not
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Thu Feb 15 11:49:47 CET 2024
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36101
Bug ID: 36101
Summary: Deleting an item removes the itemnumber from
old_reserves when it should not
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P5 - low
Component: Database
Assignee: koha-bugs at lists.koha-community.org
Reporter: lmstrand at gmail.com
QA Contact: testopia at bugs.koha-community.org
Unless there's a good reason for this data loss, the itemnumber should be
preserved in old_reserves after deleting an item.
To reproduce:
1.1 Create an item level hold or a hold on a biblio with just one item for it
1.2 Cancel the hold
1.3 Check old_reserves, the itemnumber for the reserve is present
1.4 Delete the item linked to the reserve
1.5 Check old_reserves again, the itemnumber is now NULL
or:
2.1 Create a hold for a biblio with multiple items
2.2 checkin one of the items linked to the biblio the reserve was made for and
confirm the hold
2.3 Cancel the hold
2.3 Check old_reserves, the itemnumber for the reserve is present
2.4 Delete the item linked to the reserve
2.5 Check old_reserves again, the itemnumber is now NULL
The constraint that does the deletion from old_reserves-table when an item is
deleted:
CONSTRAINT `old_reserves_ibfk_3` FOREIGN KEY (`itemnumber`) REFERENCES `items`
(`itemnumber`) ON DELETE SET NULL ON UPDATE SET NULL
This should be removed. After removal the itemnumber does not get deleted from
the old_Reserves table when the item is deleted.
--
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