Bug 24125 - Batch delete should not remove authorities that are still in use
Summary: Batch delete should not remove authorities that are still in use
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: MARC Authority data support (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Marcel de Rooy
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-26 14:34 UTC by Nick Clemens (kidclamp)
Modified: 2024-03-01 20:29 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens (kidclamp) 2019-11-26 14:34:44 UTC
To recreate:
1 - Find a record with an author linked to an authority
2 - Get that authority number
3 - Browse to tools->batch record deletion
4 - Select authorities and enter that authority id
5 - Delete the authority
6 - View the record, the 100 field has been cleared
Comment 1 Marcel de Rooy 2019-11-26 15:06:56 UTC
(In reply to Nick Clemens from comment #0)
> To recreate:
> 1 - Find a record with an author linked to an authority
> 2 - Get that authority number
> 3 - Browse to tools->batch record deletion
> 4 - Select authorities and enter that authority id
> 5 - Delete the authority
> 6 - View the record, the 100 field has been cleared

Is that really a bug or actually what you should expect?
Comment 2 Nick Clemens (kidclamp) 2019-11-26 15:07:40 UTC
(In reply to Marcel de Rooy from comment #1)
> Is that really a bug or actually what you should expect?

I think it either should remove only the $9 or prevent deletion if record is linked
Comment 3 Jonathan Druart 2019-12-17 11:31:06 UTC
We are restricting the deletion on the detail of the authority record, so it would make sense to not allow the deletion using the batch tools.
Comment 4 Katrin Fischer 2020-01-03 06:28:35 UTC
It can be a useful feature for things like subjects etc. you no longer want to use. I remember using it to clean out migration errors.

Maybe we could solve this with an option/checkbox on the form?

If there are linked records
- Delete only the linking field ($9, UNIMARC?)
- Delete the whole entry
Comment 5 Katrin Fischer 2020-01-03 06:29:54 UTC
Hm, radio button?

If there are linked bibliographic records
- Delete only the linking field ($9, UNIMARC?)
- Delete the whole entry
- Don't delete authority record
Comment 6 Marcel de Rooy 2023-07-25 15:03:13 UTC
Adjusted the title in accordance with comments 3 to 5.
Comment 7 Phil Ringnalda 2023-08-09 01:38:16 UTC
Probably just need two choices for the radio button, unlink and delete, since we already have the don't delete option as a "Clear used authorities" link.

FWIW, I use this feature precisely for what it currently does, delete an unwanted authority record and delete the bib fields using it, all the time. Having it removed rather than just put behind a radio button choice, so that I would have to decide each time between manually editing a bunch of bib records, or writing a targetted MARC modification template to delete any 100/600/700/800 or 110/610/710/810, etc., with a particular authid, would be a frustrating step backward.
Comment 8 Esther Melander 2024-03-01 20:29:04 UTC
I like having an option to unlink versus delete. Does the unlink here retain the authority record in the system? If so, won't the authority in the bibliographic record eventually relink if AutoLinkBiblios, CatalogModuleRelink, and LinkerRelink are enabled?

If I wanted to batch delete authorities that are in use, the system should unlink and then delete, while retaining the authority in the bibliographic record. That retention step is perhaps the part that should be optional. I can see cases where the authority in the bibliographic record is retained and cases where it is not.