Bug 28481

Summary: Register details "Older transactions" search does not include the selected day in the "To" field in date range
Product: Koha Reporter: Kyle M Hall (khall) <kyle>
Component: Fines and feesAssignee: Martin Renvoize (ashimema) <martin.renvoize>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: andrew, david, fridolin.somers, jonathan.druart, sally.healey, victor
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
This fixes the search and display of older transactions in the cash register so that items from today are included in the results. Previously, transactions for the current day were incorrectly not included.
Version(s) released in:
22.05.00,21.11.01,21.05.08
Circulation function:
Bug Depends on:    
Bug Blocks: 13985    
Attachments: Bug 28481: Make 'to' date inclusive.
Bug 28481: Make 'to' date inclusive.
Bug 28481: Make 'to' date inclusive.
Bug 28481: (QA follow-up) Set date to 23:59:59
Bug 28481: Make 'to' date inclusive.
Bug 28481: (QA follow-up) Set date to 23:59:59
Bug 28481: (RM follow-up) formatting

Description Kyle M Hall (khall) 2021-05-28 11:45:38 UTC
When searching for older transactions, the To field should include the current day.

Test Plan:
1) Sell an item
2) Cash up to make the sale historical
3) Search "Older transactions" with both dates being the current date, click "Display" to search
4) Note you get no results
5) Set "To" to tomorrow, click "Display" again
6) You should now see your transaction
Comment 1 Martin Renvoize (ashimema) 2021-11-29 10:43:52 UTC
OK, I understand.. so we should do an 'inclusive' search.. i.e. set the end time to the end of the day (or add a day)
Comment 2 Martin Renvoize (ashimema) 2021-11-29 10:47:19 UTC
Created attachment 128065 [details] [review]
Bug 28481: Make 'to' date inclusive.

Test Plan:
1) Sell an item
2) Cash up to make the sale historical
3) Search "Older transactions" with both dates being the current date,
   click "Display" to search
4) Note you get no results
5) Apply the patch
6) You should now see your transaction
Comment 3 David Nind 2021-11-29 20:51:46 UTC
Created attachment 128090 [details] [review]
Bug 28481: Make 'to' date inclusive.

Test Plan:
1) Sell an item
2) Cash up to make the sale historical
3) Search "Older transactions" with both dates being the current date,
   click "Display" to search
4) Note you get no results
5) Apply the patch
6) You should now see your transaction

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 Jonathan Druart 2021-12-01 13:13:05 UTC
Should not we set the time part to 23:59:59 instead? I think it's what we do in other parts.
Comment 5 Martin Renvoize (ashimema) 2021-12-06 09:15:19 UTC
(In reply to Jonathan Druart from comment #4)
> Should not we set the time part to 23:59:59 instead? I think it's what we do
> in other parts.

Seems reasonable to me... I'll add a follow-up
Comment 6 Martin Renvoize (ashimema) 2021-12-13 09:37:59 UTC
Created attachment 128428 [details] [review]
Bug 28481: Make 'to' date inclusive.

Test Plan:
1) Sell an item
2) Cash up to make the sale historical
3) Search "Older transactions" with both dates being the current date,
   click "Display" to search
4) Note you get no results
5) Apply the patch
6) You should now see your transaction

Signed-off-by: David Nind <david@davidnind.com>
Comment 7 Martin Renvoize (ashimema) 2021-12-13 09:38:02 UTC
Created attachment 128429 [details] [review]
Bug 28481: (QA follow-up) Set date to 23:59:59

This patch changes the fix from adding a day to setting the time to
23:59:59.
Comment 8 Jonathan Druart 2021-12-13 12:03:43 UTC
Created attachment 128453 [details] [review]
Bug 28481: Make 'to' date inclusive.

Test Plan:
1) Sell an item
2) Cash up to make the sale historical
3) Search "Older transactions" with both dates being the current date,
   click "Display" to search
4) Note you get no results
5) Apply the patch
6) You should now see your transaction

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 9 Jonathan Druart 2021-12-13 12:03:47 UTC
Created attachment 128454 [details] [review]
Bug 28481: (QA follow-up) Set date to 23:59:59

This patch changes the fix from adding a day to setting the time to
23:59:59.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 10 Fridolin Somers 2021-12-16 21:34:46 UTC
Created attachment 128640 [details] [review]
Bug 28481: (RM follow-up) formatting
Comment 11 Fridolin Somers 2021-12-16 22:13:25 UTC
Pushed to master for 22.05, thanks to everybody involved ﷐[U+1F984]﷑
Comment 12 Kyle M Hall (khall) 2021-12-17 15:04:48 UTC
Pushed to 21.11.x for 21.11.01
Comment 13 Andrew Fuerste-Henry 2021-12-17 21:24:06 UTC
Pushed to 21.05.x for 21.05.08
Comment 14 Victor Grousset/tuxayo 2021-12-23 00:41:15 UTC
Not backported to oldoldstable (20.11.x). Feel free to ask if it's needed.