Open loan renewal in ECS environment with mod-tlr enabled
There are 2 issues related to open loan renewal in the ECS environment with mod-tlr enabled:
applying the correct Loan policy from the item's Data (lending) tenant rather than the loan policy from the Central tenant - this is the issue described in https://folio-org.atlassian.net/browse/MODTLR-187 ,
ensuring all loans (in 2 or 3 tenants) are synchronized and have the same renewal-related information (new due date, renewal counter).
Solution for Go-Live
The solution for Go-Live would be to reuse the same loan policy that was used during checkout. This straightforward but efficient approach ensures that the item’s data tenant loan policy is applied at renewal.
Work required:
Add a conditional logic to apply the already existing loan policy rather than perform a loan lookup
condition: ecsTlrFeatureEnabled AND (isCentralTenant OR (isSecureTenant AND isNotOloanCollection))
scope: mod-circulation, 1-2 SPs
Add an event-based loan synchronization to address the sync issue
scope: 3 SPs
The known drawback of this approach is that the previously copied loan policy in the Central tenant can be outdated.
The recommendations are not to change circulation rules or loan policies. If this is still required, then the item with the affected loan has to be checked in and then checked out.
Alternative for future solutions
In the next releases, the initial solution can be improved. Below are options for further analysis:
Repeat the same process that is used during checkout, with the circulation rules dry run and copying of a loan policy
Pros - the up-to-date loan policy
Cons - much more effort (~10 SPs); the loans sync issue is still not addressed
Proxy renewal to the lending tenant, perform the renewal there, and then sync the new loan details back
Pros - addresses both issues mentioned above
Cons - significant (?) effort as well
Note: Considerations for recall.
Condition:
*if loan.isDcb() == true
*if loan.getUser().getLastName() != DcbSystem
*if during the period N seconds before creating a loan for the same user a request was closed with ecsRequestPhase != null
if (Condition) {
renewWithForcedLoanPolicy(loan); - this is required for LoC
} else {
renewAsUsual(loan);
}
The simplest one - 3 SPs