Hourly checkouts get marked as overdue, even though they are not
Bug #1951024 reported by
Jane Sandberg
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
We've been experiencing the following issue:
1) Check out an hourly checkout to a patron (for us, these are items that are due back after 2 hours)
2) Go to the Items Out tab
3) Note that the row for the newly checked out item is red, with the styling intended for overdue items
I haven't dug into this yet, but I wonder if there is a timezone issue (e.g. the javascript is trying to compare two times, and it thinks that a local timezone time is actually a GMT one). Or if something is going wrong with parsing the due date prior to the comparison.
To post a comment you must log in.
I've run into this, too, on 3.6.4. I meant to report this when I encountered it a few weeks ago. Here are my notes; not sure if this is the right track or not:
I think the issue is here: Open-ILS/ web/js/ ui/default/ staff/circ/ patron/ items_out. js
The row is being highlighted if the due date is before "now". However, the "now" date it's checking against is the date in UTC, so it's checking against a timestamp that's four hours ago.
new Date(). toISOString( ) gives the time in UTC.
I tried checking out an item with an hourly circ on our test server. The item was not highlighted when the item was due in 4 hours, but became highlighted once the item was at or less than 3:59 from its due date. (Your results may differ -- we are in EST, but I wrote this while we were in EDT).
Problem begins on line 92:
$scope. colorizeItemsOu tList = { toISOString( )) {
return 'overdue-row';
apply: function(item) {
var duedate = item.due_date();
if (duedate && duedate < new Date().
}
}
}