Bug 14965 - Remove C4::Dates from 'lists' in folder reports
Summary: Remove C4::Dates from 'lists' in folder reports
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Marc Véron
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 14870
  Show dependency treegraph
 
Reported: 2015-10-06 12:36 UTC by Marc Véron
Modified: 2017-06-14 22:11 UTC (History)
4 users (show)

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


Attachments
Remove C4::Dates from 'lists' in folder reports (5.50 KB, patch)
2015-10-06 12:50 UTC, Marc Véron
Details | Diff | Splinter Review
Remove C4::Dates from 'lists' in folder reports (5.31 KB, patch)
2015-10-25 16:36 UTC, Marc Véron
Details | Diff | Splinter Review
Remove C4::Dates from 'lists' in folder reports (5.41 KB, patch)
2015-10-29 14:45 UTC, Marc Véron
Details | Diff | Splinter Review
Remove C4::Dates from 'lists' in folder reports (5.52 KB, patch)
2015-11-04 15:39 UTC, Frédéric Demians
Details | Diff | Splinter Review
Remove C4::Dates from 'lists' in folder reports (5.59 KB, patch)
2015-11-05 11:30 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 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. ***