Bug 26269 - Overdues: Download file doesn't match result in staff interface when due date filters or 'show any available items currently checked out' are used
Summary: Overdues: Download file doesn't match result in staff interface when due date...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Reports (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Marion Durand
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-21 10:45 UTC by Theodoros Theodoropoulos
Modified: 2022-12-12 21:24 UTC (History)
6 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:
22.05.00,21.11.04,21.05.13
Circulation function:


Attachments
Circulation Overdues report page with results (66.95 KB, image/png)
2020-08-21 10:54 UTC, Theodoros Theodoropoulos
Details
Contents of generated .csv file (557 bytes, application/vnd.ms-excel)
2020-08-21 10:57 UTC, Theodoros Theodoropoulos
Details
MT28016: "Date due to" and "Show any items currently checked out" filters doesn't work properly in overdues.pl (2.63 KB, patch)
2022-02-04 14:35 UTC, Marion Durand
Details | Diff | Splinter Review
MT28016: "Date due to" and "Show any items currently checked out" filters doesn't work properly in overdues.pl (2.69 KB, patch)
2022-02-07 06:56 UTC, Biblibre Sandboxes
Details | Diff | Splinter Review
Bug 26269: "Date due to" and "Show any items currently checked out" filters doesn't work properly in overdues.pl (2.75 KB, patch)
2022-02-26 21:17 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Theodoros Theodoropoulos 2020-08-21 10:45:03 UTC
in Circulation->Overdues, when requesting the overdues for:
- a FUTURE DATE (Date Due TO is > today ) AND
- Show any items currently checked out IS checked,
we get a list with several of results, as expected.

However, when we click on the "Download file of displayed overdues", the overdue.pl script produces a .csv file with FEWER results and contains ONLY results that have "Date due TO < today".

This was first discovered in our previous production Koha version (18.11.04), but is also valid in our current 18.11.11 version AND current master.
Comment 1 Theodoros Theodoropoulos 2020-08-21 10:54:07 UTC
Created attachment 108803 [details]
Circulation Overdues report page with results

Circulation Overdues report page with results from Koha DEMO installation (running master).
URL: http://koha.adminkuhn.ch:8080/cgi-bin/koha/circ/overdue.pl
Comment 2 Theodoros Theodoropoulos 2020-08-21 10:57:20 UTC
Created attachment 108804 [details]
Contents of generated .csv file

Contents of generated .csv file when "Download file of displayed overdues" was selected
Comment 3 Theodoros Theodoropoulos 2020-08-21 11:05:41 UTC
The last test was performed with koha.adminkuhn.ch (running 20.05.00.000) on 21/08/2020 and the issue was still valid
Comment 4 Marion Durand 2022-02-04 14:35:34 UTC
Created attachment 130166 [details] [review]
MT28016: "Date due to" and "Show any items currently checked out" filters doesn't work properly in overdues.pl

Filter "Date due to" is now taken into account even when filled with a
future date for the displayed result and downloaded results.
Filter "Show any items currently checked out" is now taken into account
for the downloaded results.

To test:
1- Go to Circulation then to overdues
2a- Add a filter with "Date due To" > today
2b- Check that only the results with "Due date" < today are displayed
(not those with "Due date" between today and the date requested)
2c- Click on "Download file of displayed overdues"
2d- Check that the file contains only the results with "Due date" <
today (not those with "Due date" between today and the date requested)
3a- Reset filter and then add the filter "Show any items currently
checked out"
3b- Check that all the results are displayed (even those with "Due date"
> today)
3c- Click on "Download file of displayed overdues"
3d- Check that the file contains only the results with "Due date" <
today (not those with "Due date" between today and the date requested)
9- Apply the patch
10- Repeat step 1 to 8, checking that all the results corresponding to
the selected filter are now displayed/downloaded
Comment 5 Biblibre Sandboxes 2022-02-07 06:56:31 UTC
Created attachment 130204 [details] [review]
MT28016: "Date due to" and "Show any items currently checked out" filters doesn't work properly in overdues.pl

Filter "Date due to" is now taken into account even when filled with a
future date for the displayed result and downloaded results.
Filter "Show any items currently checked out" is now taken into account
for the downloaded results.

To test:
1- Go to Circulation then to overdues
2a- Add a filter with "Date due To" > today
2b- Check that only the results with "Due date" < today are displayed
(not those with "Due date" between today and the date requested)
2c- Click on "Download file of displayed overdues"
2d- Check that the file contains only the results with "Due date" <
today (not those with "Due date" between today and the date requested)
3a- Reset filter and then add the filter "Show any items currently
checked out"
3b- Check that all the results are displayed (even those with "Due date"
> today)
3c- Click on "Download file of displayed overdues"
3d- Check that the file contains only the results with "Due date" <
today (not those with "Due date" between today and the date requested)
9- Apply the patch
10- Repeat step 1 to 8, checking that all the results corresponding to
the selected filter are now displayed/downloaded

https://bugs.koha-community.org/show_bug.cgi?id=26269

Signed-off-by: Theodoros Theodoropoulos <theod@lib.auth.gr>
Comment 6 Theodoros Theodoropoulos 2022-02-07 07:03:50 UTC
Patch provided by Marion seems to do the trick!
Thank you BibLibre :)
Comment 7 Katrin Fischer 2022-02-26 21:06:56 UTC
This is an older patch now already, but please remember that patch files always need to start with Bug XXXX:
Comment 8 Katrin Fischer 2022-02-26 21:17:23 UTC
Created attachment 131148 [details] [review]
Bug 26269: "Date due to" and "Show any items currently checked out" filters doesn't work properly in overdues.pl

Filter "Date due to" is now taken into account even when filled with a
future date for the displayed result and downloaded results.
Filter "Show any items currently checked out" is now taken into account
for the downloaded results.

To test:
1- Go to Circulation then to overdues
2a- Add a filter with "Date due To" > today
2b- Check that only the results with "Due date" < today are displayed
(not those with "Due date" between today and the date requested)
2c- Click on "Download file of displayed overdues"
2d- Check that the file contains only the results with "Due date" <
today (not those with "Due date" between today and the date requested)
3a- Reset filter and then add the filter "Show any items currently
checked out"
3b- Check that all the results are displayed (even those with "Due date"
> today)
3c- Click on "Download file of displayed overdues"
3d- Check that the file contains only the results with "Due date" <
today (not those with "Due date" between today and the date requested)
9- Apply the patch
10- Repeat step 1 to 8, checking that all the results corresponding to
the selected filter are now displayed/downloaded

https://bugs.koha-community.org/show_bug.cgi?id=26269

Signed-off-by: Theodoros Theodoropoulos <theod@lib.auth.gr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 9 Fridolin Somers 2022-03-04 01:05:57 UTC
Marion great work,
you are Theodoros goddess ;)
Comment 10 Fridolin Somers 2022-03-04 02:11:49 UTC
Pushed to master for 22.05, thanks to everybody involved ﷐[U+1F984]﷑
Comment 11 Kyle M Hall (khall) 2022-03-04 14:49:08 UTC
Pushed to 21.11.x for 21.11.04
Comment 12 Andrew Fuerste-Henry 2022-03-20 15:49:45 UTC
Pushed to 21.05.x for 21.05.13
Comment 13 Victor Grousset/tuxayo 2022-03-21 00:19:28 UTC
Not backported to oldoldstable (20.11.x). Feel free to ask if it's needed.