Bug 17821 - due date in intranet search results should use TT date plugin
Summary: due date in intranet search results should use TT date plugin
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Fridolin Somers
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on: 15822
Blocks: 7444
  Show dependency treegraph
 
Reported: 2016-12-28 14:33 UTC by Fridolin Somers
Modified: 2017-12-07 22:20 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 17821 - due date in intranet search results should use TT date plugin (3.33 KB, patch)
2016-12-28 14:42 UTC, Fridolin Somers
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 17821 - due date in intranet search results should use TT date plugin (3.39 KB, patch)
2017-01-03 16:23 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 17821 - due date in intranet search results should use TT date plugin (3.47 KB, patch)
2017-04-14 11:28 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Fridolin Somers 2016-12-28 14:33:04 UTC
Intranet search results displays due date from item onloan.
This should use the TT date plugin.
Comment 1 Fridolin Somers 2016-12-28 14:42:01 UTC
Created attachment 58472 [details] [review]
Bug 17821 - due date in intranet search results should use TT date plugin

Intranet search results displays due date from item onloan.
This should use the TT date plugin.

Test plan :
- set syspref dateformat not on yyyy-mm-dd, for example dd/mm/yyyy
- checkout an item
- at intranet, perform a search where you see the item
=> You must see : "date due : dd/mm/yyyy"
Comment 2 Owen Leonard 2017-01-03 16:23:34 UTC
Created attachment 58567 [details] [review]
[SIGNED-OFF] Bug 17821 - due date in intranet search results should use TT date plugin

Intranet search results displays due date from item onloan.
This should use the TT date plugin.

Test plan :
- set syspref dateformat not on yyyy-mm-dd, for example dd/mm/yyyy
- checkout an item
- at intranet, perform a search where you see the item
=> You must see : "date due : dd/mm/yyyy"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 3 Jonathan Druart 2017-01-11 08:51:05 UTC
Fridolin, how this is useful?
I understand the consistency point of view, but I do not think it is really valuable.
Did you check the other calls to this subroutine to make sure that will not affect another script?
Comment 4 Fridolin Somers 2017-03-28 07:58:36 UTC
(In reply to Jonathan Druart from comment #3)
> Fridolin, how this is useful?
> I understand the consistency point of view, but I do not think it is really
> valuable.

The TT date plugin may one day behave differently from the old code in C4::Search.
Also we had some cases where date_due is not correct, the TT plugin handles this.

> Did you check the other calls to this subroutine to make sure that will not
> affect another script?
Yep, its not easy since date_due is used a lot. But only intranet results uses it.
Comment 5 Jonathan Druart 2017-03-28 12:05:27 UTC
Still do not think it's needed. Putting it back to the SO queue to get point of view from other QAers.
Comment 6 Fridolin Somers 2017-04-10 10:35:55 UTC
Some of our instances have sometimes an invalid date in items.onload (like 000-00-00). We don't know why but without this patch the page failes on error :
"Can't locate object method \"ymd\" via package \"dateonly\" (perh"...) called at /home/koha/src/Koha/DateUtils.pm line 223
Comment 7 Jonathan Druart 2017-04-11 22:32:26 UTC
(In reply to Fridolin SOMERS from comment #6)
> Some of our instances have sometimes an invalid date in items.onload (like
> 000-00-00). We don't know why but without this patch the page failes on
> error :
> "Can't locate object method \"ymd\" via package \"dateonly\" (perh"...)
> called at /home/koha/src/Koha/DateUtils.pm line 223

Ok but you are not fixing anything with this patch, just hide other problems:

course_reserves/course-details.tt: [% IF cr.item.onloan %]
reserve/request.tt:                [% IF ( itemloo.onloan ) %]
catalogue/detail.tt:               [% UNLESS ( item.itemnotforloan || item.notforloan_per_itemtype || item.onloan || item.itemlost || item.withdrawn || item.damaged || item.transfertwhen || item.reservedate ) %]

In all of these tests, onloan will be true when you are expecting it to be false.
Comment 8 Marcel de Rooy 2017-04-14 11:28:23 UTC
Created attachment 62167 [details] [review]
Bug 17821 - due date in intranet search results should use TT date plugin

Intranet search results displays due date from item onloan.
This should use the TT date plugin.

Test plan :
- set syspref dateformat not on yyyy-mm-dd, for example dd/mm/yyyy
- checkout an item
- at intranet, perform a search where you see the item
=> You must see : "date due : dd/mm/yyyy"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 9 Kyle M Hall 2017-04-14 14:43:18 UTC
Pushed to master for 17.05, thanks Frido!
Comment 10 Katrin Fischer 2017-04-16 12:47:24 UTC
This patch has been pushed to 16.11.x and will be in 16.11.07.
Comment 11 Mason James 2017-05-03 04:28:06 UTC
Pushed to 16.05.x, for 16.05.12 release
Comment 12 Julian Maurice 2017-05-10 08:25:06 UTC
Pushed to 3.22.x for 3.22.21