Closed ddb4github closed 5 years ago
That is because the version is stored as a text field within the database. There is a calculation that gets used in 1.3 to have better version comparision. We could potentially store that calculated result to ensure fields are sorted as expected but that would be a full enhancement rather than a bug fix.
Just test, 'ORDER BY INET_ATON(version)' is workable
mysql>SELECT id, directory, name, version FROM plugin_config ORDER BY INET_ATON(version);
+----+---------------+--------------------------------+---------+
| id | directory | name | version |
+----+---------------+--------------------------------+---------+
| 13 | webseer | Web Service Monitor | 0.3.0.0 |
| 2 | audit | Audit Plugin for Cacti | 1.0 |
| 42 | wmi | WMI Information Collector | 1.0 |
| 35 | reportit | Reporting tool for Cacti | 1.1.3 |
| 6 | thold | Thresholds | 1.3.2 |
| 5 | gexport | Graph Export Package for Cacti | 1.4.2 |
| 12 | routerconfigs | Router Configs | 1.5.1 |
| 10 | mikrotik | MikroTik Switch Tool | 2.3 |
| 38 | syslog | Syslog Monitoring | 2.4 |
| 14 | monitor | Device Monitoring | 2.3.6 |
| 4 | flowview | FlowView | 3.0.0 |
| 8 | hmib | Host MIB Tool | 3.1 |
| 1 | cycle | Cycle Graphs | 4.2 |
| 3 | mactrack | Device Tracking | 4.4 |
| 43 | maint | Maintenance Scheduler | 10.2 |
+----+---------------+--------------------------------+---------+
Well Jing, you've been playing. ;)
I like that! A new one to me but it appears to work, presumably because it's converting it like an IP address.
This should now be resolved, thanks @ddb4github
Describe the bug Console --> Plugins sort by version fail if version is two digit number: 1.5.1 < 10.2 < 2.3
To Reproduce Steps to reproduce the behavior:
Expected behavior 10.2 should bigger than 4.4
Screenshots