Bug 36112: Port default CHECKOUT_NOTE notice to TT

Port the default notice text to Template Toolkit. Also, add access to
item information in order to give more useful information about the
checked-out item that the note refers to (in this case, the item barcode
instead of the biblionumber)

To test:
1. Apply patch and reset all
2. Enable the system preference AllowCheckoutNotes
3. Go to Administration > Libraries and edit the current logged-in
   library to ensure that there is a value in the Email field
4. Check out an item to a patron
5. Ensure the patron has values in the first name and surname fields
6. Log into the OPAC as that patron
7. Click to display the patron's current checkouts
8. Click the + button to the right of a checkout
9. Click the "Add Note" button beneath the table
10. Add some text and submit the note
11. Return to the staff interface and go to the Notices tab for the patron
--> Confirm that there is a notice called "Checkout note" with all the
correct information

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Emily Lamancusa 2024-09-27 19:20:58 +00:00 committed by Katrin Fischer
parent bd14a9d869
commit 2a5880d86b
Signed by: kfischer
GPG key ID: 0EF6E2C03357A834
3 changed files with 6 additions and 2 deletions

View file

@ -697,7 +697,8 @@ tables:
message_transport_type: email
lang: default
content:
- "<<borrowers.firstname>> <<borrowers.surname>> has added a note to the item <<biblio.title>> - <<biblio.author>> (<<biblio.biblionumber>>)."
- "[% borrower.firstname %] [% borrower.surname %] has added a note to the item [% biblio.title %] by [% biblio.author %] ([% item.barcode %]):"
- "[% checkout.note %]"
- module: circulation
code: DUE
@ -2648,4 +2649,4 @@ tables:
- "[% deleted %] records deleted"
- "[% skipped %] records skipped"
- "[% in_error %] records in error"
- "[% total %] total"
- "[% total %] total"

View file

@ -84,6 +84,8 @@ if ( $op eq 'cud-issuenote' && C4::Context->preference('AllowCheckoutNotes') &&
tables => {
'biblio' => $biblio->biblionumber,
'borrowers' => $borrowernumber,
'issues' => $issue->itemnumber,
'items' => $issue->itemnumber,
},
);

View file

@ -90,6 +90,7 @@ if ($is_ajax) {
'biblio' => $biblionumber,
'borrowers' => $borrowernumber,
'issues' => $issue->itemnumber,
'items' => $issue->itemnumber,
},
);