[Bug 8275] New: xml parsing error when the webservice GetPatronInfo/show_loans is called
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8275 Priority: P5 - low Change sponsored?: --- Bug ID: 8275 CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com Assignee: koha-bugs@lists.koha-community.org Summary: xml parsing error when the webservice GetPatronInfo/show_loans is called Severity: normal Classification: Unclassified OS: All Reporter: koha@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.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8275 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|koha-bugs@lists.koha-commun |fridolyn.somers@biblibre.co |ity.org |m --- Comment #1 from Fridolyn SOMERS <fridolyn.somers@biblibre.com> --- Created attachment 10999 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=10999&action=edit Proposed patch (dates with hour) Proposed patch. Since issue and due date have now hour and minutes, I propose to keep this information in the webservice. So I formatted dates using '%Y-%m-%d %H:%M'. Note that it's the same format as 'timestamp' field. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8275 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #10999|0 |1 is obsolete| | --- Comment #2 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 11822 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=11822&action=edit Bug 8275: xml parsing error when the webservice GetPatronInfo/show_loans is called Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8275 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |chris@bigballofwax.co.nz -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8275 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |mtj@kohaaloha.com QA Contact| |mtj@kohaaloha.com --- Comment #3 from Mason James <mtj@kohaaloha.com> ---
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
patch looks good, passing QA… $ koha-qa.pl testing 1 commit(s) (applied to commit 0acebb8) * 3414757 Bug 8275: xml parsing error when the webservice GetPatronInfo/sho C4/ILSDI/Services.pm * C4/ILSDI/Services.pm OK -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8275 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |paul.poulain@biblibre.com --- Comment #4 from Paul Poulain <paul.poulain@biblibre.com> --- Koha team Lyon 3, do you agree with the counter fix proposed by Fridolyn ? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8275 --- Comment #5 from Koha Team Lyon 3 <koha@univ-lyon3.fr> --- (In reply to comment #4)
Koha team Lyon 3, do you agree with the counter fix proposed by Fridolyn ?
Seems that makes sense, it's ok for us -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8275 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #6 from Paul Poulain <paul.poulain@biblibre.com> --- Patch pushed to master -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8275 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #7 from Chris Cormack <chris@bigballofwax.co.nz> --- Pushed to 3.8.x, will be in 3.8.5 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org