Bug 34030 - Print slips in a batch from the preservation module
Summary: Print slips in a batch from the preservation module
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Preservation (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 33547
Blocks: 33260 33478
  Show dependency treegraph
 
Reported: 2023-06-16 10:33 UTC by Jonathan Druart
Modified: 2024-05-08 06:22 UTC (History)
5 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00
Circulation function:


Attachments
Bug 34030: Add a "print slips" action links to print in batch (10.22 KB, patch)
2023-06-16 12:23 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 34030: non-table view (2.84 KB, patch)
2023-06-16 12:23 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 34030: Add a "print slips" action links to print in batch (10.25 KB, patch)
2023-07-03 13:33 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 34030: non-table view (2.88 KB, patch)
2023-07-03 13:33 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 34030: Add a "print slips" action links to print in batch (10.37 KB, patch)
2023-08-03 08:26 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 34030: non-table view (3.00 KB, patch)
2023-08-03 08:26 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 34030: Add a "print slips" action links to print in batch (10.67 KB, patch)
2023-10-12 14:27 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 34030: non-table view (3.00 KB, patch)
2023-10-12 14:27 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 34030: Add a "print slips" action links to print in batch (10.72 KB, patch)
2023-10-12 14:37 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 34030: non-table view (3.05 KB, patch)
2023-10-12 14:37 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 34030: Add a "print slips" action links to print in batch (10.73 KB, patch)
2023-10-21 06:23 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 34030: non-table view (3.05 KB, patch)
2023-10-21 06:23 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 Jonathan Druart 2023-06-16 10:33:14 UTC
Bug 33547 add a 'print slip' button to print the info for a given item, but it would be great to have a 'print slips' action button that could be clicked after we have selected a bunch of items and that would print all slips on the same document.
Comment 1 Jonathan Druart 2023-06-16 12:23:19 UTC
Created attachment 152407 [details] [review]
Bug 34030: Add a "print slips" action links to print in batch

Sponsored-by: BULAC - http://www.bulac.fr/
Comment 2 Jonathan Druart 2023-06-16 12:23:36 UTC
Created attachment 152408 [details] [review]
Bug 34030: non-table view

Sponsored-by: BULAC - http://www.bulac.fr/
Comment 3 Jonathan Druart 2023-07-03 13:33:30 UTC
Created attachment 152975 [details] [review]
Bug 34030: Add a "print slips" action links to print in batch

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: BULAC - http://www.bulac.fr/
Comment 4 Jonathan Druart 2023-07-03 13:33:32 UTC
Created attachment 152976 [details] [review]
Bug 34030: non-table view

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Comment 5 Laurence Rault 2023-07-28 14:13:12 UTC
Tested on https://staff-preservatio.sandboxes.biblibre.eu

1. Select items in the train
2. Click the Print slips link above the table
3. Print slip is generated, one item per page, according to PRES_TRAIN_ITEM template.

This works as expected

When I click on the Print slips link without having selected items, nothing occurs. Could be done : either disabled the click, or print a warning "no item was selected"
Comment 6 Jonathan Druart 2023-08-03 08:26:57 UTC
Created attachment 154208 [details] [review]
Bug 34030: Add a "print slips" action links to print in batch

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Comment 7 Jonathan Druart 2023-08-03 08:26:59 UTC
Created attachment 154209 [details] [review]
Bug 34030: non-table view

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Comment 8 Jonathan Druart 2023-08-03 08:27:44 UTC
(In reply to Laurence Rault from comment #5)
> When I click on the Print slips link without having selected items, nothing
> occurs. Could be done : either disabled the click, or print a warning "no
> item was selected"

Will do here if QA think it's blocker, or on a separate bug report
Comment 9 Jonathan Druart 2023-10-12 14:27:19 UTC
Created attachment 156972 [details] [review]
Bug 34030: Add a "print slips" action links to print in batch

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Comment 10 Jonathan Druart 2023-10-12 14:27:22 UTC
Created attachment 156973 [details] [review]
Bug 34030: non-table view

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Comment 11 Nick Clemens (kidclamp) 2023-10-12 14:37:57 UTC
Created attachment 156975 [details] [review]
Bug 34030: Add a "print slips" action links to print in batch

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 12 Nick Clemens (kidclamp) 2023-10-12 14:37:59 UTC
Created attachment 156976 [details] [review]
Bug 34030: non-table view

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 13 Nick Clemens (kidclamp) 2023-10-12 14:39:26 UTC
(In reply to Jonathan Druart from comment #8)
> (In reply to Laurence Rault from comment #5)
> > When I click on the Print slips link without having selected items, nothing
> > occurs. Could be done : either disabled the click, or print a warning "no
> > item was selected"
> 
> Will do here if QA think it's blocker, or on a separate bug report

In my testing the button was disabled when nothing was checked
Comment 14 Jonathan Druart 2023-10-21 06:23:19 UTC
Created attachment 157591 [details] [review]
Bug 34030: Add a "print slips" action links to print in batch

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 15 Jonathan Druart 2023-10-21 06:23:21 UTC
Created attachment 157592 [details] [review]
Bug 34030: non-table view

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: BULAC - http://www.bulac.fr/
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 16 Tomás Cohen Arazi (tcohen) 2023-10-23 14:37:50 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 17 Fridolin Somers 2023-10-26 06:48:46 UTC
Depends on Bug 33547 not in 23.05.x
Comment 18 Aleisha Amohia 2023-10-30 17:33:23 UTC
Is there a test plan/documentation around how to use this? It sounds similar to work we're doing at Bug 33260 but I'm not sure what the Preservation module is and what functionality we should avoid recreating without a test plan.
Comment 19 Jonathan Druart 2023-10-31 08:40:25 UTC
(In reply to Aleisha Amohia from comment #18)
> Is there a test plan/documentation around how to use this? It sounds similar
> to work we're doing at Bug 33260 but I'm not sure what the Preservation
> module is and what functionality we should avoid recreating without a test
> plan.

Hi Aleisha,
The preservation module has been added by bug 30708.

The changes to circ/printslip.tt allow to pass several notices to print to the template, and one notice per page will be printed on the generated document.

Have a look at preservation/print_slip.pl if you want to redo it in another script.

To test this in master you can:
1. Turn on PreservationModule
2. yarn build
3. Go to /cgi-bin/koha/preservation/settings
4. Select a value for "Status for item added to waiting list:"
5. Click "add new processing", choose a name and use select "Letter template for printing slip" = "Train item slip", submit.
6. Create a train: click "Train" in the nav menu, "New train", fill in the form
7. Go to the waiting list, click "Add to waiting list". Enter several barcodes, submit
8. Click "Add last 2 items to a train" button at the top of the page, select your train, submit, submit again.
9. You should be on the detail view of the train. Select the 2 items in the table and click "Print slips"

=> You get a PDF document with 2 pages, one item per page!

Let me know if you have any more questions!
Comment 20 Aleisha Amohia 2023-11-09 05:18:10 UTC
(In reply to Jonathan Druart from comment #19)
> (In reply to Aleisha Amohia from comment #18)
> > Is there a test plan/documentation around how to use this? It sounds similar
> > to work we're doing at Bug 33260 but I'm not sure what the Preservation
> > module is and what functionality we should avoid recreating without a test
> > plan.
> 
> Hi Aleisha,
> The preservation module has been added by bug 30708.
> 
> The changes to circ/printslip.tt allow to pass several notices to print to
> the template, and one notice per page will be printed on the generated
> document.
> 
> Have a look at preservation/print_slip.pl if you want to redo it in another
> script.
> 
> Let me know if you have any more questions!

Thank you Jonathan, that is very helpful!