NatLibFi / koha-plugin-rest-di

REST API plugin for Koha to provide additional functionality for discovery interfaces such as VuFind
GNU General Public License v3.0
9 stars 9 forks source link

Version must be a number #36

Open fridobox opened 4 weeks ago

fridobox commented 4 weeks ago

https://github.com/NatLibFi/koha-plugin-rest-di/blob/6c32574a6ec14a68859e805fba35a1d54988cf1b/Koha/Plugin/Fi/KohaSuomi/DI.pm#L29

Version compare use numeric operator so version min and max must be a number (with decimal). Otherwise it generates a warning in Perl logs. For example 23.06.00.054 => 23.0600054

EreMaijala commented 4 weeks ago

@fridobox Thanks for reporting the issue. I'm having trouble finding anything that documents this, though, including the plugin development reference. And all the plugins I checked also use strings. Can you provide further guidance?

fridobox commented 4 weeks ago

Here you can see code doing version compare: https://git.koha-community.org/Koha-community/Koha/src/commit/0ff70e0b0ca35a2c91fe4e971a911002ee7241c7/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt#L180

I tried to fix with https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29008 but not yet finished

This is a minor issue ;)

EreMaijala commented 4 weeks ago

I can see the code alright, but to me it seems rather more like a Koha bug, and plugins are just following the documented way of doing it. If all plugins are using strings (including the Kitchen Sink), surely it'll be better to just get bug 29008 done, right? Thanks for working on it!