Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-26191

Inconsistent API and frontend validation for maintenance period "every" field

XMLWordPrintable

    • Sprint candidates

      Using just API, "every" field in maintenance.create or maintenance.update can range from 1 to 2147483647. The define used in API validation is ZBX_MAX_INT32. It's not even ZBX_MAX_DATE which would be more accurate. This number is just too large to comprehend. It's more than 400K centuries. Also for API it doesn't matter if it's a daily or weekly maintenance.

      However in frontend maximum values for "every" field are hard-coded numbers like 99 or 999 depending on whether it is a daily or weekly maintenance. 999 days is ~1.9 years, but 99 weeks is ~2.7 years. So the difference here is also quite significant.

      Creating a maintenance period of every 1000 days cannot be updated in frontend. Though it can be opened and changed, at least.

      We shouldn't limit the user too much, but also shouldn't grant too much freedom entering any value withing the range 1-2147483647. That's too much. We should create more reasonable constants for time periods and synchronize the API and frontend validation.

            zabbix.dev Zabbix Development Team
            iivs Ivo Kurzemnieks
            Team C
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: