We're tacking patron activity with lastseen and noticed that accruing charges or paying them does not update the lastseen value. Just in general getting and paying charges is an indication of activity, but we also have some patrons that are using their library card solely for copy charges in libraries that don't have a possibility for direct payment. We have no trace of the activity of these patrons, and managed to even delete some of them when cleaning up inactive patrons. We'd like to be able to add a syspref to TrackLastPatronActivityTriggers for charges. Especially it should be when a charge is (manually) added and when a charge is paid. There will be cronjobs to expire charges and there could be writeoffs that don't require acitivity from the patron, so not just any change in charges is useful for this tracking.
Created attachment 183529 [details] [review] Bug 40182: Update lastseen when adding/modifying charges To test: 1. make a payment/add credit/create an invoice to a patron 2. check that lastseen hasn't updated 3. Check "Adding patron a charge or credit" and "Modifying a patron's charge or credit" from TrackLastPatronActivityTriggers syspref 4. repeat step 1's action 5. Notice lastseen having been updated To test the new triggers you sould use multiple patrons and/or restart memcached since lastseen is not updated for the same patron but once a day
This approach is just a simple way of handling manual accountline modifications' lastseen updates for the patron that doesn't collide with cronjobs modifying patrons' accountlines. The new selections/descriptions for the TrackLastPatronActivityTriggers syspref might also need some input from you guys.
Writing off some/all charges should also update lastseen for the patron whose account is being dealt with and follows modify_charges (Modifying a patron's charge or credit) preference.