Bug 16531 - Circ overdues report is showing an empty table if no overdues
Summary: Circ overdues report is showing an empty table if no overdues
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Aleisha Amohia
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-17 04:46 UTC by Aleisha Amohia
Modified: 2017-12-07 22:16 UTC (History)
6 users (show)

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


Attachments
Empty table (19.77 KB, image/png)
2016-05-17 04:46 UTC, Aleisha Amohia
Details
Bug 16531: Circ overdue report is showing an empty table if no overdues (1.89 KB, patch)
2016-05-17 04:50 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 16531: Circ overdue report is showing an empty table if no overdues (2.21 KB, patch)
2016-05-24 01:53 UTC, Aleisha Amohia
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 16531: Circ overdue report is showing an empty table if no overdues (2.31 KB, patch)
2016-05-25 12:16 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 16531: Circ overdue report is showing an empty table if no overdues (6.70 KB, patch)
2016-07-03 23:33 UTC, Aleisha Amohia
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 16531: Circ overdue report is showing an empty table if no overdues (6.76 KB, patch)
2016-07-12 16:51 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 16531: Circ overdue report is showing an empty table if no overdues (6.78 KB, patch)
2016-07-15 13:46 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Aleisha Amohia 2016-05-17 04:46:17 UTC
Created attachment 51556 [details]
Empty table
Comment 1 Aleisha Amohia 2016-05-17 04:50:25 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2016-05-17 13:08:07 UTC
I think we can improve this page by giving the user more information about why nothing is displaying. I can think of two cases to plan for:

1. Nothing displays because there are no overdues. By default the overdue report show anything which is overdue, with no filters applied by default. If we know we're showing the unfiltered view, we can show a message which says "There are no overdues."

2. Nothing displays because the user has applied a filter to the results. ( "[% IF ( isfiltered ) %]" ). In this case we display a message which says something like, "There are no overdues matching your search." This would also allow us to display a link to "Reset filter," which is shown without this patch but isn't with the patch.
Comment 3 Aleisha Amohia 2016-05-24 01:53:23 UTC Comment hidden (obsolete)
Comment 4 Owen Leonard 2016-05-25 12:16:25 UTC Comment hidden (obsolete)
Comment 5 Jonathan Druart 2016-05-25 16:48:03 UTC
With this patch, the noreport variable becomes useless.
However it seems that it's useful in case of FilterBeforeOverdueReport is set.
Please double check.
Comment 6 Aleisha Amohia 2016-07-03 23:33:59 UTC Comment hidden (obsolete)
Comment 7 Owen Leonard 2016-07-12 16:51:15 UTC Comment hidden (obsolete)
Comment 8 Jonathan Druart 2016-07-15 13:46:36 UTC
Created attachment 53434 [details] [review]
Bug 16531: Circ overdue report is showing an empty table if no overdues

EDIT: Comment 2
EDIT2: using noreport variable (Comment 5)

To test:
1) Ensure you have no items overdue
2) Go to Circ -> Circulation reports -> Overdues
3) Notice empty table, '0 items overdue' heading
4) Ensure syspref FilterBeforeOverdueReport is set to 'Don't require'
5) Apply patch and refresh page
6) Notice empty table is no longer showing and page says "There are no
   overdues"
7) Apply a filter to search
8) Page now says "There are no overdues matching your search" with a
   link to reset filter.
9) Click Reset filter -> confirm any filters you applied are cleared.
10) Set FilterBeforeOverdueReport to 'Require' and refresh overdue
    report
11) Page should say "Please choose one or more filters to proceed"
12) Check out an item to a member, ensure due date is a date that has
    passed (i.e. yesterday)
13) Refresh overdue report page
14) Page should still say "Please choose one or more filters to proceed"
15) Set FilterBeforeOverdueReport to 'Don't require'
16) Confirm table now shows correctly with '1 items overdue' heading
    etc.

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 9 Kyle M Hall 2016-07-15 18:05:42 UTC
Pushed to master for 16.11, thanks Aleisha!
Comment 10 Frédéric Demians 2016-08-01 13:42:50 UTC
Pushed in 16.05. Will be in 16.05.02.
Comment 11 Julian Maurice 2016-08-17 11:18:28 UTC
Patch pushed to 3.22.x, will be in 3.22.10