[Koha-bugs] [Bug 1506] New: moremember.pl failing, new Dates method

bugzilla-daemon at pippin.metavore.com bugzilla-daemon at pippin.metavore.com
Sun Oct 21 03:47:48 CEST 2007


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 at liblime.com
        ReportedBy: jmf at liblime.com
         QAContact: koha-bugs at 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.





More information about the Koha-bugs mailing list