Bug 37195 - Add ILL as option to TrackLastPatronActivityTriggers
Summary: Add ILL as option to TrackLastPatronActivityTriggers
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: ILL (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Bugs List
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-26 12:04 UTC by Magnus Enger
Modified: 2024-07-01 09:43 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Magnus Enger 2024-06-26 12:04:59 UTC
This has a couple of tricky aspects to it, I think. 

Basically, the problem is that for some patrons their only activity in the library could be to request article copies/prints through ILL. 

At least the way it works in Sweden, with ILL based around Libris, an ILL reques for a book would update lastseen, when the book is issued to the patron. But a request for an article copy/print would not update lastseen, because the ILL is just handled in the Libris backend, and there is no loan or other activity that is tracked today. 

The solution is probably to update lastseen from the Libris backend when a copy/print is marked as received, like so:

$patron->update_lastseen('activity');

But that "activity" needs to be activated in TrackLastPatronActivityTriggers. 

Questions: 
- Should we add a generic "ill" activity? Or would it make sense to have e.g. "ill_loan" and "ill_copy"? 
- Would it be OK to have "ill" listed as an activity for TrackLastPatronActivityTriggers even if the ILL module is not activated? 
- Would it make sense to have an activity in TrackLastPatronActivityTriggers that perhaps does nothing out of the box, but relies on the different backends to actually call update_lastseen? Or could the ILL module itself call update_lastseen, and not rely on the backends to do it?
Comment 1 Pedro Amorim 2024-07-01 09:43:20 UTC
Would simply having "Place an ILL request" as an option satisfy this use case? I suggest this be handled in core sub backend_create. It would update a patron's lastseen regardless of the type of request, or if it results in a loan or not.
It would also be in line with current options (very specific, single, actions), and future use cases can also be considered to be implemented the same way e.g. "Cancelling an ILL request".

(In reply to Magnus Enger from comment #0)
> - Would it be OK to have "ill" listed as an activity for
> TrackLastPatronActivityTriggers even if the ILL module is not activated?

It would be okay imo (not critical), but I think ideally it shouldn't list the option if ILLModule is disabled. Although I can see the following happening:
1) "Place an ILL request" option is enabled in TrackLastPatronActivityTriggers
2) ILLModule gets disabled
3) TrackLastPatronActivityTriggers sys pref is updated ("Place an ILL request" is now gone because it wasn't listed thus not submitted)
4) ILLModule gets enabled
5) TrackLastPatronActivityTriggers does not have the "Place an ILL request" enabled.

Not very relevant or critical, but something to keep in mind if this is a first (having conditional list options in a sys pref)