[Bug 23986] New: Batch Record Deletion does not remove records from search index
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23986 Bug ID: 23986 Summary: Batch Record Deletion does not remove records from search index Change sponsored?: --- Product: Koha Version: 19.05 Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Searching - Elasticsearch Assignee: koha-bugs@lists.koha-community.org Reporter: andrew@bywatersolutions.com To test: - create a bib record - perform a search that returns a list of results including your record - delete record via batch record delete tool - repeat your search, observe that record still appears in results - click deleted title in search results, get "The record you requested does not exist" error -- 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=23986 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23986 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch 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=23986 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 95171 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=95171&action=edit Bug 23986: Remove sort from batch bib deletion After lots and lots fo digging, I removed the sort from this loop. Somehow, this allows the ES records to be deleted. I do not understand this patch, but it works. Possibly we need to sort the error arrays after the fact To test: 1 - Have or create a bib 2 - Go to Tools->Batch record deletion 3 - Click 'Enter a list of record numbers' 4 - Enter the biblionumber' 5 - Confirm deletion 6 - Search for the record, it still appears 7 - Apply patch, restart all the things 8 - Repeat 1-6 9 - This time the record is 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=23986 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | CC| |alex.arnaud@biblibre.com, | |ere.maijala@helsinki.fi, | |fridolin.somers@biblibre.co | |m, glasklas@gmail.com, | |jonathan.druart@bugs.koha-c | |ommunity.org, | |joonas.kylmala@helsinki.fi, | |julian.maurice@biblibre.com | |, m.de.rooy@rijksmuseum.nl, | |martin.renvoize@ptfs-europe | |.com, tomascohen@gmail.com --- Comment #2 from Nick Clemens <nick@bywatersolutions.com> --- I could use a hand understanding what is happening here -- 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=23986 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Batch Record Deletion does |Batch Record Deletion does |not remove records from |not remove records from |search index |Elasticsearch search index -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23986 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #95171|0 |1 is obsolete| | --- Comment #3 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 95177 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=95177&action=edit Bug 23986: Pass strings to Catmandu for deletion The deletion subroutine expects to get a string, this is fine in most places, but when we sort our records for batch deletion they are cast to numbers and the delete is not processed. This patch quotes the biblionumbers as strings before passing them to Catmandu To aid in detecting orphaned records you can use the patches on bug 22831 To test: 1 - Have or create a bib 2 - Go to Tools->Batch record deletion 3 - Click 'Enter a list of record numbers' 4 - Enter the biblionumber' 5 - Confirm deletion 6 - Search for the record, it still appears 7 - Apply patch, restart all the things 8 - Repeat 1-6 9 - This time the record is deleted 10 - Test other methods of record deletion to confirm the record is removed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23986 --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Now it makes sense! :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23986 --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I guess we could have replaced <=> with cmp, but it seems wrong (we want a numeric sort). It's weird to see the delete request ignored by Catmandu. What about tests? I do not think it should be required for this patch as it's a quite critical bugfix, but we really should start cover that area a bit more... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23986 Jonathan Druart <jonathan.druart@bugs.koha-community.org> 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=23986 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #95177|0 |1 is obsolete| | --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 95188 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=95188&action=edit Bug 23986: Pass strings to Catmandu for deletion The deletion subroutine expects to get a string, this is fine in most places, but when we sort our records for batch deletion they are cast to numbers and the delete is not processed. This patch quotes the biblionumbers as strings before passing them to Catmandu To aid in detecting orphaned records you can use the patches on bug 22831 To test: 1 - Have or create a bib 2 - Go to Tools->Batch record deletion 3 - Click 'Enter a list of record numbers' 4 - Enter the biblionumber' 5 - Confirm deletion 6 - Search for the record, it still appears 7 - Apply patch, restart all the things 8 - Repeat 1-6 9 - This time the record is deleted 10 - Test other methods of record deletion to confirm the record is removed Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23986 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|19.05 |master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23986 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #95188|0 |1 is obsolete| | --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 95229 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=95229&action=edit Bug 23986: Pass strings to Catmandu for deletion The deletion subroutine expects to get a string, this is fine in most places, but when we sort our records for batch deletion they are cast to numbers and the delete is not processed. This patch quotes the biblionumbers as strings before passing them to Catmandu To aid in detecting orphaned records you can use the patches on bug 22831 To test: 1 - Have or create a bib 2 - Go to Tools->Batch record deletion 3 - Click 'Enter a list of record numbers' 4 - Enter the biblionumber' 5 - Confirm deletion 6 - Search for the record, it still appears 7 - Apply patch, restart all the things 8 - Repeat 1-6 9 - This time the record is deleted 10 - Test other methods of record deletion to confirm the record is removed Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23986 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #8 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Man, that's silly. Passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23986 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |19.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23986 --- Comment #9 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work! Pushed to master for 19.11.00 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23986 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|19.11.00 |19.11.00,19.05.05 released in| | Status|Pushed to master |Pushed to stable --- Comment #10 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Pushed to 19.05.x for 19.05.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23986 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=25342 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23986 --- Comment #11 from David Gustafsson <glasklas@gmail.com> --- Good catch. I guess this fix can be reverted once https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24823 is merged since this seams to be a catmandu-issue. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23986 David Gustafsson <glasklas@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=24823 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23986 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_20_05_candidate -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23986 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_20_05_candidate | -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org