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

Ill patron request form mvp #109

Draft
wants to merge 12 commits into
base: ill_patron_request_form_mvp
Choose a base branch
from

Conversation

Chloe070196
Copy link

@Chloe070196 Chloe070196 commented Aug 15, 2024

This is an MVP draft for the ILL patron request form in Aspen, which enables them to:

  • view their ILL requests as stored in Koha (very minimal info is retrieved and rendered at the moment)
  • create a new ILL request which is then sent to and store in Koha

It is not fully functional yet (see comments), but further improvements will require further investigation and discussion before they can be implemented. It does, however, show that Aspen can consume the two relevant Koha API endpoints.

Current issues:

  • adding the active user's koha credentials to the php curl request header is not yet possible without
    hardcoding
  • the ILL requests fetched from Koha include limited information - less than what is seen on the Koha
    Interlibrary Loans Request page, meaning the ILL/MyRequests table in Aspen currently includes less
    information than Koha's
  • For the time being LL/MyRequests is only accessible by directly typing in the URL

I'm adding this as a draft PR so it can easily be found and viewed.

Test plan:

Note: in both ILL/MyRequests.php and ILL/NewRequestForm.php, it is likely that $user->ils_password will be empty, and needs to be temporarily replaced with the hardcoded Koha password of the test user you will masquerade as.

0 - Set up Koha so that is uses Freeform as its ILL
If using WSL: go to Koha Administration's System Preferences, and set staffClientBaseURL to
http:// instead of 'localhost'.
1 - In Aspen: Aspen Administration > Library Systems > Materials Request, scroll to 'Formats of Materials
that can be Requested', and click 'Set Materials Request Formats To Default'
2 - Repeat point 1 with 'Materials Request Form Fields'
3 - Navigate back to the top of the 'Materials Request' section, and set 'Materials Request System' to
'ILL Request System - Koha' (no point in doing so earlier, as point 1 and 2 will reset this to 'None'
3 - ensure that 'Enable Materials Request for the Public' is checked, then save
4 - Masquerade as a patron (they must be allowed to make materials request!)
5 - run a search, scroll to the bottom of the page, and click 'Submit Request'
6 - submit the form (empty, or filled in - no fields are currently required)
7 - notice the form reloads (the success message is TBA)
8 - navigate to http://< aspen host >: < aspen port >/ILL/MyRequests
9 - notice a new request has been added
10 - go to the Koha OPAC, and log in as the user you Masqueraded as.
11 - navigate to Your account > Interlibrary Loans Request
12 - notice a new request has been created

Get the form data through the AJAX request, get the necessary active
user details, format the request, send it to the Koha endpoint, then
navigate back to the ILL request form
Consumes the Koha api to fetch a list of ILL requests made by a specific
patron.
parses the initial response retrieved from the Koha API and returns its
body as an associative array, having closed the curl connexion.
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.

1 participant