https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31143
--- Comment #27 from David Nind <[email protected]> --- Thanks Wainui! I had a go at testing. 1. For me, misc/maintenance/search_for_data_inconsistencies.pl does not show anything in the output when I run it - where there are incorrect dates. I'm not sure if this is because of the error it generates when running (see step 2 below) - this occurred both before and after the patch was applied. 2. If the new script is run just with -v, it just says "0 wrong dates found and fixed". I guess that is correct. But if you were running it before using the -c option, I think you would want to know that "X wrong dates were found" (or something similar). 3. On the plus side, the new script does fix 0000-00-00 dates! 8-) Updated testing notes (using KTD and the sample data): 1. Fix record 369 (Strk̆v̜elser illustreret af Jean Anderson dansk udgave ved Lis Engel [overst̆telse ved Jesper Langer]) so that the misc/maintenance/search_for_data_inconsistencies.pl script doesn't show MARC records in the sample data that needs fixing. 2. Note that before applying the patch, running the search for data inconsistencies script returns an error/warning message: misc/maintenance/search_for_data_inconsistencies.pl Can't call method "time_zone" on an undefined value at /usr/lib/x86_64-linux-gnu/perl5/5.36/DateTime.pm line 1483. 3. I updated a couple of patron records using this SQL (Mary (49) and Henry (19)): . koha-mysql kohadev . update borrowers set dateofbirth ="0000-00-00" where borrowernumber = "49"; . update borrowers set date_renewed ="0000-00-00" where borrowernumber = "19"; 4. Note that the values updated now have a value of 0000-00-00 (SQL example: select * from borrowers where borrowernumber = 19;). 5. In the staff interface, go to patrons. Note that the autocomplete for the search in the header doesn't work, and that you get a 500 error if you use the search on the left-hand side: Something went wrong when loading the table. 500: Internal Server Error. Month out of range. 6. Run the search for data inconsistencies script: misc/maintenance/search_for_data_inconsistencies.pl NOTE: This shows no information for me about any problems with patron dates with 0000-00-00 7. Output from running the new script: - with just -v: misc/cronjobs/fix_invalid_dates.pl -v 0 wrong dates found and fixed - with -c -v: misc/cronjobs/fix_invalid_dates.pl -c -v 2 wrong dates found and fixed 8. Repeat step 5 - things should now work as expected. Some other notes: 1. The description in misc/maintenance/search_for_data_inconsistencies.pl needs updating to add: * Patrons with 0000-00-00 dates in fields dateofbirth, dateenrolled, dateexpiry, date_renewed, lastseen, updated_on debarred 2. I'm not sure of the protocol, but for many scripts: - you can add the -h or --help and get quick help with a description, what the different options do, and some examples. - normally the help would have the options, like -v, etc (in the script currently it just has c or v) - sometimes with verbose options, it may list the things changed 3. These could probably be added as new bugs, if determined as warranted. -- 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/
