When you search for a plugin it doesn't tell which version it is going to install. Additionally, it would be great if instead of just an 'install' button, they mutated to 'upgrade' or 'reinstall' if that applies. Otherwise you don't know what's going on.
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