ZABBIX BUGS AND ISSUES
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-7809

Changing Y min/max value from 'item' to other type does not reset the corresponding database fields to null

    Details

      Description

      Steps:
      1) Create a graph with Y axis MIN value set to an item.
      2) Then change the Y axis MIN value to 'calculated'

      Result:
      The corresponding graphs.ymin_itemid field still has the old itemid value.

      Expected result:
      The corresponding graphs.ymin_itemid field must be set to null.

        Issue Links

          Activity

          Hide
          Alexander Vladishev added a comment - - edited

          @2.2: When deleting such items an incorrect error occurred:

          ERROR: Cannot delete item
          No permissions to referred object or it does not exist!
          Show
          Alexander Vladishev added a comment - - edited @2.2: When deleting such items an incorrect error occurred: ERROR: Cannot delete item No permissions to referred object or it does not exist!
          Hide
          Eduards Samersovs (Inactive) added a comment -

          Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-7809

          Show
          Eduards Samersovs (Inactive) added a comment - Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-7809
          Hide
          Oleg Egorov added a comment - - edited

          (1) In CGraph.php:729-732, used construction $field.'_itemid'
          Please use full names

          Eduards Samersovs RESOLVED r.42805

          Oleg Egorov This construction still exist

          Eduards Samersovs RESOLVED r.42848

          Oleg Egorov CLOSED

          Show
          Oleg Egorov added a comment - - edited (1) In CGraph.php:729-732, used construction $field.'_itemid' Please use full names Eduards Samersovs RESOLVED r.42805 Oleg Egorov This construction still exist Eduards Samersovs RESOLVED r.42848 Oleg Egorov CLOSED
          Hide
          Oleg Egorov added a comment - - edited

          (2) Open graph, change Y axis MIN value to fixed and set "-", then again change Y axis MIN value to item and set any correct item.
          -> Save
          -> Result: Field "yaxismin" is not decimal number.

          Eduards Samersovs RESOLVED r.42866

          Oleg Egorov CLOSED

          Show
          Oleg Egorov added a comment - - edited (2) Open graph, change Y axis MIN value to fixed and set "-", then again change Y axis MIN value to item and set any correct item. -> Save -> Result: Field "yaxismin" is not decimal number. Eduards Samersovs RESOLVED r.42866 Oleg Egorov CLOSED
          Hide
          Oleg Egorov added a comment - - edited

          (3) Fixed value should be removed, if changed type

          Eduards Samersovs RESOLVED r.42866

          Oleg Egorov CLOSED

          Show
          Oleg Egorov added a comment - - edited (3) Fixed value should be removed, if changed type Eduards Samersovs RESOLVED r.42866 Oleg Egorov CLOSED
          Hide
          Oleg Egorov added a comment - - edited

          (4) Remove graph items -> Save -> Graph updated
          Without any error, and changes not saved in DB

          Eduards Samersovs RESOLVED r.42879

          Oleg Egorov CLOSED

          Show
          Oleg Egorov added a comment - - edited (4) Remove graph items -> Save -> Graph updated Without any error, and changes not saved in DB Eduards Samersovs RESOLVED r.42879 Oleg Egorov CLOSED
          Hide
          Oleg Egorov added a comment - - edited

          Please revert css and style changes

          Eduards Samersovs RESOLVED r.42984

          Oleg Egorov CLOSED

          Show
          Oleg Egorov added a comment - - edited Please revert css and style changes Eduards Samersovs RESOLVED r.42984 Oleg Egorov CLOSED
          Hide
          Oleg Egorov added a comment - - edited

          (5) In graph edit, fixed value is 0.0000 and 100.0000, but should be 0 and 100

          Eduards Samersovs RESOLVED r.43002

          Oleg Egorov CLOSED

          Show
          Oleg Egorov added a comment - - edited (5) In graph edit, fixed value is 0.0000 and 100.0000, but should be 0 and 100 Eduards Samersovs RESOLVED r.43002 Oleg Egorov CLOSED
          Hide
          Oleg Egorov added a comment - - edited

          (6) Select fixed Y max, for example, and it should be empty, press save.
          Field "yaxismax" is mandatory.
          And field again is not empty

          Oleg Egorov CLOSED

          Show
          Oleg Egorov added a comment - - edited (6) Select fixed Y max, for example, and it should be empty, press save. Field "yaxismax" is mandatory. And field again is not empty Oleg Egorov CLOSED
          Hide
          Oleg Egorov added a comment - - edited

          (7) Function "formatValueByScale" should be documented

          Eduards Samersovs This function is removed r.43092

          Oleg Egorov CLOSED

          Show
          Oleg Egorov added a comment - - edited (7) Function "formatValueByScale" should be documented Eduards Samersovs This function is removed r.43092 Oleg Egorov CLOSED
          Hide
          Oleg Egorov added a comment - - edited

          (8) Now in fixed Y min/max impossible add large values,
          9999999999999999->1.0E+16

          In 2.2 was ok

          Eduards Samersovs RESOLVED r.43092

          Oleg Egorov CLOSED

          Show
          Oleg Egorov added a comment - - edited (8) Now in fixed Y min/max impossible add large values, 9999999999999999->1.0E+16 In 2.2 was ok Eduards Samersovs RESOLVED r.43092 Oleg Egorov CLOSED
          Hide
          Oleg Egorov added a comment - - edited

          (9) After saving with error, reset incorrect value to 0, or other value
          For example, Fixed Y axis MIN value:
          2,5->2
          a->0

          Eduards Samersovs RESOLVED r.43092,r.43096

          Oleg Egorov CLOSED

          Show
          Oleg Egorov added a comment - - edited (9) After saving with error, reset incorrect value to 0, or other value For example, Fixed Y axis MIN value: 2,5->2 a->0 Eduards Samersovs RESOLVED r.43092,r.43096 Oleg Egorov CLOSED
          Hide
          Oleg Egorov added a comment - - edited

          (10) Incorrect floating part of numeric value "0.00000".
          Better write max number count after dot

          Incorrect number part of numeric value "9999999999999999999999999999".
          Why it is incorrect?

          Please add more details in error messages

          Eduards Samersovs RESOLVED r.43686

          Oleg Egorov CLOSED

          Show
          Oleg Egorov added a comment - - edited (10) Incorrect floating part of numeric value "0.00000". Better write max number count after dot Incorrect number part of numeric value "9999999999999999999999999999". Why it is incorrect? Please add more details in error messages Eduards Samersovs RESOLVED r.43686 Oleg Egorov CLOSED
          Hide
          Oleg Egorov added a comment - - edited

          (11) "Y axis MIN value" set Fixed and value 18+
          Then press "Preview".

          This will result in endless process with high CPU usage.

          Eduards Samersovs Cannot reproduce

          Oleg Egorov Will be fixed in ZBX-7957. CLOSED

          Show
          Oleg Egorov added a comment - - edited (11) "Y axis MIN value" set Fixed and value 18+ Then press "Preview". This will result in endless process with high CPU usage. Eduards Samersovs Cannot reproduce Oleg Egorov Will be fixed in ZBX-7957 . CLOSED
          Hide
          Oleg Egorov added a comment - - edited

          (12) New validation is OK, but in the same form somewhere it is, somewhere isn't...
          Float fields:

          • Percentile line (left)
          • Percentile line (right)

          Eduards Samersovs RESOLVED r.43692

          Oleg Egorov CLOSED

          Show
          Oleg Egorov added a comment - - edited (12) New validation is OK, but in the same form somewhere it is, somewhere isn't... Float fields: Percentile line (left) Percentile line (right) Eduards Samersovs RESOLVED r.43692 Oleg Egorov CLOSED
          Hide
          Oleg Egorov added a comment - - edited

          (13) For T_ZBX_DBL exist first part validation, and for T_ZBX_BIG_DBL not exist.
          First part error can reproduce with number:
          .9

          Eduards Samersovs RESOLVED r.43686

          Oleg Egorov CLOSED

          Show
          Oleg Egorov added a comment - - edited (13) For T_ZBX_DBL exist first part validation, and for T_ZBX_BIG_DBL not exist. First part error can reproduce with number: .9 Eduards Samersovs RESOLVED r.43686 Oleg Egorov CLOSED
          Hide
          Oleg Egorov added a comment - - edited

          (14) Fatal/Blocker errors should be displayed as error, not info in validate.inc.php

          Eduards Samersovs RESOLVED r.43686

          Oleg Egorov CLOSED

          Show
          Oleg Egorov added a comment - - edited (14) Fatal/Blocker errors should be displayed as error, not info in validate.inc.php Eduards Samersovs RESOLVED r.43686 Oleg Egorov CLOSED
          Hide
          Oleg Egorov added a comment - - edited

          (15) Big code duplication in validate.inc.php

          Eduards Samersovs RESOLVED r.43686

          Oleg Egorov CLOSED

          Show
          Oleg Egorov added a comment - - edited (15) Big code duplication in validate.inc.php Eduards Samersovs RESOLVED r.43686 Oleg Egorov CLOSED
          Hide
          Oleg Egorov added a comment - - edited

          (16) In defines.inc.php added new type - T_ZBX_BIG_DBL with value 3, but this type was used before for T_ZBX_PERIOD. This changes should be reverted and T_ZBX_BIG_DBL please change from 3 to 9

          Eduards Samersovs RESOLVED r.43686

          Oleg Egorov CLOSED

          Show
          Oleg Egorov added a comment - - edited (16) In defines.inc.php added new type - T_ZBX_BIG_DBL with value 3, but this type was used before for T_ZBX_PERIOD. This changes should be reverted and T_ZBX_BIG_DBL please change from 3 to 9 Eduards Samersovs RESOLVED r.43686 Oleg Egorov CLOSED
          Hide
          Pavels Jelisejevs (Inactive) added a comment - - edited

          (17) Some CNumericValidator validator issues:

          1. let's rename it to CDecimalValidator, since it's meant specifically for decimal numbers;
          2. before trying to explode the decimal value, it should validate if it's a valid decimal number;
          3. it recognizes "10e+1" as a valid decimal number.
          4. the "scaleBeforePoint" and "scaleAfterPoint" option names are a bit incorrect. Since it's a decimal validator, I suggest we go with the common approach of defining decimal numbers using "precision" and "scale": precision is the total digit count in a number and scale - the digit count after the decimal point (e.g. 12.324 has a precision of 5 and a scale of 3). The options can then be called "maxPrecision" and "maxScale" - much clearer.

          Eduards Samersovs RESOLVED r.43686

          Oleg Egorov CLOSED

          Show
          Pavels Jelisejevs (Inactive) added a comment - - edited (17) Some CNumericValidator validator issues: let's rename it to CDecimalValidator, since it's meant specifically for decimal numbers; before trying to explode the decimal value, it should validate if it's a valid decimal number; it recognizes "10e+1" as a valid decimal number. the "scaleBeforePoint" and "scaleAfterPoint" option names are a bit incorrect. Since it's a decimal validator, I suggest we go with the common approach of defining decimal numbers using "precision" and "scale": precision is the total digit count in a number and scale - the digit count after the decimal point (e.g. 12.324 has a precision of 5 and a scale of 3). The options can then be called "maxPrecision" and "maxScale" - much clearer. Eduards Samersovs RESOLVED r.43686 Oleg Egorov CLOSED
          Hide
          Pavels Jelisejevs (Inactive) added a comment - - edited

          (18) The error messages are incorrect, I suggest to change them to:

          • Value "value" of "field" is too long: the maximum length is %maxLength% digits. (note that this message talks about the total length of the decimal number, see (17.4))
          • Value "value" of "field" has too many digits after the decimal point: it cannot have more then "%maxScale%" digits.

          Eduards Samersovs RESOLVED r.43686

          Oleg Egorov CLOSED

          Show
          Pavels Jelisejevs (Inactive) added a comment - - edited (18) The error messages are incorrect, I suggest to change them to: Value "value" of "field" is too long: the maximum length is %maxLength% digits. (note that this message talks about the total length of the decimal number, see (17.4)) Value "value" of "field" has too many digits after the decimal point: it cannot have more then "%maxScale%" digits. Eduards Samersovs RESOLVED r.43686 Oleg Egorov CLOSED
          Hide
          Alexey Pustovalov added a comment -

          Just for a note, it can call the next error with queries:

          [Z3005] query failed: [1451] Cannot delete or update a parent row: a foreign key constraint fails (`zabbix`.`graphs`, CONSTRAINT `c_graphs_3` FOREIGN KEY (`ymax_itemid`) REFERENCES `items` (`itemid`)) [delete \ 
          from screens_items where resourcetype in (3,1) and resourceid=471004; 
          delete from profiles where idx='web.favorite.graphids' and source='itemid' and value_id=471004; 
          delete from items where itemid=471004; 
          
          Show
          Alexey Pustovalov added a comment - Just for a note, it can call the next error with queries: [Z3005] query failed: [1451] Cannot delete or update a parent row: a foreign key constraint fails (`zabbix`.`graphs`, CONSTRAINT `c_graphs_3` FOREIGN KEY (`ymax_itemid`) REFERENCES `items` (`itemid`)) [delete \ from screens_items where resourcetype in (3,1) and resourceid=471004; delete from profiles where idx='web.favorite.graphids' and source='itemid' and value_id=471004; delete from items where itemid=471004;
          Hide
          richlv added a comment - - edited

          just another note on some topics we all know about...

          a) "In graph edit, fixed value is 0.0000 and 100.0000, but should be 0 and 100" - how do you know ?
          maybe decimal part should be there to let users know that they can use it ? =)
          what i mean, we REALLY lack basic documents on how things should operate (like "clicking on x should open y and default value should be 'foo'"

          Oleg Egorov Was discussed.

          b) looking at all the subissues i have to wonder how much time we will waste on fixing things over and over again before test-driven development will finally happen

          Show
          richlv added a comment - - edited just another note on some topics we all know about... a) "In graph edit, fixed value is 0.0000 and 100.0000, but should be 0 and 100" - how do you know ? maybe decimal part should be there to let users know that they can use it ? =) what i mean, we REALLY lack basic documents on how things should operate (like "clicking on x should open y and default value should be 'foo'" Oleg Egorov Was discussed. b) looking at all the subissues i have to wonder how much time we will waste on fixing things over and over again before test-driven development will finally happen
          Hide
          richlv added a comment - - edited

          (19) this issue has been set to "resolved", but nothing has been added regarding potentially changed translatable srtings

          2.2 new strings:

          • Value "%1$s" of "%2$s" has incorrect decimal format.
          • Value "%1$s" of "%2$s" is too long: it cannot have more than %3$s digits before the decimal point and more than %4$s digits after the decimal point.
          • Value "%1$s" of "%2$s" has too many digits before the decimal point: it cannot have more than %3$s digits.
          • Value "%1$s" of "%2$s" has too many digits after the decimal point: it cannot have more than %3$s digits.

          <richlv> "then" has been used in place of "than"

          Eduards Samersovs RESOLVED r.43742

          Oleg Egorov CLOSED

          Show
          richlv added a comment - - edited (19) this issue has been set to "resolved", but nothing has been added regarding potentially changed translatable srtings 2.2 new strings: Value "%1$s" of "%2$s" has incorrect decimal format. Value "%1$s" of "%2$s" is too long: it cannot have more than %3$s digits before the decimal point and more than %4$s digits after the decimal point. Value "%1$s" of "%2$s" has too many digits before the decimal point: it cannot have more than %3$s digits. Value "%1$s" of "%2$s" has too many digits after the decimal point: it cannot have more than %3$s digits. <richlv> "then" has been used in place of "than" Eduards Samersovs RESOLVED r.43742 Oleg Egorov CLOSED
          Hide
          Oleg Egorov added a comment - - edited

          (20) Y axis MIN value fixed: 99999999999999999 (17 digits)

          Go yo preview.
          Error: Page received incorrect data
          Value "99999999999999999" of "yaxismin" is too long: the maximum length is 16 digits.

          OK, go back and set 9999999999999999 (16 digits)
          Then again back to preview

          Error: Page received incorrect data
          Value "99999999999999999" of "yaxismin" is too long: the maximum length is 12 digits.

          16 -> 12...

          Eduards Samersovs RESOLVED r.43754

          Oleg Egorov CLOSED

          Show
          Oleg Egorov added a comment - - edited (20) Y axis MIN value fixed: 99999999999999999 (17 digits) Go yo preview. Error: Page received incorrect data Value "99999999999999999" of "yaxismin" is too long: the maximum length is 16 digits. OK, go back and set 9999999999999999 (16 digits) Then again back to preview Error: Page received incorrect data Value "99999999999999999" of "yaxismin" is too long: the maximum length is 12 digits. 16 -> 12... Eduards Samersovs RESOLVED r.43754 Oleg Egorov CLOSED
          Hide
          Oleg Egorov added a comment - - edited

          (21) Create new graph
          Y axis MIN value: Fixed: 9999999999999999
          Y axis MAX value: Fixed

          Error message:
          Value "9999999999999999" of "yaxismin" has too many digits before the decimal point: it cannot have more than 12 digits.

          But I don't press on "Save" button.

          Oleg Egorov CLOSED

          Show
          Oleg Egorov added a comment - - edited (21) Create new graph Y axis MIN value: Fixed: 9999999999999999 Y axis MAX value: Fixed Error message: Value "9999999999999999" of "yaxismin" has too many digits before the decimal point: it cannot have more than 12 digits. But I don't press on "Save" button. Oleg Egorov CLOSED
          Hide
          Oleg Egorov added a comment -

          TESTED

          Show
          Oleg Egorov added a comment - TESTED
          Hide
          Eduards Samersovs (Inactive) added a comment -

          Fixed in versions 2.3.0 (trunk) r.44133, 2.2.4rc1 r.44132

          Show
          Eduards Samersovs (Inactive) added a comment - Fixed in versions 2.3.0 (trunk) r.44133, 2.2.4rc1 r.44132
          Hide
          Pavels Jelisejevs (Inactive) added a comment - - edited

          (22) Instead of implementing CDecimalValidator::$label you should use CDecimalValidator::setObjectName().

          Eduards Samersovs RESOLVED r.44423 in development branch svn://svn.zabbix.com/branches/dev/ZBX-7809

          Pavels Jelisejevs Please list all of the translatable strings that have been changed in this fix.

          Eduards Samersovs Already done in (19)

          Show
          Pavels Jelisejevs (Inactive) added a comment - - edited (22) Instead of implementing CDecimalValidator::$label you should use CDecimalValidator::setObjectName(). Eduards Samersovs RESOLVED r.44423 in development branch svn://svn.zabbix.com/branches/dev/ZBX-7809 Pavels Jelisejevs Please list all of the translatable strings that have been changed in this fix. Eduards Samersovs Already done in (19)
          Hide
          Pavels Jelisejevs (Inactive) added a comment - - edited

          (23) The API changelog has not been updated.

          Eduards Samersovs RESOLVED in https://www.zabbix.com/documentation/2.2/manual/api/changes_2.2?&#graph

          Show
          Pavels Jelisejevs (Inactive) added a comment - - edited (23) The API changelog has not been updated. Eduards Samersovs RESOLVED in https://www.zabbix.com/documentation/2.2/manual/api/changes_2.2?&#graph
          Hide
          Pavels Jelisejevs (Inactive) added a comment -

          The fix is ok, but the dev branch has been created for trunk, while the problem also needs to be fixed in 2.2. Don't forget to fix it there.

          Also, close (22) before merging.

          TESTED.

          Show
          Pavels Jelisejevs (Inactive) added a comment - The fix is ok, but the dev branch has been created for trunk, while the problem also needs to be fixed in 2.2. Don't forget to fix it there. Also, close (22) before merging. TESTED.
          Hide
          Eduards Samersovs (Inactive) added a comment -

          Fixed in versions 2.3.0 (trunk) r.44504, 2.2.4rc1 r.44503

          Show
          Eduards Samersovs (Inactive) added a comment - Fixed in versions 2.3.0 (trunk) r.44504, 2.2.4rc1 r.44503
          Hide
          richlv added a comment -

          this has resulted in a regression : ZBX-8727

          Show
          richlv added a comment - this has resulted in a regression : ZBX-8727

            People

            • Assignee:
              Unassigned
              Reporter:
              Andris Zeila
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved: