[Bug 1506] New: moremember.pl failing, new Dates method
http://bugs.koha.org/cgi-bin/bugzilla/show_bug.cgi?id=1506 Summary: moremember.pl failing, new Dates method Product: Koha Version: HEAD Platform: All OS/Version: All Status: NEW Severity: blocker Priority: P3 Component: Members AssignedTo: joe.atzberger@liblime.com ReportedBy: jmf@liblime.com QAContact: koha-bugs@nongnu.org Add or edit a member, click save, it redirects you to moremember.pl, which fails due to the following block: foreach (qw(dateenrolled dateexpiry dateofbirth)) { $data->{$_} = C4::Dates->new($data->{$_}, 'iso')->output() or die ("failed C4::Dates->new(" . $data->{$_} . ", 'iso')->output()"); } First, I don't think we want it to 'die' ... that's a bit to harsh I think. Second, we assume that dateenrolled, dateexpiry and dateofbirth are all valid. Third, the $data->{$_} is given a null value if there's not a value, so when there's a problem it won't tell you which of the values it's failing on. This is an example perhaps of writing a bit of clever perl code, perhaps looks cleaner than defining a separate variable, and using it instead of the default scalar. Should also check to make sure that the dates are coming out as iso in the right format that Dates expects ... I've marked it as blocker since it prevents moremember from working ;-) ------- You are receiving this mail because: ------- You are the QA contact for the bug, or are watching the QA contact.
participants (1)
-
bugzilla-daemon@pippin.metavore.com