[Koha-bugs] [Bug 8275] New: xml parsing error when the webservice GetPatronInfo/show_loans is called

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Jun 20 16:26:22 CEST 2012


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8275

          Priority: P5 - low
 Change sponsored?: ---
            Bug ID: 8275
                CC: gmcharlt at gmail.com, kyle.m.hall at gmail.com
          Assignee: koha-bugs at lists.koha-community.org
           Summary: xml parsing error when the webservice
                    GetPatronInfo/show_loans is called
          Severity: normal
    Classification: Unclassified
                OS: All
          Reporter: koha at univ-lyon3.fr
          Hardware: All
            Status: NEW
           Version: rel_3_8
         Component: Circulation
           Product: Koha

When called by the webservice GetPatronInfo (C4/ILSDI/Services.pm) with
show_loans parameter defined, the GetPendingIssues routine return a hash
including Datetime object (since Bug 5549 - Hourly Loans). These Datetime
objects seem to have some bad consequences on the display :

The final display :
Parsing error...
<pre>A Datetime object can only be compared to another Datetime object
(DateTime=HASH(0xaa1a3000), HASH(0xa960xf0)) at /usr/share/perl5/XML/Simple.xml
line 1406

As a work-around, I added theese lines (wich permit a correct display) in
Services.pm line 421 :

if ( $cgi->param('show_loans') eq "1" ) {
    my $issues = GetPendingIssues($borrowernumber);
+    foreach my $issue ( @$issues ){
+        $issue->{issuedate} =  $issue->{issuedate}->ymd;
+        $issue->{date_due} =  $issue->{date_due}->ymd;
+    }
    $borrower->{'loans'}->{'loan'} = $issues;
}

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list