http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14969
Jonathan Druart <jonathan.dru...@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |jonathan.dru...@bugs.koha-c | |ommunity.org --- Comment #15 from Jonathan Druart <jonathan.dru...@bugs.koha-community.org> --- 1/ " = " => Useless spaces. 2/ $tmpPlannedDate is not necessary, don't use this tmp var. 3/ my $date = ''; my $date; #is enough 4/ + $expirationdate = eval { output_pref( { dt => dt_from_string( $expirationdate ), dateonly => 1, dateformat => 'iso' }); } + if ( $expirationdate ); + + next unless ( $expirationdate ); + $subscription->{expirationdate} = $expirationdate; - next if $expirationdate !~ /\d{4}-\d{2}-\d{2}/; # next if not in ISO format. This change is not needed. 5/ - Date_to_Days(split "-",$expirationdate) > Date_to_Days(&Today) && I don't understand why you removed this line. There are still other some inconsistencies, I would like to know what methodology you use to replace these occurrences. For instance format_date always expect an iso formatted date, but you replace these occurrences with output_pref( { dt => dt_from_string( $date ), dateonly => 1 }) you should specify the dateformat param to dt_from_string. And sometimes you replace them with $date = eval { dt_from_string( $date ) } if $date; $date = output_pref( { dt => $date, dateonly => 1 } ) if $date; The changes are coming complicated and more and more errors are found on the QA step. I would like to see a migration plan with a test file to highlight the changes you are doing. If I remember correctly, I have attached a file doing that some weeks ago (but don't find it anymore). We need to test several values: undef, empty string, valid date, invalid date -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://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/