Bug 33647: (follow-up) Wording update & only show lastseen if activity is tracked

This follow-up implements these suggestions:
A. Uses 'not recorded' instead of never when there is no date.
B. Only shows lastseen if syspref TrackLastPatronActivityTriggers has at least one trigger.

To test:

1. Apply patch
2. Ensure syspref TrackLastPatronActivityTriggers has no triggers set.
3. Check patron record top left corner to verify lastseen is not shown.
4. Change system TrackLastPatronActivityTriggers to trigger on Checking out an item.
5. Recheck patron record top left corner to verify lastseen says "not recorded".
6. Check out a book to patron
7. Recheck patron record top left corner to verify there is a date and time shown.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Bernard Scaife <bernard.scaife@openfifth.co.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
CJ Lynce 2025-10-01 18:55:51 +00:00 committed by Lucas Gass
parent 6597894506
commit cd36f5182b
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
1 changed files with 10 additions and 8 deletions

View File

@ -153,14 +153,16 @@
<li>
<span class="patronupdatedon">Updated on: [% patron.updated_on | $KohaDates with_hours => 1 %]</span>
</li>
[% IF ( patron.lastseen ) %]
<li>
<span class="patronlastseenon">Last seen on: [% patron.lastseen | $KohaDates with_hours => 1 %]</span>
</li>
[% ELSE %]
<li>
<span class="patronlastseenon">Last seen on: Never</span>
</li>
[% IF Koha.Preference('TrackLastPatronActivityTriggers') %]
[% IF ( patron.lastseen ) %]
<li>
<span class="patronlastseenon">Last seen on: [% patron.lastseen | $KohaDates with_hours => 1 %]</span>
</li>
[% ELSE %]
<li>
<span class="patronlastseenon">Last seen on: not recorded</span>
</li>
[% END %]
[% END %]
[% IF patron.account_locked %]
[% IF patron.login_attempts < 0 %]