Bug 29900

Summary: API calls should update datelastseen for API patron
Product: Koha Reporter: Andrew Fuerste-Henry <andrew>
Component: PatronsAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: gmcharlt, kyle.m.hall, sally.healey
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Andrew Fuerste-Henry 2022-01-18 15:56:35 UTC
Updating the datelastseen on API patrons when the API is called would help prevent those patrons from being accidentally batch deleted due to a lack of actual checkouts.
Comment 1 Katrin Fischer 2022-01-20 21:35:49 UTC
Should all API actions update the date? 

I am not sure what Koha does when the patron is edited (like adding a note), but I feel that this should probably not count as an activity?
Comment 2 Andrew Fuerste-Henry 2022-01-20 21:49:27 UTC
(In reply to Katrin Fischer from comment #1)
> Should all API actions update the date? 
> 
> I am not sure what Koha does when the patron is edited (like adding a note),
> but I feel that this should probably not count as an activity?

I'm sorry, I was unclear. I don't mean that every time we touch Patron A's record via an API route we should update Patron A's datelastseen. Instead, I mean if Patron B is the account to which my API credentials are attached for a given service, every time that service uses an API call to do something we should update Patron B's datelastseen. Patron B isn't a real patron, isn't really checking things out or returning them. Updating their datelastseen would help show that this API is still being used and the patron should not be deleted.
Comment 3 Katrin Fischer 2022-01-20 22:09:27 UTC
Got it! Thx for clarifying Andrew!