Bug 38029 - Fix POD for bulkmarcimport.pl --delete --authorities
Summary: Fix POD for bulkmarcimport.pl --delete --authorities
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-30 08:39 UTC by Magnus Enger
Modified: 2024-09-30 08:39 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Magnus Enger 2024-09-30 08:39:05 UTC
POD says: 

  =item B<-d, --delete>

  Delete EVERYTHING related to biblio in koha-DB before import. Tables: biblio,
biblioitems, items

What happens if you combine this with --authorities? One interpretation could be that nothing will happen. Another could be that you delete all biblios, even if you are importing authorities. 

The code looks like this: 

if ($delete) {
    if ($biblios) {
        print "Deleting biblios\n";
        $dbh->do("DELETE FROM biblio");
        $dbh->do("ALTER TABLE biblio AUTO_INCREMENT = 1");
        $dbh->do("DELETE FROM biblioitems");
        $dbh->do("ALTER TABLE biblioitems AUTO_INCREMENT = 1");
        $dbh->do("DELETE FROM items");
        $dbh->do("ALTER TABLE items AUTO_INCREMENT = 1");
    } else {
        print "Deleting authorities\n";
        $dbh->do("truncate auth_header");
    }
    $dbh->do("truncate zebraqueue");
}

So it should do the right thing. The POD should say that --delete --authorities will clean out the auth_header table.