Summary: | Add plugin version to plugin search results | ||
---|---|---|---|
Product: | Koha | Reporter: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Component: | Plugin architecture | Assignee: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | andrew, jonathan.druart, kyle, martin.renvoize, nick |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
See Also: |
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24631 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30367 |
||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
22.05.00,21.11.05
|
|
Circulation function: | |||
Attachments: |
Bug 29787: Add plugin version to plugin search results
Bug 29787: Add plugin version to plugin search results Bug 29787: Add plugin version to plugin search results |
Description
Tomás Cohen Arazi (tcohen)
2022-01-04 13:57:00 UTC
I haven't checked if it is actually possible with the gitlab/github APIs. Just reporting this needs improvement. Created attachment 129250 [details] [review] Bug 29787: Add plugin version to plugin search results This patch adds a new column to plugins search results: 'Latest version'. It takes the tag_name in both GitHub and GitLab cases and passes it to the template. To test: 1. Have this on your koha-conf.xml file: <plugin_repos> <repo> <name>ByWater Solutions</name> <org_name>bywatersolutions</org_name> <service>github</service> </repo> <repo> <name>Theke Solutions</name> <org_name>thekesolutions</org_name> <service>gitlab</service> </repo> <repo> <name>PTFS Europe</name> <org_name>ptfs-europe</org_name> <service>github</service> </repo> </plugin_repos> 2. Restart all services: $ restart_all 3. Search for the term 'barclaycard' => SUCCESS: You get results from PTFS Europe (Github) => FAIL: They don't include plugin version 4. Search for the term 'innreach' => SUCCESS: You get results from Theke (Gitlab) => FAIL: They don't include plugin version 5. Apply this patch 6. Repeat 2-4 => SUCCESS: Results show up => SUCCESS: Results include the plugin version 7. Sign off :-D I didn't go as far as including the upgrade button, because we need more information about the plugins to be able to do that. In particular, we don't store the plugin 'name' (as in koha-plugin-kitchensink) anywhere, and the same for the plugin URL. So if there are overlaps between vendors/devs things could get messy. Kyle and I are thinking about it, and will submit a different bug for that. This is where I was hoping bug 24631 would end up.. but not just for version.. but also name, description, compatibility etc. Created attachment 129649 [details] [review] Bug 29787: Add plugin version to plugin search results This patch adds a new column to plugins search results: 'Latest version'. It takes the tag_name in both GitHub and GitLab cases and passes it to the template. To test: 1. Have this on your koha-conf.xml file: <plugin_repos> <repo> <name>ByWater Solutions</name> <org_name>bywatersolutions</org_name> <service>github</service> </repo> <repo> <name>Theke Solutions</name> <org_name>thekesolutions</org_name> <service>gitlab</service> </repo> <repo> <name>PTFS Europe</name> <org_name>ptfs-europe</org_name> <service>github</service> </repo> </plugin_repos> 2. Restart all services: $ restart_all 3. Search for the term 'barclaycard' => SUCCESS: You get results from PTFS Europe (Github) => FAIL: They don't include plugin version 4. Search for the term 'innreach' => SUCCESS: You get results from Theke (Gitlab) => FAIL: They don't include plugin version 5. Apply this patch 6. Repeat 2-4 => SUCCESS: Results show up => SUCCESS: Results include the plugin version 7. Sign off :-D Signed-off-by: Owen Leonard <oleonard@myacpl.org> I've followed the steps of the test plan and I quite like it - I hadn't seen the 'search for plugins' feature yet! But following the test plan also lead me to an issue: 1) Search for barclaycard malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "(end of string)") at /usr/share/perl5/JSON.pm line 190 2) Search for innreach Results show nicely 3) Search for gibberish No results show as expected. 4) Search for patron Get a longer result list as expected. So we are really close! I assume 1) could be a problem with this specific plugin, but can we catch the problem in a better way so we don't explode? Ok, I realize, this is an error before and after the patch... so no blocker. I've filed a new bug: Bug 30367 - Plugins: Search explodes in error when searching for specific keywords Created attachment 132266 [details] [review] Bug 29787: Add plugin version to plugin search results This patch adds a new column to plugins search results: 'Latest version'. It takes the tag_name in both GitHub and GitLab cases and passes it to the template. To test: 1. Have this on your koha-conf.xml file: <plugin_repos> <repo> <name>ByWater Solutions</name> <org_name>bywatersolutions</org_name> <service>github</service> </repo> <repo> <name>Theke Solutions</name> <org_name>thekesolutions</org_name> <service>gitlab</service> </repo> <repo> <name>PTFS Europe</name> <org_name>ptfs-europe</org_name> <service>github</service> </repo> </plugin_repos> 2. Restart all services: $ restart_all 3. Search for the term 'barclaycard' => SUCCESS: You get results from PTFS Europe (Github) => FAIL: They don't include plugin version 4. Search for the term 'innreach' => SUCCESS: You get results from Theke (Gitlab) => FAIL: They don't include plugin version 5. Apply this patch 6. Repeat 2-4 => SUCCESS: Results show up => SUCCESS: Results include the plugin version 7. Sign off :-D Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Maybe GitHub API changed. ByWater and PTFS both are on GitHub while Theke's is on Gitlab. Pushed to master for 22.05, thanks to everybody involved [U+1F984] Pushed to 21.11.x for 21.11.05 not backported to 21.05 |