Summary: | Plugin hook elasticsearch_to_document | ||
---|---|---|---|
Product: | Koha | Reporter: | Frédéric Demians <f.demians> |
Component: | Plugin architecture | Assignee: | Frédéric Demians <f.demians> |
Status: | Pushed to main --- | QA Contact: | Kyle M Hall (khall) <kyle> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | dcook, domm, fridolin.somers, kyle, shi-yao.wang |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31897 | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: |
25.05.00
|
Circulation function: | |
Attachments: |
Bug 36433: UT
Bug 36433: Plugin hook elasticsearch_to_document Bug 36433: UT Bug 36433: Plugin hook elasticsearch_to_document Bug 36433: UT Bug 36433: Plugin hook elasticsearch_to_document Bug 36433: UT Bug 36433: Plugin hook elasticsearch_to_document Bug 36433: fix test failing on Jenkins Bug 36433: (follow-up) Include required library |
Description
Frédéric Demians
2024-03-26 17:10:14 UTC
Created attachment 163962 [details] [review] Bug 36433: UT Created attachment 163963 [details] [review] Bug 36433: Plugin hook elasticsearch_to_document Add a new hook elasticsearch_to_document in order to allow completing the 'document' to be sent to Elasticsearch. Usage example: (1) add new search fields, (2) normalize/sanitize existing fields, (3) use id fields to retrieve info via web services in other repositories (say VIAF), (4) download file referenced in a field, and index its content. To test: 1. Apply the unit tests patch, and run it: prove t/db_dependent/Koha/Plugins/Biblio_and_Items_plugin_hooks.t => FAIL: Tests fail! The hook is not implemented so the desired 2. Apply this patch, and then repeat 1: => SUCCESS: It works! Created attachment 172062 [details] [review] Bug 36433: UT Signed-off-by: Shi Yao Wang <shi-yao.wang@inlibro.com> Created attachment 172063 [details] [review] Bug 36433: Plugin hook elasticsearch_to_document Add a new hook elasticsearch_to_document in order to allow completing the 'document' to be sent to Elasticsearch. Usage example: (1) add new search fields, (2) normalize/sanitize existing fields, (3) use id fields to retrieve info via web services in other repositories (say VIAF), (4) download file referenced in a field, and index its content. To test: 1. Apply the unit tests patch, and run it: prove t/db_dependent/Koha/Plugins/Biblio_and_Items_plugin_hooks.t => FAIL: Tests fail! The hook is not implemented so the desired 2. Apply this patch, and then repeat 1: => SUCCESS: It works! Signed-off-by: Shi Yao Wang <shi-yao.wang@inlibro.com> Created attachment 176749 [details] [review] Bug 36433: UT Signed-off-by: Shi Yao Wang <shi-yao.wang@inlibro.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 176750 [details] [review] Bug 36433: Plugin hook elasticsearch_to_document Add a new hook elasticsearch_to_document in order to allow completing the 'document' to be sent to Elasticsearch. Usage example: (1) add new search fields, (2) normalize/sanitize existing fields, (3) use id fields to retrieve info via web services in other repositories (say VIAF), (4) download file referenced in a field, and index its content. To test: 1. Apply the unit tests patch, and run it: prove t/db_dependent/Koha/Plugins/Biblio_and_Items_plugin_hooks.t => FAIL: Tests fail! The hook is not implemented so the desired 2. Apply this patch, and then repeat 1: => SUCCESS: It works! Signed-off-by: Shi Yao Wang <shi-yao.wang@inlibro.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Please update https://wiki.koha-community.org/wiki/Koha_Plugin_Hooks! Pushed for 25.05! Well done everyone, thank you! Thanks. Wiki page updated. (In reply to Frédéric Demians from comment #12) > Thanks. Wiki page updated. +1 This makes one of the tests on Jenkins fail, please check and fix: https://jenkins.koha-community.org/job/Koha_Main_D11/lastCompletedBuild/testReport/(root)/t_db_dependent_Koha_Plugins_Biblio_and_Items_plugin_hooks_t/No_tests_run_for_subtest__elasticsearch_to_document___hooks_tests___1937_/ (In reply to Katrin Fischer from comment #14) > This makes one of the tests on Jenkins fail, please check and fix: Thanks. This is the group of tests introduced by this patch which are not executed by Jenkins, apparently. I can't reproduce on my box. I make the assumption that it is due to the lack of a db transaction rollback, and propose a fix. Hope that's it. Created attachment 178685 [details] [review] Bug 36433: fix test failing on Jenkins Transaction rollback not called. Thanks, Frederic, let's try with your patch! Created attachment 178778 [details] [review] Bug 36433: (follow-up) Include required library Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Follow-up "Include required library" pushed to main. *** Bug 39552 has been marked as a duplicate of this bug. *** |