Bug 29787: Add plugin version to plugin search results
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 10 Jan 2022 12:03:26 +0000 (09:03 -0300)
committerKyle Hall <kyle@bywatersolutions.com>
Fri, 15 Apr 2022 10:36:54 +0000 (06:36 -0400)
commit184d2099d2848a0d1c1178824630bfb9e06f63eb
tree5b4f9843274d7b472b94eb93a6add0ed7ea833d0
parentc8fc9d0064ebd376fa740afc281d6431c4f72ffc
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>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt
plugins/plugins-home.pl