Bug 28481 - Register details "Older transactions" search does not include the selected day in the "To" field in date range
Summary: Register details "Older transactions" search does not include the selected da...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Fines and fees (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Martin Renvoize
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 13985
  Show dependency treegraph
 
Reported: 2021-05-28 11:45 UTC by Kyle M Hall
Modified: 2022-12-12 21:24 UTC (History)
6 users (show)

See Also:
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


Attachments
Bug 28481: Make 'to' date inclusive. (966 bytes, patch)
2021-11-29 10:47 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 28481: Make 'to' date inclusive. (1015 bytes, patch)
2021-11-29 20:51 UTC, David Nind
Details | Diff | Splinter Review
Bug 28481: Make 'to' date inclusive. (1015 bytes, patch)
2021-12-13 09:37 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 28481: (QA follow-up) Set date to 23:59:59 (913 bytes, patch)
2021-12-13 09:38 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 28481: Make 'to' date inclusive. (1.07 KB, patch)
2021-12-13 12:03 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28481: (QA follow-up) Set date to 23:59:59 (989 bytes, patch)
2021-12-13 12:03 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28481: (RM follow-up) formatting (982 bytes, patch)
2021-12-16 21:34 UTC, Fridolin Somers
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle M Hall 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 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 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 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 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 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 🦄
Comment 12 Kyle M Hall 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.