[Koha-bugs] [Bug 20600] Provide the ability for users to filter ILL requests

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Oct 15 16:41:56 CEST 2018


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20600

--- Comment #58 from Andrew Isherwood <andrew.isherwood at ptfs-europe.com> ---
(In reply to Josef Moravec from comment #57)
> Comment on attachment 78463 [details] [review]
> Bug 20600: Add filtering of ILL requests in list
> 
> Review of attachment 78463 [details] [review]:
> -----------------------------------------------------------------
> 
> ::: Koha/REST/V1/Illrequests.pm
> @@ +65,5 @@
> >      }
> > +
> > +    # Create new "formatted" columns for each date column
> > +    # that needs formatting
> > +    foreach(@req_list) {
> 
> I do not like this. The date should not be formatted on API level. It should
> be left to client/UI.

Thanks for this. I don't like it either. But, having spent a long time trying
to figure out how, I came to the conclusion that there's no way of sanely using
the date formatting syspref setting from Javascript. Hence me having to
pre-format at the server end.

There is a precedent for this, though I didn't know it when I implemented it in
Illrequests.pm svc/checkouts does exactly the same thing in order to pre-format
dates for the API response used in checkouts.js:
https://github.com/PTFS-Europe/koha/blob/master/svc/checkouts#L207-L218

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


More information about the Koha-bugs mailing list