Bug 10718 - items with no checkouts report does not work
Summary: items with no checkouts report does not work
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Reports (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Target Milestone: ---
Assignee: Fridolin SOMERS
QA Contact: Testopia
URL: /cgi-bin/koha/reports/catalogue_out.pl
Whiteboard:
Keywords:
: 8833 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-08-13 12:54 UTC by Fridolin SOMERS
Modified: 2015-06-04 23:23 UTC (History)
5 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:
Version(s) released in:


Attachments
Bug 10718 - items with no checkouts report does not work (4.14 KB, patch)
2013-08-13 13:50 UTC, Fridolin SOMERS
Details | Diff | Splinter Review
Bug 10718 - select user branch as default (3.21 KB, patch)
2013-08-13 13:50 UTC, Fridolin SOMERS
Details | Diff | Splinter Review
Bug 10718 - items with no checkouts report permission is execute_reports (1.02 KB, patch)
2013-08-13 13:52 UTC, Fridolin SOMERS
Details | Diff | Splinter Review
Bug 10718 - redefine limit input (3.18 KB, patch)
2013-08-13 13:53 UTC, Fridolin SOMERS
Details | Diff | Splinter Review
Bug 10718 - perltidy on reports/catalogue_out.pl (12.74 KB, patch)
2013-08-13 13:53 UTC, Fridolin SOMERS
Details | Diff | Splinter Review
Bug 10718 - items with no checkouts report does not work (19.80 KB, patch)
2013-08-22 22:33 UTC, Liz Rea
Details | Diff | Splinter Review
[PASSED QA] Bug 10718 - items with no checkouts report does not work (20.03 KB, patch)
2013-08-25 18:39 UTC, Katrin Fischer
Details | Diff | Splinter Review
screenshot of output grouping by library before patch (37.89 KB, image/png)
2013-09-08 20:13 UTC, Galen Charlton
Details
screenshot of output grouping by library afterpatch (46.01 KB, image/png)
2013-09-08 20:14 UTC, Galen Charlton
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fridolin SOMERS 2013-08-13 12:54:44 UTC
Bug 8124 has commented the option to download results items with no checkouts report into a file.
But the perl code of this page uses the export into a file has default behavior since the input "output" is no more present.
The consequence is that there are never results in page.
Comment 1 Owen Leonard 2013-08-13 13:04:44 UTC
I believe this is fixed by my patch for Bug 7478.
Comment 2 Fridolin SOMERS 2013-08-13 13:50:06 UTC Comment hidden (obsolete)
Comment 3 Fridolin SOMERS 2013-08-13 13:50:41 UTC Comment hidden (obsolete)
Comment 4 Fridolin SOMERS 2013-08-13 13:52:11 UTC Comment hidden (obsolete)
Comment 5 Fridolin SOMERS 2013-08-13 13:53:14 UTC Comment hidden (obsolete)
Comment 6 Fridolin SOMERS 2013-08-13 13:53:48 UTC Comment hidden (obsolete)
Comment 7 Fridolin SOMERS 2013-08-13 13:57:31 UTC
(In reply to Owen Leonard from comment #1)
> I believe this is fixed by my patch for Bug 7478.
This is a correct solution, but isn't it better to remove the obsolete code ?
Comment 8 Liz Rea 2013-08-22 22:33:54 UTC Comment hidden (obsolete)
Comment 9 Katrin Fischer 2013-08-25 18:23:58 UTC
This patch doesn't seem to fix the translation problems fixed by 7478 - so I think we need both.
Comment 10 Katrin Fischer 2013-08-25 18:39:53 UTC
Created attachment 20600 [details] [review]
[PASSED QA] Bug 10718 - items with no checkouts report does not work

Bug 8124 has commented the option to download results items with no checkouts report into a file.
But the perl code of this page uses the export into a file has default behavior since the input "output" is no more present.
The consequence is that there are never results in page.

This patch removes the code concerning file output from template and perl.
Such a feature exists in guided reports.

Test plan :
Play with cgi-bin/koha/reports/catalogue_out.pl form and see if you get results

Bug 10718 - select user branch as default

In cgi-bin/koha/reports/catalogue_out.pl report, select in library filter the user logged-in.

Test plan :
- Log into intranet with a normal user
- Got to "Items with no checkouts" reports
=> Your branch is selected
- Run report
=> You see "Filtered on : Branch = <your branch>"
- Come back to report
- Select "Any library"
- Run report
=> You do not see "Filtered on : Branch"

Bug 10718 - items with no checkouts report permission is execute_reports

This report only executes SQL to change reports/catalogue_out.pl permissions from all reports subpermissions to reports/execute_reports.

Test plan :
Test you can access and run this report with only execute_reports subpermission into reports permission.

Bug 10718 - redefine limit input

In reports/catalogue_out.pl form, the limit input is by defaut none.
So by default the report queries all the catalogue.
This may take a very long time (fall into timeout) and since now the results are displayed in page, the page may be huge.

This patch modifies limit input to removes the "none" option.
Also reduces the number of options (same options as guided reports results per page).

Test plan:
- Go to reports/catalogue_out.pl
=> first value "10" is selected
- Launch report
=> You see "Filtered on: limit = 10"

Bug 10718 - perltidy on reports/catalogue_out.pl

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Tested all of these things, all ok - squashed patch for neatness.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Fixed a tab in one of the comments.
Improves script, but more work needed.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comment 11 Galen Charlton 2013-09-08 20:09:23 UTC
I'm going to have to fail this one.  Some of the individual patches before the squash could have been accepted as is (for example, the one fixing the permissions), but the end result completely breaks the report output when the group option is enabled.  I'll post screenshots momentarily.
Comment 12 Galen Charlton 2013-09-08 20:13:42 UTC
Created attachment 20886 [details]
screenshot of output grouping by library before patch

Note that each group has a list of its items.
Comment 13 Galen Charlton 2013-09-08 20:14:11 UTC
Created attachment 20887 [details]
screenshot of output grouping by library afterpatch

Note that only the first group has its items listed.
Comment 14 Galen Charlton 2013-09-08 20:28:55 UTC
I apologize -- what I'm seeing is breakage of the report when grouping by item type that existed /before/ the patch.  In my second screenshot, there is only one item of item type CR in the database, which *had* circulated.  Consequently, I think it shouldn't be listed in the report at all, or at the very least, the third column should be more clearly labelled that it's counting /all/ items of that type, regardless of whether they have circulated or not.

Consequently, I have pushed the patch to master, but echo Katrin's comment that more work is needed.

Thanks, Fridolyn!  Thanks, Katrin!
Comment 15 Sophie MEYNIEUX 2013-09-09 13:15:11 UTC
*** Bug 8833 has been marked as a duplicate of this bug. ***
Comment 16 Tomás Cohen Arazi 2013-11-06 16:44:27 UTC
This patch has been pushed to 3.12.x, will be in 3.12.7.

Thanks Fridolyn!
Comment 17 Kyle M Hall 2013-12-20 14:20:32 UTC
This patch has been pushed to 3.8.x, and will be in 3.08.20.

Thanks Fridolyn!