https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41463
Aleisha Amohia <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #190610|0 |1 is obsolete| | --- Comment #3 from Aleisha Amohia <[email protected]> --- Created attachment 190631 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190631&action=edit Bug 41463: REST API endpoint to gain information about an OAI set This API endpoint is to be used like: "/api/v1/oai_sets/{set_id}" and shows the following information about an OAI set: - set name - set spec - set ID - total count of items in the set - count of items in the set which also exist in the catalogue - this is useful for determining how many items have been deleted from the catalogue but has not yet been reflected in the OAI set To test: 1. Apply the patch and rebuild resources for the new API endpoints to take effect, then restart services. In KTD this looks like: perl ./build-resources.PL yarn api:bundle restart_all 2. Confirm the new getOAISet definition is available to the API: OPAC-URL/api/v1/.html 3. In the staff interface, go to Koha administration -> OAI sets configuration and create a new set. Give it a spec and name then Save. Go to edit mappings and add the following rule, then Save: - Field: 942 - Subfield: n - Operator: not equal to - Value: 1 (This would essentially exclude items from the set that are OPAC suppressed) 4. Search for a record and edit it. Go to tab 9 to find tag 942 and set n to "No". Saving the record will add it to the OAI set. 5. Now we need to add some items to the set that don't match biblios in the catalogue. The easiest way to do this is by directly adding fake items to the set in the database, something like this: sudo koha-mysql kohadev insert into oai_sets_biblios (biblionumber, set_id) values (12345678, 1); insert into oai_sets_biblios (biblionumber, set_id) values (123456378, 1); insert into oai_sets_biblios (biblionumber, set_id) values (12345678, 1); So we now have 4 items in the set - 1 that matches an existing biblio in the catalogue, and 3 that don't (in practise, they may have existed once, but have since been deleted and the set hasn't harvested those deletions). 6. Go to the API endpoint for your set and confirm the correction information is fetched: OPAC-URL/api/v1/oai_sets/{set_id} 7. Confirm tests pass: prove t/db_dependent/OAI/Sets.t prove t/db_dependent/api/v1/oai_sets.t Sponsored-by: Auckland University of Technology -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
