Bug 35873

Summary: Count of returned items to CHECKIN message
Product: Koha Reporter: Päivi Knuutinen <paivi.knuutinen>
Component: NoticesAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low    
Version: 22.11   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Päivi Knuutinen 2024-01-23 12:39:31 UTC
If patron returns many items at the same time, it is useful to have
list but also count of returned items to CHECKIN message.
It works with CHECKINSLIP which is for printing the list of checked in items. There you can also have [% old_checkouts.count %] placeholder for amount of checkedin items.

If patron wants email of checkedin items, the [% old_checkouts.count %] placeholder doesn't work on CHECKIN notice. 
Also <<old_issues.count>> doesn't work on CHECKIN notice. 
Is it possible to show the amount of checkedin items also on email?
Comment 1 Katrin Fischer 2024-01-23 22:39:55 UTC
I believe the CHECKIN notice works like the CHECKOUT notice, meaning that we start a new notice for the patron when the first item is returned. Then we amend the notice and insert another entry. And we keep doing that with every new return until the process_messagequeue job is run and the notice is sent out. Then we start a new one if there is a another return.

This means that we don't loop over a result set at the time the notice is generated and can't count the entries like we do in other spots where .count works, because we have a quite different mechanic.