Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send Hold/Recall requests to ILLiad #1913

Merged
merged 5 commits into from
Oct 13, 2023
Merged

Send Hold/Recall requests to ILLiad #1913

merged 5 commits into from
Oct 13, 2023

Conversation

thatbudakguy
Copy link
Member

@thatbudakguy thatbudakguy commented Oct 12, 2023

Closes #1889

  • Support sending Hold/Recall requests to ILLiad
  • Convert the Scan request job into a generic ILLiad request job
  • Extract an Illiadable concern for mixing into Requests
  • Make HoldRecall Illiadable and create feature flag

shared_configs PRs to turn it on:
https://github.com/sul-dlss/shared_configs/pull/2087
https://github.com/sul-dlss/shared_configs/pull/2088
https://github.com/sul-dlss/shared_configs/pull/2089

@thatbudakguy thatbudakguy marked this pull request as ready for review October 12, 2023 16:50

# Mixin for requests that should be sent to ILLiad for initial handling
module Illiadable
def submit!
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using modules that override methods on the class they are mixed into, isn't the easiet to read. Is there a reason this is needed? I see that HoldRecall#submit! already calls SubmitIlliadRequestJob can we modify Scan#submit to call SubmitIlliadRequestJob directly?

even better might be to convert this module to a new class (e.g. IlliadRequest) and have a method on the "Illiadable" requests like #illiad_request. I think there is value in separating the concept of "The user made a request" and "We made this ILL request to fulfull the users request"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine just not including this method in the mixin – I figured if you mixed in Illiadable it'd be because you want to submit the request via ILLiad, but in the case of scans we also want to do something else, so it's fine to just be explicit instead.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to remove the method and make Scan#submit! explicitly call the illiad job

@jcoyne jcoyne merged commit 0c98e8e into main Oct 13, 2023
1 check passed
@jcoyne jcoyne deleted the illiad-hold-recalls branch October 13, 2023 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Direct all hold/recall requests to ILLiad instead of ReShare or FOLIO
2 participants