https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36027

--- Comment #51 from David Nind <[email protected]> ---
Updated testing notes (from comment #25 and #36)
=====================

Testing notes (using KTD):

1. Apply the patch.
2. Set up data so that there are inconsistencies:
   2.1 There is already one inconsistency in the sample data, for record 369
(encoding errors)
   2.2 I created an inconsistency for patron age and patron category type:
       . koha-mysql kohadev
       . update borrowers set categorycode = "K" where borrowernumber=49;
3. Run the script without any options:
misc/maintenance/search_for_data_inconsistencies.pl
   ==> It should output the help for the script (a change in behavour -
previously it ran all checks).
3. Run the script with one or more check options:
misc/maintenance/search_for_data_inconsistencies.pl --check-status --check-age
   ==> It should output the inconsistencies (an invalid MARCXML record and an
invalid age category).
4. Run the script with one or more --skip* options:
misc/maintenance/search_for_data_inconsistencies.pl --skip-status
   ==> It should skip the checks specified.
6. Run the script with a check option and a skip option:
misc/maintenance/search_for_data_inconsistencies.pl --check-age --skip-status
   ==> The skip option should be ignored (not run) and only the check option
should be run.
7. Run the script with all options:
misc/maintenance/search_for_data_inconsistencies.pl --check-all
   ==> It should output the results from running all the checks (in this case
with KTD, the invalid MARCXML document and invalid age category).
8. Check the help to make sure it is improved, makes sense, and incorporates
all the changes made by this bug:
misc/maintenance/search_for_data_inconsistencies.pl --help

Updated comments (from me, comment #25 and #36)
===============================================

I'll file separate bugs for these comments when the bug passes QA:

1. The check-status option includes checking for item type issues (as described
in the help description), but it also checks for invalid MARCXML. I think that
the MARCXML check should have its own option (--check-marcxml Check for invalid
MARCXML in bibliographic records).
   1.1 I'm not sure how hard this to do (I am not a developer).
   1.2 I'm not sure whether there are other checks in the script that are not
included in the description and have their own options.
   1.2 Instead of --check-status, --check-itemtype

2. Instead of --check-branch, use --check-library. While branch is used in the
underlying code, the terminology guidelines suggest we should use library.
(https://wiki.koha-community.org/wiki/Terminology#L)

Follow-up - help and error message text
=======================================

I've added a follow-up for:

1. Warning when you use --check-* and --skip-* options in the same command
(step 6). The current text says (to me, anyway) that if you use skip and check
options in the same command, the skip options are ignored. That is, it will
ignore/not run the skip options:
   . Current warning: "Warning : skip options are ignored when check options
are provided"
   . Suggested warning: "Warning: The --skip-* option(s) were ignored. Only the
--check-* options in the command were run."

2. Description and help text - some formatting and text changes.

Additional comments (from Katrin, comment #28)
==============================================

Just so that these don't get lost.

1. New parameters (not blocker)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I wonder if the chosen pattern is good as it requires that we add 2 new
parameters for every check that we add to the script. 

We do have something similar in cleanup_database.pl for action logs and it
seems more logical to me. 

   --log-module       Specify which action log modules to trim. Repeatable.
   --preserve-log     Specify which action logs to exclude. Repeatable.
   --logs DAYS        purge entries from action_logs older than DAYS days.
                      Defaults to 180 days if no days specified.

So instead of a unique parameter, you can use preserve-log with different
codes.

I am not sure what is better, just putting the question out here.

(I think that would be better, for example, two options --check and --skip with
a list of codes for each check available. David)


2. Script should not start without -c or any parameters... (not blocker)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This is something for a separate bug. But we once said that scripts should
output help when run without parameter and require a confirmation flag. 

As this can run quite a time, this still seems a good idea... (leaving this
here for filing later)

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to