[Bug 12729] New: Overdue items won't show as overdue in red in circulation
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12729 Bug ID: 12729 Summary: Overdue items won't show as overdue in red in circulation Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: katrin.fischer@bsz-bw.de QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com Created attachment 30577 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30577&action=edit 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. -- 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=12729 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |11703 -- 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=12729 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com --- Comment #1 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 31142 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31142&action=edit Screenshot of feature working as expected. I can't reproduce the issue. -- 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=12729 --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- 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? -- 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=12729 --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- 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. -- 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=12729 --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- 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> -- 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=12729 --- Comment #5 from Owen Leonard <oleonard@myacpl.org> --- 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? -- 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=12729 Dobrica Pavlinusic <dpavlin@rot13.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dpavlin@rot13.org -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12729 --- Comment #6 from Dobrica Pavlinusic <dpavlin@rot13.org> --- 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. -- 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=12729 Dobrica Pavlinusic <dpavlin@rot13.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Small patch -- 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=12729 --- Comment #7 from Dobrica Pavlinusic <dpavlin@rot13.org> --- Created attachment 31372 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31372&action=edit 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 -- 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=12729 Jacek Ablewicz <abl@biblos.pk.edu.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |abl@biblos.pk.edu.pl -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12729 Aleisha Amohia <aleishaamohia@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |aleishaamohia@hotmail.com -- 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=12729 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #31372|0 |1 is obsolete| | --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 31587 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31587&action=edit [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. -- 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=12729 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- 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=12729 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #31587|0 |1 is obsolete| | --- Comment #9 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 31597 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31597&action=edit [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> -- 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=12729 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |tomascohen@gmail.com --- Comment #10 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patch pushed to master. Thanks Dobrica! -- 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=12729 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_3_16_4_candidate -- 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=12729 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #11 from Galen Charlton <gmcharlt@gmail.com> --- Pushed to 3.16.x for inclusion in 3.16.4. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org