View | Details | Raw Unified | Return to bug 36027
Collapse All | Expand All

(-)a/misc/maintenance/search_for_data_inconsistencies.pl (-23 / +35 lines)
Lines 113-119 sub set_skip_options { Link Here
113
        # if a least one skip option is provided, print a warning
113
        # if a least one skip option is provided, print a warning
114
        my $has_skip_option = grep { $options{$_} == 1 } grep { /^skip-/ } keys %options;
114
        my $has_skip_option = grep { $options{$_} == 1 } grep { /^skip-/ } keys %options;
115
        if ($has_skip_option) {
115
        if ($has_skip_option) {
116
            print("Warning : skip options are ignored when check options are provided\n");
116
            print(
117
                "Warning: The --skip-* option(s) were ignored. Only the --check-* options in the command were run.\n");
117
        }
118
        }
118
119
119
        # Set all skip options to 0
120
        # Set all skip options to 0
Lines 753-792 sub new_hint { Link Here
753
754
754
=head1 SYNOPSIS
755
=head1 SYNOPSIS
755
756
756
search_for_data_inconsistencies.pl [options]
757
    search_for_data_inconsistencies.pl [options]
757
758
758
=head2 DESCRIPTION
759
=head2 DESCRIPTION
759
760
760
Catch data inconsistencies in Koha database:
761
    Identify data inconsistencies in the Koha database. Checks for:
761
762
    * Items without a home or holding library
762
    * Items with undefined homebranch and/or holdingbranch
763
    * Authority records with an invalid authority type
763
    * Authorities with undefined authtypecodes/authority types
764
    * Records and items without an item type, or an invalid item type:
764
    * Item types:
765
      - if item types are defined at an item level
765
        * if item types are defined at item level (item-level_itypes=specific item),
766
        (item-level_itypes=specific item), then items.itype must
766
        then items.itype must be set else biblioitems.itemtype must be set
767
        be set else biblioitems.itemtype must be set
767
        * Item types defined in items or biblioitems must be defined in the itemtypes table
768
      - Item types defined in items or biblioitems must be defined
769
        in the item types table
770
    * Invalid values in framework fields using authorized values
768
    * Bibliographic records without a title
771
    * Bibliographic records without a title
769
    * Invalid MARCXML in bibliographic records
772
    * Invalid MARCXML in bibliographic records
770
    * Patrons with invalid category types due to lower and upper age limits
773
    * Patrons with an invalid patron category type because of lower
774
      and upper age limits
771
    * Relationships that form guarantor loops
775
    * Relationships that form guarantor loops
772
* Any date fields in the database (timestamp, datetime, date) set to 0000-00-00
776
    * Any date fields in the database (timestamp, datetime, date)
777
      set to 0000-00-00
773
778
774
=head2 OPTIONS
779
=head2 OPTIONS
775
780
776
  --check-branch     Check for items without home or holding library
781
  --check-branch     Check for items without a home or holding library
777
  --check-auth       Check for authority records with invalid authority type
782
  --check-auth       Check for authority records with an invalid authority type
778
  --check-status     Check for bibliographic records and items without an item type or with an invalid item type
783
  --check-status     Check for bibliographic records and items without
779
  --check-framework  Check for invalid values in fields where the framework limits to an authorized value category
784
                     an item type or with an invalid item type
785
  --check-framework  Check for invalid values in fields where the framework
786
                     limits the values to an authorized value category
780
  --check-title      Check for bibliographic records without a title
787
  --check-title      Check for bibliographic records without a title
781
  --check-age        Check for patrons with invalid age for category
788
  --check-age        Check for patrons with an invalid age for the patron
789
                     category
782
  --check-loop       Check for relationships that form guarantor loops
790
  --check-loop       Check for relationships that form guarantor loops
783
  --check-all        Run all checks without specifying any other option
791
  --check-all        Run all checks without specifying any other option
784
  --skip-branch      Skip checking for items without home or holding library
792
  --skip-branch      Skip checking for items without a home or holding
785
  --skip-auth        Skip checking for authority records with invalid authority type
793
                     library
786
  --skip-status      Skip checking for bibliographic records and items without an item type or with an invalid item type
794
  --skip-auth        Skip checking for authority records with an invalid
787
  --skip-framework   Skip checking for invalid values in fields where the framework limits to an authorized value category
795
                     authority type
796
  --skip-status      Skip checking for bibliographic records and items without
797
                     an item type or with an invalid item type
798
  --skip-framework   Skip checking for invalid values in fields where the
799
                     framework limits the values to an authorized value category
788
  --skip-title       Skip checking for bibliographic records without a title
800
  --skip-title       Skip checking for bibliographic records without a title
789
  --skip-age         Skip checking for patrons with invalid age for category
801
  --skip-age         Skip checking for patrons with an invalid age for the
802
                     patron category
790
  --skip-loop        Skip checking for relationships that form guarantor loops
803
  --skip-loop        Skip checking for relationships that form guarantor loops
791
  --help             Print usage information
804
  --help             Print usage information
792
805
793
- 

Return to bug 36027