sul-dlss / FOLIO-Project-Stanford

Task management for Stanford’s analysis of FOLIO.
2 stars 0 forks source link

Touch loans to update notice policy #638

Closed dlrueda closed 6 months ago

dlrueda commented 6 months ago

CIrc folks want to change the notice policy used in the circ rules for annual loans. Once they change the policy, it will only affect new/renewed loans, not the existing loans.

From Folio slack, Brooks Travis says we can do a GET and PUT on existing loans, with no update, and the loans will re-evaluate their notice policy, and so start using the new notice policy in the circ rules.

Endpoint is /circulation/loans/{loanId}

Loans we want to select will have due date of July 1 2024

dlrueda commented 6 months ago

Catherine will create the notice policy and put it in the correct circ rule on folio-test.

Then she will give us a few loans to test it out on.

dlrueda commented 6 months ago

Catherine, on folio-test: We created a new notice policy called Test 42 days, and applied it to circ rule for Green stacks (faculty, staff, fellow patron groups). A few barcodes to "touch" loans for: 36105028899743, 36105215173134, 36105236127655, 36105234011588

dlrueda commented 6 months ago

36105028899743 circulation/loans/b5280934-ce6d-45f4-a26b-1742aab15289 36105215173134 circulation/loans/36a7f34e-08ce-4221-8e63-3872c6585ace

I did the GET and PUT using postman for the above two loans. First looked up item in Folio UI, clicked on "Checked out" and got the loan UUID from URL.

Had to use token for libsys_admin user, not myself. I added circulation.loans.put and circulation.loans.get to the Admin PSet on folio-test, but even after logging out and in, hard-refreshing etc., as myself, it gave me the same "you need permissions" error when trying to do the lookup in Settings->developer->okapi query. Worked fine for Libsys_admin user.

image.png
dlrueda commented 6 months ago

Mixed results. A notice went out as expected for item 36105215173134. But no notice for 36105028899743. Both of these items were charged to the same user, so one notice for both items should have been sent.

They are going to update the notice policy to 39 days, and will provide 10 more items to test with.

Update: 2nd notice didn't go out because item was not a Green library item, and the circ rules had only been updated for Green. Code works fine and is ready for timing testing

dlrueda commented 6 months ago

Timings folio-test (1 second sleep built in): 24,650 loans 21 hours folio-stage (no sleeps): 30,871 loans 16 hours 19 mins

dlrueda commented 6 months ago

work completed on prod timing 31,844 loans 18 hours 44 mins