Bug 13986 - Printing a list only prints the results of the page you are viewing
Summary: Printing a list only prints the results of the page you are viewing
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Lists (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Kyle M Hall
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
: 13761 15372 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-04-13 15:21 UTC by Kyle M Hall
Modified: 2017-06-14 22:07 UTC (History)
11 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
Bug 13986 - Printing a list only prints the results of the page you are viewing (7.62 KB, patch)
2015-04-13 15:25 UTC, Kyle M Hall
Details | Diff | Splinter Review
[Signed-off] Bug 13986 - Printing a list only prints the results of the page you are viewing (7.90 KB, patch)
2015-04-13 17:26 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 13419: Add server-side processing for lists (23.20 KB, patch)
2015-04-20 14:32 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 13986 - Implement fix for OPAC (3.77 KB, patch)
2015-04-21 18:46 UTC, Kyle M Hall
Details | Diff | Splinter Review
[Signde-off] Bug 13986 - Implement fix for OPAC (3.96 KB, patch)
2015-04-22 07:59 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 13986 - Printing a list only prints the results of the page you are viewing (7.71 KB, patch)
2015-04-24 16:34 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 13986 - Implement fix for OPAC (3.85 KB, patch)
2015-04-24 16:34 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 13986 - Printing a list only prints the results of the page you are viewing (6.75 KB, patch)
2015-04-30 14:59 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 13986 - Implement fix for OPAC (3.85 KB, patch)
2015-04-30 15:02 UTC, Kyle M Hall
Details | Diff | Splinter Review
[PASSED QA] Bug 13986 - Printing a list only prints the results of the page you are viewing (6.84 KB, patch)
2015-05-03 16:37 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 13986 - Implement fix for OPAC (3.92 KB, patch)
2015-05-03 16:37 UTC, Katrin Fischer
Details | Diff | Splinter Review
[v3.18.x] Bug 13986 - Printing a list only prints the results of the page you are viewing (10.59 KB, patch)
2015-06-05 18:02 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle M Hall 2015-04-13 15:21:02 UTC
The print list button only prints the page you are viewing, and not the entire list.
Comment 1 Kyle M Hall 2015-04-13 15:25:01 UTC Comment hidden (obsolete)
Comment 2 Marc Véron 2015-04-13 17:26:31 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2015-04-20 14:32:54 UTC Comment hidden (obsolete)
Comment 4 Kyle M Hall 2015-04-21 18:46:09 UTC Comment hidden (obsolete)
Comment 5 Marc Véron 2015-04-22 07:59:09 UTC Comment hidden (obsolete)
Comment 6 Katrin Fischer 2015-04-22 21:08:51 UTC
Sorry, patch does not apply and I am not sure how to fix the conflict - better leaving it to you.
Comment 7 Kyle M Hall 2015-04-24 16:34:07 UTC Comment hidden (obsolete)
Comment 8 Kyle M Hall 2015-04-24 16:34:13 UTC Comment hidden (obsolete)
Comment 9 Katrin Fischer 2015-04-29 06:07:50 UTC
I have started testing this - is there a way we could have the 'print preview' match what is actually going to be printed?
Comment 10 Marc Véron 2015-04-29 06:27:24 UTC
(In reply to Katrin Fischer from comment #9)
> I have started testing this - is there a way we could have the 'print
> preview' match what is actually going to be printed?

I think there is now way to trigger the print preview from JavaScript, because the print preview is part of the browser.

One workaround could be to create a separate page for printing, but that would be a different approach (and not a real print preview).
Comment 11 Jonathan Druart 2015-04-29 15:06:35 UTC
Kyle,

Please provide tests for the changes in C4::VirtualShelves.
I don't know if you feel comfortable with this code, but personally I am not at all.

So maybe the better is to start and move the code into Koha::VirtualShelves.
Comment 12 Jonathan Druart 2015-04-29 15:08:02 UTC
(In reply to Jonathan Druart from comment #11)
> So maybe the better is to start and move the code into Koha::VirtualShelves.

Since your changes consist in adding a check, it's certainly a bit hard to start here...
Comment 13 Kyle M Hall 2015-04-30 14:55:09 UTC
C4::VirtualShelves has no unit tests. Further complicating the issue is that the code relies on CGI objects. I think the two small changes I made to C4::VirtualShelves::Page are pretty obvious and won't cause regressions. I can't imagine that this one small feature would justify rewriting VirtualShelves, but I do agree it could use a rewrite.
Comment 14 Kyle M Hall 2015-04-30 14:59:21 UTC Comment hidden (obsolete)
Comment 15 Kyle M Hall 2015-04-30 15:02:33 UTC Comment hidden (obsolete)
Comment 16 Katrin Fischer 2015-05-03 16:37:26 UTC
Created attachment 38780 [details] [review]
[PASSED QA] Bug 13986 - Printing a list only prints the results of the page you are viewing

The print list button only prints the page you are viewing, and not the
entire list.

Test Plan:
1) Apply this patch
2) Create a list with enough items that it will paginate
3) Browse to that list, click the 'print list' button
4) Note the entire list prints, not just the visible items

Tested in staff client, works as expected.
It would be great to have the same for OPAC as well (OPAC still prints first page only).
Signed-off-by: Marc Veron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 17 Katrin Fischer 2015-05-03 16:37:55 UTC
Created attachment 38781 [details] [review]
[PASSED QA] Bug 13986 - Implement fix for OPAC

Tested wit OPAC, full list is printed.
Signed-off-by: Marc Veron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 18 Katrin Fischer 2015-05-03 16:38:50 UTC
I am a little worried that this feature is hidden by the fact the print preview doesn't match the actual print out - but this is a good enhancement, no reason to hold it back :)
Comment 19 Tomás Cohen Arazi 2015-05-15 19:04:14 UTC
Patches pushed to master.

Thanks Kyle!
Comment 20 Chris Cormack 2015-05-17 23:32:21 UTC
Doesn't apply cleanly on 3.18.x please rebase if it is needed
Comment 21 Kyle M Hall 2015-06-05 18:02:53 UTC
Created attachment 39916 [details] [review]
[v3.18.x] Bug 13986 - Printing a list only prints the results of the page you are viewing

The print list button only prints the page you are viewing, and not the
entire list.

Test Plan:
1) Apply this patch
2) Create a list with enough items that it will paginate
3) Browse to that list, click the 'print list' button
4) Note the entire list prints, not just the visible items

Tested in staff client, works as expected.
It would be great to have the same for OPAC as well (OPAC still prints first page only).
Signed-off-by: Marc Veron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Bug 13986 - Implement fix for OPAC

Tested wit OPAC, full list is printed.
Signed-off-by: Marc Veron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 22 Nicole C. Engard 2015-07-16 18:35:45 UTC
Does the rebased patch apply to 3.18.x?
Comment 23 Fridolin SOMERS 2015-12-02 12:42:15 UTC
*** Bug 13761 has been marked as a duplicate of this bug. ***
Comment 24 Barton Chittenden 2015-12-15 19:00:22 UTC
*** Bug 15372 has been marked as a duplicate of this bug. ***