]> git.koha-community.org Git - koha.git/commit
Bug 18070: [Follow-up] What should DelAuthority return?
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tue, 14 Feb 2017 15:41:26 +0000 (16:41 +0100)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 3 Mar 2017 18:12:09 +0000 (18:12 +0000)
commit17e84750d9d90f3d2df466d1c8d8a63bbd5ad09d
tree2b1981c9149f46b44acd88277568d161c42c43bb
parentcb58b11f6769f69e109c1f42a78b3756d429dc80
Bug 18070: [Follow-up] What should DelAuthority return?

Script tools/batch_delete_records.pl only checks the return value of
DelAuthority. The return value depends on DBI rows, which is not always
reliable. It may return -1 when it 'does not know'.

Testing $@ in tools/batch_delete_records.pl should actually be enough.
The return value was discarded in C4/ImportBatch.pm. Removing an unused
variable.

Test plan:
[1] Pick an authority record with a few linked biblios.
    Delete this authority record via tools/batch_delete_records.pl.
    Check if the linked biblio records are cleaned up.
[2] Bonus: Make a typo in the SQL statement of DelAuthority. Check
    if batch_delete_records shows you the error message.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
C4/AuthoritiesMarc.pm
C4/ImportBatch.pm
tools/batch_delete_records.pl