Bug 13536 - Date due without time on CHECKOUT alert
Summary: Date due without time on CHECKOUT alert
Status: RESOLVED DUPLICATE of bug 13622
Alias: None
Product: Koha
Classification: Unclassified
Component: Notices (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor (vote)
Assignee: Marcel de Rooy
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-08 11:54 UTC by Marcel de Rooy
Modified: 2015-05-18 12:31 UTC (History)
3 users (show)

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


Attachments
Bug 13536: Remove time from CHECKOUT notice (2.18 KB, patch)
2015-01-08 12:02 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 13536: Follow-up for adding date_due_without_time in column list (1.81 KB, patch)
2015-01-21 15:00 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 13536: Follow-up for adding date_due_without_time in column list (1.82 KB, patch)
2015-01-21 21:24 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 13536 [Proposed Followup] - Use multi-select (2.34 KB, patch)
2015-01-23 14:06 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel de Rooy 2015-01-08 11:54:23 UTC
In the issues table date_due is a datetime field.
If you do not have hourly loans, the 23:59:00 on the CHECKOUT notice may be somewhat confusing. (When does the library close?)

In the patch submitted I virtually add a date_due_without_time column to the issues table by adding such a field in the SELECT statement in Letters.pm, routine _parseletter_sth.

If you want to remove the time from the notice, now you can just edit the notice and replace <<issues.date_due>> by <<issues.date_due_without_time>>.
Comment 1 Marcel de Rooy 2015-01-08 12:02:34 UTC
Created attachment 35033 [details] [review]
Bug 13536: Remove time from CHECKOUT notice

In the issues table date_due is a datetime field.
If you do not have hourly loans, the 23:59:00 on the CHECKOUT notice may
be somewhat confusing. (When does the library close?)

In the patch submitted I virtually add a date_due_without_time column to
the issues table by adding such a field in the SELECT statement in
Letters.pm, routine _parseletter_sth.

If you want to remove the time from the notice, now you can just edit the
notice and replace <<issues.date_due>> by <<issues.date_due_without_time>>.

Test plan:
[1] Edit CHECKOUT notice as described above.
[2] Check out a book to a patron (notice enabled in his messaging prefs).
[3] Check the notice: Do you only see the date, not the time?
Comment 2 Aleisha Amohia 2015-01-20 23:10:38 UTC
Can't see <<issues.date_due_without_time>> to replace <<issues.date_due>> when editing the notice - setting to Failed QA
Comment 3 Marcel de Rooy 2015-01-21 15:00:24 UTC Comment hidden (obsolete)
Comment 4 Marcel de Rooy 2015-01-21 15:05:03 UTC
(In reply to Aleisha Amohia from comment #2)
> Can't see <<issues.date_due_without_time>> to replace <<issues.date_due>>
> when editing the notice - setting to Failed QA

Thanks, Aleisha for testing. Hopefully, you still have the time to check the follow-up ..
Comment 5 Aleisha Amohia 2015-01-21 21:24:21 UTC
Created attachment 35453 [details] [review]
Bug 13536: Follow-up for adding date_due_without_time in column list

This patch adds the ("virtual") column date_due_without_time to the
list of available columns when editing a notice (for the issues table).

Test plan:
Add the column to the CHECKOUT notice.
Verify that the actual notice at checkout now contains the expected data.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
I also tested this by adding the field to DUE and running the overdues
cron job.
Note that in that case it must be included in an <item> section. (This
is a restriction imposed by the code in the overdue_notices.pl script.)

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
Comment 6 Kyle M Hall 2015-01-23 14:06:33 UTC Comment hidden (obsolete)
Comment 7 Jonathan Druart 2015-01-26 12:17:32 UTC
Marcel, don't you think it could be better to let the choice to the user? We could imagine a filter like <<my_table.my_date_field | date_without_time>>.
Like that we could have a global solution, for all fields, not only for date_due.
Comment 8 Marcel de Rooy 2015-01-26 12:39:47 UTC
(In reply to Jonathan Druart from comment #7)
> Marcel, don't you think it could be better to let the choice to the user? We
> could imagine a filter like <<my_table.my_date_field | date_without_time>>.
> Like that we could have a global solution, for all fields, not only for
> date_due.

The user cannot choose now: he gets the time inclusive. I offer him the choice of removing the time with the new field.

I would welcome a global solution. This is indeed quite ad-hoc (like more things in Koha, so very consistent :)
Building a filter option in the notices would take more time.
Actually, we could consider building the notices through TT and add translation as well..
Comment 9 Jonathan Druart 2015-01-26 16:34:08 UTC
(In reply to M. de Rooy from comment #8)
> I would welcome a global solution.

I had a try on bug 13622, feedback welcomed ;)
Comment 10 Kyle M Hall 2015-01-30 12:31:17 UTC
I think the best solution would be to automatically strip times from items due at 23:59

Would this not solve the issue completely without the need for any special markup?

(In reply to Jonathan Druart from comment #9)
> (In reply to M. de Rooy from comment #8)
> > I would welcome a global solution.
> 
> I had a try on bug 13622, feedback welcomed ;)
Comment 11 Marcel de Rooy 2015-02-02 07:59:26 UTC
(In reply to Kyle M Hall from comment #10)
> I think the best solution would be to automatically strip times from items
> due at 23:59
Could be. But imo it is in the same ad-hoc category as the proposed solution.
Comment 12 Marcel de Rooy 2015-05-18 12:31:38 UTC

*** This bug has been marked as a duplicate of bug 13622 ***