Bug 32986 - Add ability to generate custom slips for patrons
Summary: Add ability to generate custom slips for patrons
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Nick Clemens
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-16 19:52 UTC by Nick Clemens
Modified: 2023-03-17 16:06 UTC (History)
2 users (show)

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


Attachments
Bug 32986: Add patron_slip module to letters and allow printing on members account (14.56 KB, patch)
2023-02-16 19:57 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 32986: Add patron_slip module to letters and allow printing on members account (14.60 KB, patch)
2023-03-16 13:45 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 32986: (follow-up) Restore styling for print button (2.73 KB, patch)
2023-03-17 15:05 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 32986: Add patron_slip module to letters and allow printing on members account (15.47 KB, patch)
2023-03-17 15:42 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 32986: Add patron_slip module to letters and allow printing on members account (15.53 KB, patch)
2023-03-17 16:06 UTC, ByWater Sandboxes
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2023-02-16 19:52:17 UTC
Some libraries would like to be able to provide custom information to a patron, while still using traditional slips - we should be able to add custom slips for printing form a patron's account
Comment 1 Nick Clemens 2023-02-16 19:57:15 UTC
Created attachment 146750 [details] [review]
Bug 32986: Add patron_slip module to letters and allow printing on members account

This patch adds a new module to letters 'patron_slip' / Patrons toolbar
(slip)

This also combines some of the slip printing JS to make things more
direct

To test:
1 - Apply patch
2 - Confirm you can print slip, summary, quickslip, and checkin slip
  when viewing a patron's account
3 - Enable  DisplayClearScreenButton syspref, and test that it works
  with both values
4 - Go to Tools->Notices and slips
5 - Define a new notice in the 'Patron toolbar (slip)' module
6 - Enter content like below in the 'Print' transport:
Patron has [% borrower.holds.count %] holds

List of holds:
[% FOREACH hold IN borrower.holds %]
===============================
    Reserve id: [% hold.reserve_id %]
    Title [% hold.biblio.title %]
[% END %]
7 - Go to patron scree
8 - Note new option under 'Print'
9 - Print the new slip and confirm it works (try with and without
  placing holds for patron
Comment 2 Andrew Fuerste-Henry 2023-03-02 17:41:50 UTC
I cleared a merge error to get this to apply. I'm not sure if the issues I ran into were due to me not clearing the error properly or if they're inherent to the patch. In my testing, with the patch applied, the checkin slip always gives an error of "no template defined" and the clear screen and print buttons aren't in the right place after enabling DisplayClearScreenButton.
Comment 3 Nick Clemens 2023-03-16 13:45:27 UTC
Created attachment 148267 [details] [review]
Bug 32986: Add patron_slip module to letters and allow printing on members account

This patch adds a new module to letters 'patron_slip' / Patrons toolbar
(slip)

This also combines some of the slip printing JS to make things more
direct

To test:
1 - Apply patch
2 - Confirm you can print slip, summary, quickslip, and checkin slip
  when viewing a patron's account
3 - Enable  DisplayClearScreenButton syspref, and test that it works
  with both values
4 - Go to Tools->Notices and slips
5 - Define a new notice in the 'Patron toolbar (slip)' module
6 - Enter content like below in the 'Print' transport:
Patron has [% borrower.holds.count %] holds

List of holds:
[% FOREACH hold IN borrower.holds %]
===============================
    Reserve id: [% hold.reserve_id %]
    Title [% hold.biblio.title %]
[% END %]
7 - Go to patron scree
8 - Note new option under 'Print'
9 - Print the new slip and confirm it works (try with and without
  placing holds for patron
Comment 4 Andrew Fuerste-Henry 2023-03-17 14:15:23 UTC
(In reply to Andrew Fuerste-Henry from comment #2)
> I cleared a merge error to get this to apply. I'm not sure if the issues I
> ran into were due to me not clearing the error properly or if they're
> inherent to the patch. In my testing, with the patch applied, the checkin
> slip always gives an error of "no template defined" and the clear screen and
> print buttons aren't in the right place after enabling
> DisplayClearScreenButton.

Thanks for clearing the merge error! These things are both still true. The Checkin slip always says "No template defined" and the printer icon for DisplayClearScreenButton has jumped to the left side of the checkout box.
Comment 5 Nick Clemens 2023-03-17 15:05:55 UTC
Created attachment 148361 [details] [review]
Bug 32986: (follow-up) Restore styling for print button

To test:
Apply
yarn build
COnfirm display of printer icon is restored
Comment 6 Nick Clemens 2023-03-17 15:42:54 UTC
Created attachment 148374 [details] [review]
Bug 32986: Add patron_slip module to letters and allow printing on members account

This patch adds a new module to letters 'patron_slip' / Patrons toolbar
(slip)

This also combines some of the slip printing JS to make things more
direct

To test:
1 - Apply patch
2 - restart_all
3 - yarn build
4 - Confirm you can print slip, summary, quickslip, and checkin slip
  when viewing a patron's account
5 - Enable  DisplayClearScreenButton syspref, and test that it works
  with both values
6 - Go to Tools->Notices and slips
7 - Define a new notice in the 'Patron toolbar (slip)' module
8 - Enter content like below in the 'Print' transport:
Patron has [% borrower.holds.count %] holds

List of holds:
[% FOREACH hold IN borrower.holds %]
===============================
    Reserve id: [% hold.reserve_id %]
    Title [% hold.biblio.title %]
[% END %]
9 - Go to patron scree
10 - Note new option under 'Print'
11 - Print the new slip and confirm it works (try with and without
  placing holds for patron
Comment 7 ByWater Sandboxes 2023-03-17 16:06:15 UTC
Created attachment 148376 [details] [review]
Bug 32986: Add patron_slip module to letters and allow printing on members account

This patch adds a new module to letters 'patron_slip' / Patrons toolbar
(slip)

This also combines some of the slip printing JS to make things more
direct

To test:
1 - Apply patch
2 - restart_all
3 - yarn build
4 - Confirm you can print slip, summary, quickslip, and checkin slip
  when viewing a patron's account
5 - Enable  DisplayClearScreenButton syspref, and test that it works
  with both values
6 - Go to Tools->Notices and slips
7 - Define a new notice in the 'Patron toolbar (slip)' module
8 - Enter content like below in the 'Print' transport:
Patron has [% borrower.holds.count %] holds

List of holds:
[% FOREACH hold IN borrower.holds %]
===============================
    Reserve id: [% hold.reserve_id %]
    Title [% hold.biblio.title %]
[% END %]
9 - Go to patron scree
10 - Note new option under 'Print'
11 - Print the new slip and confirm it works (try with and without
  placing holds for patron

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>