Bug 14965

Summary: Remove C4::Dates from 'lists' in folder reports
Product: Koha Reporter: Marc Véron <veron>
Component: Architecture, internals, and plumbingAssignee: Marc Véron <veron>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: jonathan.druart, josef.moravec, mirko, tomascohen
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 14870    
Attachments: Remove C4::Dates from 'lists' in folder reports
Remove C4::Dates from 'lists' in folder reports
Remove C4::Dates from 'lists' in folder reports
Remove C4::Dates from 'lists' in folder reports
Remove C4::Dates from 'lists' in folder reports

Description Marc Véron 2015-10-06 12:36:57 UTC
Remove C4::Dates from:

- reports/bor_issues_top.pl
- reports/borrowers_out.pl
- reports/cat_issues_top.pl
- reports/itemslost.pl
Comment 1 Marc Véron 2015-10-06 12:50:30 UTC Comment hidden (obsolete)
Comment 2 Marc Véron 2015-10-23 09:30:56 UTC
Still applies.
Comment 3 Mirko Tietgen 2015-10-23 15:34:46 UTC
(In reply to Marc Véron from comment #1)

>   - 'Patrons who haven't checked out (reports/borrowers_out.pl)

With the patch applied, the 'Global' column showing name and card number is missing.
Comment 4 Marc Véron 2015-10-25 16:36:53 UTC Comment hidden (obsolete)
Comment 5 Josef Moravec 2015-10-26 08:19:02 UTC
In "Patrons with the most checkouts" report (reports/bor_issues_top.pl) doesn't work filter for checked-out and checked-in dates...

Other reports works well.
Comment 6 Marc Véron 2015-10-26 10:16:05 UTC
Hi Josef,

I just tested with patch applied:

Checkout date from: 01/01/2015
... To: 31/10/2015

Check-in date from: 01/01/2015
... To: 31/10/2015

Any library / Itemtype / Category

Limit: 5
By: None

It worked.

What did you use for testing?
Comment 7 Josef Moravec 2015-10-27 14:52:26 UTC
I have test instance with only few checkouts in last 2 months. Some checkouts were made in september and some in october. But it doesn't matter which dates I use in checkout/checkin date filter, I still get exactly same data.
Comment 8 Marc Véron 2015-10-29 14:42:01 UTC
(In reply to Josef Moravec from comment #7)
> I have test instance with only few checkouts in last 2 months. Some
> checkouts were made in september and some in october. But it doesn't matter
> which dates I use in checkout/checkin date filter, I still get exactly same
> data.

Josef, thanks a lot for testing, I found the issue.
Amended patch follows.
Comment 9 Marc Véron 2015-10-29 14:45:03 UTC Comment hidden (obsolete)
Comment 10 Frédéric Demians 2015-11-04 15:39:48 UTC Comment hidden (obsolete)
Comment 11 Jonathan Druart 2015-11-05 11:30:43 UTC
Created attachment 44488 [details] [review]
Remove C4::Dates from 'lists' in folder reports

Remove C4::Dates from:

- reports/bor_issues_top.pl
- reports/borrowers_out.pl
- reports/cat_issues_top.pl
- reports/itemslost.pl

To test:

- Go to Home > Reports
- Verify that following reports behave as before:
  - 'Patrons with the most checkouts (reports/bor_issues_top.pl)
  - 'Most circulated items' (reports/cat_issues_top.pl)
  - 'Patrons who haven't checked out (reports/borrowers_out.pl)
  - 'Items lost'

Amended to fix issue with reports/borrowers_out.pl / see comment #3
Amended to fix issue with reports/bor_issues_top.pl / see comment #7
http://bugs.koha-community.org/show_bug.cgi?id=14965

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
  Code OK. The 4 reports works for me as before (same results).

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 12 Jonathan Druart 2015-11-05 11:32:23 UTC
Comment on attachment 44488 [details] [review]
Remove C4::Dates from 'lists' in folder reports

Review of attachment 44488 [details] [review]:
-----------------------------------------------------------------

::: reports/borrowers_out.pl
@@ +232,4 @@
>      }
>      $strcalc .= " AND NOT EXISTS (SELECT * FROM issues WHERE issues.borrowernumber=borrowers.borrowernumber ";
>      if ( @$filters[1] ) {
> +        $strcalc .= " AND issues.timestamp > ?";

I have opened bug 15138 for this typo.
Comment 13 Tomás Cohen Arazi 2015-11-05 13:36:53 UTC
Patch pushed to master.

Thanks Marc!
Comment 14 Kyle M Hall 2015-12-04 14:19:14 UTC
*** Bug 15138 has been marked as a duplicate of this bug. ***