Details

Type: Incident report

Status: Closed

Priority: Minor

Resolution: Fixed

Affects Version/s: 2.0.11rc2

Component/s: Frontend (F)

Labels:
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
 is duplicated by

ZBX7992 Undefined Index CGraph>validateItems() in /usr/share/zabbix/api/classes/CGraph.php:731 error on graph configuration
 Closed
Activity
Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX7809
(1) In CGraph.php:729732, 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
(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
(3) Fixed value should be removed, if changed type
Eduards Samersovs RESOLVED r.42866
Oleg Egorov CLOSED
(4) Remove graph items > Save > Graph updated
Without any error, and changes not saved in DB
Eduards Samersovs RESOLVED r.42879
Oleg Egorov CLOSED
(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
(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
(7) Function "formatValueByScale" should be documented
Eduards Samersovs This function is removed r.43092
Oleg Egorov CLOSED
(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
(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
(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
(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 ZBX7957. CLOSED
(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
(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
(14) Fatal/Blocker errors should be displayed as error, not info in validate.inc.php
Eduards Samersovs RESOLVED r.43686
Oleg Egorov CLOSED
(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
(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
(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
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;
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 testdriven development will finally happen
(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
(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
(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
TESTED
Fixed in versions 2.3.0 (trunk) r.44133, 2.2.4rc1 r.44132
(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/ZBX7809
Pavels Jelisejevs Please list all of the translatable strings that have been changed in this fix.
Eduards Samersovs Already done in (19)
(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
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.
Fixed in versions 2.3.0 (trunk) r.44504, 2.2.4rc1 r.44503
@2.2: When deleting such items an incorrect error occurred: