https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24741
Bug ID: 24741
Summary: Recent creation of unique index on library_groups
erroneously removes rows
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
OS: All
Status: NEW
Severity: critical
Priority: P5 - low
Component: Architecture, internals, and plumbing
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
Bug 21674 introduces a new unique index on library_groups. Before this is done,
removal of duplicate entries is done. This check for duplicates is wrong and
removes non-duplicate entries as well.
The query being executed is:
DELETE FROM library_groups
WHERE id NOT IN (
SELECT MIN(id)
FROM ( SELECT * FROM library_groups ) AS lg
WHERE parent_id IS NOT NULL
GROUP BY parent_id, branchcode
)
AND parent_id IS NOT NULL;
To test:
Use Administration/Library groups, add two group on the same level. Add a
library or two in each of them, then run the above query.
The second of the two groups, including all its libraries will now be removed.
--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/