This patch removes C4::Dates from files: - installer/data/mysql/updatedatabase.pl - misc/maintenance/fix_accountlines_date.pl
Created attachment 43316 [details] [review] Bug 14998 - Remove C4::Dates from installer and maintenance folders - installer/data/mysql/updatedatabase.pl - misc/maintenance/fix_accountlines_date.pl To test for updatedatabase.pl - perl installer/data/mysql/updatedatabase.pl - review code. Difficult to test, because the code affects $DBversion = '3.03.00.035' To test for misc/maintenance/fix_accountlines_date.pl - review code - The file seems to be a file used for an update, could it be obsolete? If yes, remove it in a follow-up
Still applies
Created attachment 44092 [details] [review] Bug 14998 - (followup) Remove file fix_accountlines_date.pl This patch removes the file misc/maintenance/fix_accountlines_date.pl To test: - Verify that the file is no longer used - Apply patch - Verify that the file vanished
(In reply to Marc Véron from comment #3) > - Verify that the file is no longer used While it isn't used as far as I can tell. Does a date get placed in description still? If so, this script may still be handy to keep.
(In reply to M. Tompsett from comment #4) > (In reply to Marc Véron from comment #3) > > - Verify that the file is no longer used > > While it isn't used as far as I can tell. Does a date get placed in > description still? If so, this script may still be handy to keep. In the first patch I removed C4::Dates from misc/maintenance/fix_accountlines_date.pl So it does no harm to keep the file. I obsolete the second patch and open a new bug for removing. That can be discussed later. The main thing now bring the C4::Dates removal to an end.
Created attachment 44415 [details] [review] Bug 14998 - Remove C4::Dates from installer and maintenance folders - installer/data/mysql/updatedatabase.pl - misc/maintenance/fix_accountlines_date.pl To test for updatedatabase.pl - perl installer/data/mysql/updatedatabase.pl - review code. Difficult to test, because the code affects $DBversion = '3.03.00.035' To test for misc/maintenance/fix_accountlines_date.pl - review code - The file seems to be a file used for an update, could it be obsolete? If yes, remove it in a follow-up Signed-off-by: Frederic Demians <f.demians@tamil.fr> Code OK. Tested updatedatabase.pl with an old DB backup: OK. fix_accountlines_date.pl still working after the patch. Could be removed from master IMO.
I don't want to spent too much time on this script, but I don't think it will work as before. C4::Dates->new($1, 'us')->output() and output_pref( { dt => dt_from_string( $1 ), dateonly => 1, dateformat => 'us' } are different I think, it should be output_pref( { dt => dt_from_string( $1, 'us' ), dateonly => 1 } I would prefer to see this script deleted :)
(In reply to Jonathan Druart from comment #7) > I don't want to spent too much time on this script, but I don't think it > will work as before. > > C4::Dates->new($1, 'us')->output() > and > output_pref( { dt => dt_from_string( $1 ), dateonly => 1, dateformat => > 'us' } > are different I think, it should be > output_pref( { dt => dt_from_string( $1, 'us' ), dateonly => 1 } > > I would prefer to see this script deleted :) Delete +1
See Bug 15076 - Remove file misc/maintenance/fix_accountlines_date.pl
Created attachment 44745 [details] [review] Bug 14998 - Remove C4::Dates from installer and maintenance folders - installer/data/mysql/updatedatabase.pl - misc/maintenance/fix_accountlines_date.pl To test for updatedatabase.pl - perl installer/data/mysql/updatedatabase.pl - review code. Difficult to test, because the code affects $DBversion = '3.03.00.035' To test for misc/maintenance/fix_accountlines_date.pl - review code - The file seems to be a file used for an update, could it be obsolete? If yes, remove it in a follow-up Signed-off-by: Frederic Demians <f.demians@tamil.fr> Code OK. Tested updatedatabase.pl with an old DB backup: OK. fix_accountlines_date.pl still working after the patch. Could be removed from master IMO. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 44746 [details] [review] Bug 14998: Restore previous behavior We want to convert a us or metric date formatted to the format defined in the pref. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Continue without waiting for 15076.
Patches pushed to master. Thanks Marc!