Bug 8306 - Patron stats, patron activity : no active doesn't work
Summary: Patron stats, patron activity : no active doesn't work
Status: Pushed to Stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Reports (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Adrien SAURAT
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-25 11:51 UTC by Adrien SAURAT
Modified: 2017-02-23 20:22 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
proposed patch (1.38 KB, patch)
2012-12-13 09:22 UTC, Adrien SAURAT
Details | Diff | Splinter Review
Bug 8306: Patrons statistics, fix for patron activity choice (1.25 KB, patch)
2017-01-12 12:58 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 8306: Patrons statistics, fix for patron activity choice (1.25 KB, patch)
2017-02-03 11:14 UTC, Nick Clemens
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Adrien SAURAT 2012-06-25 11:51:06 UTC
MT9357

In "Home › Reports › Patrons statistics", for the Patron activity, the "no active" choice doesn't work.
Comment 1 Adrien SAURAT 2012-12-13 09:22:29 UTC
Created attachment 14066 [details] [review]
proposed patch

TEST PLAN

1) Click on Reports -> Patrons to see the "Patrons statistics" page
2) Setup a request which should have result for both inactive and active patrons. For example, select "Patron category" as row and "Patron gender" as column.
3) Launch the request, then come back and select "active" in the "Patron activity" parameter. Launch the request again, the results should be different, displaying only active patrons.
4) Come back and select "inactive" in the "Patron activity" parameter. Launch the request. The results are empty ! After installing this patch you'll obtain stats for the inactive patrons.
Comment 2 Kyle M Hall 2012-12-14 15:51:27 UTC
I'm unable to reproduce this issue. I'm using the default patron data, which means many patrons without any activity. When I run the queries the 'active' has no results as expected, and the 'no active' gives me 50 total results. Am I testing this incorrectly?
Comment 3 Owen Leonard 2012-12-26 16:18:41 UTC
Following the test plan I get the same results (which appear to be valid) before and after the patch.
Comment 4 Marc Sabin 2013-03-07 09:47:02 UTC
Following the test plan, the 4th step (inactive) doesn't work :

either "no result" or "504 Gatewat Time Out".
Comment 5 Marc Sabin 2013-03-07 10:08:03 UTC
I've just test on a sandbox and the patch seems to work.

The last step (select "inactive" in the "Patron activity" parameter)
gives me the stats for the inactive patrons.
Comment 6 Jonathan Druart 2014-12-11 14:04:51 UTC
I can reproduce on the production server of the customer, maybe because of the high amount of data (17k users, 70k old_issues).

I confirm the result of the reports is the same before and after the patch (and I cannot reproduce on a local instance).
But it seems logical to me to exclude old_issues where borrowernumber is null (deleted patrons), don't you think?
Comment 7 Jonathan Druart 2014-12-11 14:09:16 UTC
Note that this could certainly be fixed on this specific installation if the nginx timeout is increased.
Comment 8 Julian Maurice 2017-01-12 12:50:56 UTC
This bug has been in discussion for almost 4 years. I don't see why a discussion is needed here. According to comments, either the patch fixes a bug or it changes nothing, depending on the database content.
Switching back to Needs signoff (patch still applies correctly)
Comment 9 Julian Maurice 2017-01-12 12:58:04 UTC
Created attachment 58874 [details] [review]
Bug 8306: Patrons statistics, fix for patron activity choice

The "inactive" for "patron activity" choice is now effective.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Comment 10 Julian Maurice 2017-01-12 13:03:05 UTC
My test plan:
1. Create a borrower X
2. Check out an item to borrower X
3. Check in the same item
4. Delete borrower X

So now, I have an old_issues line with borrowernumber = NULL

5. Go to patron stats, Row = category, Column = library, Patron activity filter = no active ==> no results
6. Apply patch
7. Repeat 5 ==> results!
Comment 11 Nick Clemens 2017-02-03 11:14:42 UTC
Created attachment 59873 [details] [review]
Bug 8306: Patrons statistics, fix for patron activity choice

The "inactive" for "patron activity" choice is now effective.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 12 Kyle M Hall 2017-02-14 14:10:58 UTC
Pushed to master for 17.05, thanks Adrien!
Comment 13 Katrin Fischer 2017-02-14 20:51:28 UTC
This patch has been pushed to 16.11.x and will be in 16.11.04.
Comment 14 Julian Maurice 2017-02-20 09:58:15 UTC
Pushed to 3.22.x for 3.22.17
Comment 15 Mason James 2017-02-23 20:22:00 UTC
Pushed to 16.05.x, for 16.05.10 release
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8306
bugs.koha-community.org
crawl=CC-MAIN-2017-13
43870
application/http; msgtype=response
sha1:NOB5RVILAXCGSAIDUKLYMZ3HAK6PBOES
<urn:uuid:e42da040-c685-4984-9fda-b811f02e1762>
2017-03-24T01:58:30Z
72.14.190.217
sha1:G2KTH6JJA7AXCY6LEEG7RJTFE6YZSBPG
<urn:uuid:c65a87be-8549-4301-b87d-f2b711d13e29>
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8306
response
<urn:uuid:9123ea39-6df5-4096-a27a-a8ce1aecc3f0>
robots: classic
hostname: ip-10-233-31-227.ec2.internal
software: Nutch 1.6 (CC)/CC WarcExport 1.0
isPartOf: CC-MAIN-2017-13
operator: CommonCrawl Admin
description: Wide crawl of the web for March 2017
publisher: CommonCrawl
format: WARC File Format 1.0
conformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf