[Koha-bugs] [Bug 29008] Warning when checking Koha version in plugins

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Sep 14 11:17:51 CEST 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29008

Fridolin Somers <fridolin.somers at biblibre.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #124858|0                           |1
        is obsolete|                            |

--- Comment #20 from Fridolin Somers <fridolin.somers at biblibre.com> ---
Created attachment 140615
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140615&action=edit
Bug 29008: Avoid warning when checking Koha version in plugins

In Koha plugins home page, each plugin min/max version is compared with actual
Koha version.

This uses metadatas assuming there are numbers, like 18.11 or 20.1100000.

But source code version is actually YY.MM.XX.YYY.ZZZ.
We sometimes find it in plugins, for examle :
https://github.com/thekesolutions/koha-plugin-bibliocommons/blob/c2da98f1bda450452ad687e5623f45939a967bdf/Koha/Plugin/Com/Theke/BiblioCommons.pm#L31
https://github.com/KohaSuomi/koha-plugin-sms-send-link-mobility-driver/blob/master/Koha/Plugin/Fi/KohaSuomi/SMSSendLinkMobilityDriver.pm#L22

This generates warning :
Argument "18.11.01" isn't numeric in numeric lt (<) at
/home/koha/src/Koha/Plugins/Base.pm line 377.: src/plugins/plugins-home.pl

We should allow this syntax in plugins metadatas.

Test plan :
1) Install a Koha plugin with minimum_version containing 3 dots :
   for example 18.11.01.001
2) Go to plugins home page
3) Check there is no warning
4) Install a plugin with minimum_version higher than current Koha version
5) Check in plugins table the warning appears
6) Install a plugin with maximum_version lower than current Koha version
7) Check in plugins table the warning appears

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list