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

KohaRest driver implementation #1016

Merged
merged 32 commits into from Jun 9, 2020
Merged

Conversation

EreMaijala
Copy link
Contributor

@EreMaijala EreMaijala commented Aug 10, 2017

This is a feature-complete (as far as what VuFind by default supports) driver implementation for Koha REST APIs. Currently requires Koha's master or upcoming release 20.05 and a Koha REST API plugin at https://github.com/natlibfi/koha-plugin-rest-di.

TODO:

  • Checkout history needs sorting by title, not yet built-in in Koha.
  • Laminas migration

@demiankatz demiankatz mentioned this pull request Aug 10, 2017
4 tasks
@xmorave2
Copy link
Contributor

We can close #874 I think, Ere's work is great and we should base this driver on it ;) thanks!

@demiankatz
Copy link
Member

Great, thanks, @xmorave2; I'll take care of that now!

@misilot
Copy link
Contributor

misilot commented Jan 31, 2018

Do you know if Course Reserves will be included? As I noticed getCourses(), getInstructors(), and getDepartments() appear to be missing?

@EreMaijala
Copy link
Contributor Author

Updated to the latest version. This is a candidate for production use.

We don't use course reserves so I'm afraid that it'll be up to someone else to implement support for them.

@demiankatz
Copy link
Member

When you say this is a candidate for production use, do you mean that things have stabilized on the Koha side and we should consider merging this? If so, one quick suggestion: maybe we should add a note to the driver list in config.ini specifying the minimum Koha version required for the driver.

@EreMaijala
Copy link
Contributor Author

What I mean is that the first Finnish Koha libraries are just about to go live with Finna (VuFind), but I think the mainline Koha is still missing most of the required API endpoints. See https://github.com/Koha-Community/Koha/tree/master/api/v1/swagger/paths compared to https://github.com/KohaSuomi/Koha/tree/ks-rumble/api/v1/swagger/paths. Unfortunately it looks like very little progress has been made on Koha-Community side to integrate the features.

@demiankatz
Copy link
Member

Thanks for the clarification. I guess we'll leave it as a PR for now!

@demiankatz
Copy link
Member

@EreMaijala, I've just merged the latest master into this and resolved conflicts. Any news on the progress of the API release? I notice that the ticket cited above appears not to have changed in the past year.

@EreMaijala
Copy link
Contributor Author

@demiankatz Thanks! The required APIs will probably be converted to an API plugin for Koha since there's now infrastructure to support that on the Koha side. No timeframe for that at the moment, unfortunately..

@demiankatz
Copy link
Member

Good to know! Are there any tickets or other URLs we can watch in future for news on the progress of the plugin?

@EreMaijala
Copy link
Contributor Author

Not right now, but I'll make sure to link to any when they exist.

@EreMaijala
Copy link
Contributor Author

I'm now working on making the driver use Koha's existing REST APIs or API plugins whenever possible and adding a new API plugin for the rest of the needed functionality.

@xmorave2
Copy link
Contributor

xmorave2 commented Apr 3, 2019

@EreMaijala Which enpoints are missing in Koha now do you think? I planned to start working on plugin for availability endpoint... That's the biggest issue for this drive I think...

@EreMaijala
Copy link
Contributor Author

@xmorave2 Availability is one, but but we also need at least the following:

  • patron validation
  • extensions to checkouts
  • items
  • checkout history

My work is still in progress, so there may be more and probably is.

@xmorave2
Copy link
Contributor

xmorave2 commented Apr 4, 2019

@EreMaijala
For checkouts history I have a path here: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17005
I am going to bring this proposal to Koha development meeting next week.

items should be implemented in Tomas's plugin for bibliocommons, I have it installed here: https://koha-devel-test.knihovna-uo.cz/api/v1/
And I can give you access for this testing instance if you want, we are using this instance for testing of connection Koha to Czech national library portal knihovny.cz (based on vufind).

@EreMaijala
Copy link
Contributor Author

@xmorave2 Unfortunately it seems to have the same design issue as normal checkouts, i.e. no support for paging the results. Especially the history can get huge, and without paging things just won't perform well.

@EreMaijala
Copy link
Contributor Author

With the latest commit I believe all the required functionality has been implemented with the help of the Koha API plugin. Still needs at least testing, and a new Koha release.

@demiankatz
Copy link
Member

Thanks, @EreMaijala, just let me know when it's time to merge this... and whether you have any thoughts on if/when/how to retire either of the other Koha drivers. (I imagine will still need all three for at least some period of time). Hopefully @xmorave2 can help with testing, as well.

@EreMaijala
Copy link
Contributor Author

Yes, it would be great if @xmorave2 could help with testing. My environment is all completely fake data, so testing with e.g. an anonymized real database might uncover missing changes.

@xmorave2
Copy link
Contributor

@EreMaijala, @demiankatz Of course, I could test it on more 'real' data. I'll try to do it as soon as possible. Reading the code it is looking solid, so I think there will be no major issues.

@EreMaijala
Copy link
Contributor Author

@xmorave2 I'm actually expecting there to be more issues in the Koha plugin...

@EreMaijala
Copy link
Contributor Author

I'm still working on the plugin adding some functionality we need locally. Some minor changes will follow.

- Fix several bugs in holds handling.
- Improve the makeRequest method parameter handling.
- Fix and unify error handling.
…. Included for support of custom hold change functionality.
@EreMaijala
Copy link
Contributor Author

I think I've now completed all the forementioned changes. @xmorave2, feel free to start testing whenever it's suitable for you! :)

@demiankatz
Copy link
Member

Now that Laminas migration work has been merged to master, we should bring this PR up to date to match. Please let me know if you need any assistance from me.

@EreMaijala
Copy link
Contributor Author

All done now. And I've briefly tested the functionality with newly released Koha 20.05. This should be good to go now!

Copy link
Member

@demiankatz demiankatz left a comment

Choose a reason for hiding this comment

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

Thanks, @EreMaijala, it would be great to merge this soon so we can include it in release 7.0. I have a few (mostly logistical) questions, which you can see below.

languages/en.ini Show resolved Hide resolved
config/vufind/config.ini Outdated Show resolved Hide resolved
module/VuFind/src/VuFind/ILS/Driver/CacheTrait.php Outdated Show resolved Hide resolved
@EreMaijala
Copy link
Contributor Author

@demiankatz I believe I've addressed your comments. I'll leave deprecation of the old drivers up to you. I think it would make sense since the old APIs don't get much attention and using database access is often convoluted, but I don't want to force KohaRest use on anyone.

@demiankatz demiankatz merged commit 45e8119 into vufind-org:master Jun 9, 2020
EreMaijala added a commit to EreMaijala/vufind that referenced this pull request Jun 15, 2020
@EreMaijala EreMaijala deleted the koharest branch March 29, 2021 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants