Bug 23986: Pass strings to Catmandu for deletion
authorNick Clemens <nick@bywatersolutions.com>
Thu, 7 Nov 2019 19:38:24 +0000 (19:38 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Fri, 15 Nov 2019 10:25:17 +0000 (11:25 +0100)
commit5eb36ad98e95147a937422f5e15f72c352b6edaa
tree96e7da89b4b849e71ff04558e0ec7a6ada7d9151
parent66d06a969f833f84fa2eed77bd6b21cf58b367c1
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>
(cherry picked from commit cdea121ddb5c3e609ce698171a8dc319593a7780)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Koha/SearchEngine/Elasticsearch/Indexer.pm