Created attachment 30577 [details] screenshot of list of checkouts In master overdue items won't show in red when overdue. At the top of the screen, the red message indicating the overdues is still there, but in the checkout's table all items show the same.
Created attachment 31142 [details] Screenshot of feature working as expected. I can't reproduce the issue.
Hm, I have run into this multiple times on master by now. Did they 'age' naturally or did you check them out with a past due date?
I tested on master again - checked out an item with due date yesterday - the note right to the barcode form is showing, but the date is not red. What could be the different? I can't figure it out. I tried various dateformat settings too.
Hm, only difference I can see is that the checkout date in my table doesn't show a time, but only a date now - on your screenshot it does? This is the source code of my checked out item: <tr id="group-id-issues-table_-strong-previous-checkouts-strong-"> <td class="group -strong-previous-checkouts-strong-" colspan="10"> <strong>Previous checkouts</strong> </td> </tr> <tr id="480-1" class="odd group-item group-item--strong-previous-checkouts-strong-" data-group="-strong-previous-checkouts-strong-"> <td class="">10/08/2014</td> <td class=""> <span class="strong"> <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=30&itemnumber=480#480">transf</a> </td> <td class="">CF</td> <td class="">25/08/2014</td> <td class="">Midway</td> <td class=""></td> <td class="">0.00</td> <td class="">0.00</td> <td class=""> <span> <span style="padding: 0 1em;">2</span> <span class="renewals-disabled">Not renewable</span> <span class="renewals-allowed" style="display: none"> </span> </td> <td class=""> <input id="checkin_480" class="checkin" type="checkbox" value="480" name="checkin"> </td> </tr>
I see this problem in my test system too. Some of my checkouts are showing a date and time and some are showing just a date. Not sure if that is related, but is that a bug as well?
Kyle, I'm not quite sure why you are not seeing this bug, but I have some hints what is happening. In koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js (and probably other places) you are using var due = new Date( oObj.date_due ); to create date. However, in my installation oObj.date_due is "2012-08-30 00:00:00" which doesn't parse in Firefox: new Date("2014-08-06 00:00:00"); Invalid Date but does parse in Chrome: new Date("2014-08-06 00:00:00"); Wed Aug 06 2014 00:00:00 GMT+0200 (CEST) Since we are suggesting Firefox as browser for Koha, this is a huge show-stopper. However, Firefox is happy when space is replaced by T like this: new Date("2014-08-06T00:00:00"); Date 2014-08-05T22:00:00.000Z but as you can see above, without timezone it gets shifted by my timezone offset (which is +2 in my case). So adding additional timezone at end: new Date("2014-08-06T00:00:00Z"); Date 2014-08-06T00:00:00.000Z However, you are then comparing this date with new Date(); which again creates GMT time instead of localtime: new Date Date 2014-09-04T12:30:02.556Z (my current local time is 14:30:02, not 12:30!) Dates and JavaScript is a mess. I would love to hear your feedback on this.
Created attachment 31372 [details] [review] Bug 12729 - Overdue items won't show as overdue in red in circulation It seems that Firefox date parser doesn't like our dates which are formatted in ISO format like "2014-08-06 00:00:00". This results in missing red color in overdue dates. So intead of munching different date formats and JavaScript (and having to support different browers) this patch moves check for overdue dates back to mysql and just transfers boolean value to JavaScript so it can show correct class for date_due. Test scenario: 1. find borrower with overdue checkouts 2. verify that all dates are black (and are in ISO format) 3. apply this patch 4. reload page and verify that overdue dates turned red
Created attachment 31587 [details] [review] [SIGNED OFF] Bug 12729 - Overdue items won't show as overdue in red in circulation It seems that Firefox date parser doesn't like our dates which are formatted in ISO format like "2014-08-06 00:00:00". This results in missing red color in overdue dates. So intead of munching different date formats and JavaScript (and having to support different browers) this patch moves check for overdue dates back to mysql and just transfers boolean value to JavaScript so it can show correct class for date_due. Test scenario: 1. find borrower with overdue checkouts 2. verify that all dates are black (and are in ISO format) 3. apply this patch 4. reload page and verify that overdue dates turned red Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Tested with different due dates (hourly and not) and different date formats. Passes tests and QA script.
Created attachment 31597 [details] [review] [PASSED QA] Bug 12729 - Overdue items won't show as overdue in red in circulation It seems that Firefox date parser doesn't like our dates which are formatted in ISO format like "2014-08-06 00:00:00". This results in missing red color in overdue dates. So intead of munching different date formats and JavaScript (and having to support different browers) this patch moves check for overdue dates back to mysql and just transfers boolean value to JavaScript so it can show correct class for date_due. Test scenario: 1. find borrower with overdue checkouts 2. verify that all dates are black (and are in ISO format) 3. apply this patch 4. reload page and verify that overdue dates turned red Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Tested with different due dates (hourly and not) and different date formats. Passes tests and QA script. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Patch pushed to master. Thanks Dobrica!
Pushed to 3.16.x for inclusion in 3.16.4.