Bug 23455

Summary: Patron card printing from Patron lists is broken
Product: Koha Reporter: Kelly McElligott <kelly>
Component: Label/patron card printingAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: fridolin.somers, katrin.fischer, lucas, martin.renvoize, oleonard
Version: Main   
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:
19.11.00,19.05.03
Bug Depends on: 20650    
Bug Blocks:    
Attachments: Bug 23455: Patron card printing from Patron lists is broken
Bug 23455: Patron card printing from Patron lists is broken
Bug 23455: Patron card printing from Patron lists is broken

Description Kelly McElligott 2019-08-13 13:40:28 UTC
Koha gives the ability to print Patron cards from the Patron Lists tool.  

To recreate
1. Go to a Patron List, use Actions 
2. choose Print Patron Cards.  
3. Once a layout and template have been chosen, Koha gives the box to Print Patron cards, but this box is empty.  No PDF is loaded or displayed and there are no options within this screen. 


Using the Patron Card creator and choosing a Patron List does work correctly.
Comment 1 Katrin Fischer 2019-08-15 06:26:05 UTC
Broken feature - confirmed.

Funnily, there is no error in the plack-error-log or the console, the xhr request response is:

Click on the link to download the patron cards from the patron list.

label_patronlist_1.pdf

But we are not seeing it.

Adding Owen as I tihnk this might be an issue template/Javascript side?
Comment 2 Owen Leonard 2019-08-15 12:15:07 UTC
Git bisect blames me and Bug 20650.
Comment 3 Katrin Fischer 2019-08-15 12:17:50 UTC
Bad Owen ;) Do you have an idea what's going on?
Comment 4 Owen Leonard 2019-08-15 13:58:52 UTC Comment hidden (obsolete)
Comment 5 Katrin Fischer 2019-08-15 19:32:46 UTC Comment hidden (obsolete)
Comment 6 Katrin Fischer 2019-08-15 19:33:12 UTC
I wonder if we could do without the:

Click on the link to download the patron cards from the patron list

And Instead just add a "Download.... to the displayed link.
Comment 7 Marcel de Rooy 2019-08-16 06:41:11 UTC
Created attachment 92257 [details] [review]
Bug 23455: Patron card printing from Patron lists is broken

This patch makes a few corrections to the process of printing patron
cards from the patron lists page. These changes are necessitated by Bug
20650: Changes to the markup in patroncards/print.tt were not reflected
in the JavaScript in patron_lists/lists.tt.

Also fixed: A missing quotation mark, a missing semicolon, and
incorrect template variable filter.

To test, apply the patch and go to Tools -> Patron lists.

 - Click the "Actions" menu corresponding to a patron list.
 - Select "Print patron cards."
 - In the "Print patron cards" modal, click the "Export" button.
 - The modal should reload with a link to download a patron card PDF.
   The link should work correctly.

https://bugs.koha-community.org/show_bug.cgi?id=23445

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 8 Martin Renvoize 2019-08-16 11:21:32 UTC
Nice work!

Pushed to master for 19.11.00
Comment 9 Fridolin Somers 2019-08-28 13:23:00 UTC
Pushed to 19.05.x for 19.05.03
Comment 10 Lucas Gass 2019-08-28 15:01:23 UTC
backported to 18.11.x for 18.11.09