[ZBX-8727] cannot create scientific notation multiplier Created: 2014 Sep 08  Updated: 2017 May 30  Resolved: 2014 Oct 13

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 2.2.6
Fix Version/s: 2.2.7rc1, 2.4.1rc1, 2.5.0

Type: Incident report Priority: Major
Reporter: Sergey Korobeiko Assignee: Unassigned
Resolution: Fixed Votes: 1
Labels: regression, validation
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

String from documentation: Starting with Zabbix 2.2, using scientific notation is also supported. E.g. 1e+70.
I'd like create custom multiplier 1e+10 and i have error: Value "1e+10" of "Custom multiplier" has incorrect decimal format.
Earlier I used multiplier like 0.000001, now I cannot edit those items, and i changed 'maxScale' to 6 in include/validate.inc.php.



 Comments   
Comment by richlv [ 2014 Sep 09 ]

confirming. in trunk seems to be broken by :

------------------------------------------------------------------------
r44133 | eduards | 2014-04-07 14:05:14 +0300 (Mon, 07 Apr 2014) | 2 lines

..F....... ZBX-7809 improved validation on decimal values
..F....... ZBX-7809 fixed unused graph Y axis min/max fields unseting from db
------------------------------------------------------------------------

Comment by Krists Krigers (Inactive) [ 2014 Sep 09 ]

Fixed and committed in r48898, branch svn://svn.zabbix.com/branches/dev/ZBX-8727 (copy of trunk).

Comment by Oleg Egorov (Inactive) [ 2014 Sep 11 ]

(1) String changes?

kristsk No string changes. RESOLVED.

oleg.egorov CLOSED

Comment by Oleg Egorov (Inactive) [ 2014 Sep 18 ]

(2)

	public function validate($value) {
		if (is_scalar($value)) {
			$isValid = $this->validateCommon($value)
				|| $this->validateDotNotation($value)
				|| $this->validateScientificNotation($value);
		}
		else {
			$isValid = false;
		}

		if (!$isValid) {
			$this->error($this->messageInvalid, $this->stringify($value));
		}

		return $isValid;
	}

Please simplify function

kristsk RESOLVED in r49167.

oleg.egorov CLOSED

Comment by Oleg Egorov (Inactive) [ 2014 Sep 19 ]

TESTED

Comment by Oleg Egorov (Inactive) [ 2014 Sep 23 ]

(3) In 2.2 svn://svn.zabbix.com/branches/dev/ZBX-8727-22
Use custom multiplier 1.e

Fatal error: Call to undefined method CDecimalStringValidator::stringify() in C:\xampp\htdocs\ZBX-8727-22\frontends\php\include\classes\validators\CDecimalStringValidator.php on line 51

kristsk RESOLVED in r49234.

oleg.egorov CLOSED

Comment by Krists Krigers (Inactive) [ 2014 Sep 24 ]

Fixed and merged to:

  • 2.2.7rc1 in r49299,
  • 2.4.1rc1 in r49303,
  • 2.5.0 (trunk) in r49305.
Comment by Alexander Vladishev [ 2014 Sep 25 ]

(4) Broken ChangeLog in branches/2.2

kristsk RESOLVED in r49338, branches/2.2.

sasha REOPENED It is not solved

kristsk RESOLVED in r49340, branches/2.2.

sasha CLOSED

Comment by Alexander Vladishev [ 2014 Sep 25 ]

(5) Please do not change 2.5.0 ChangeLog entries if fix also was applied to the 2.4.x

kristsk RESOLVED in r49339, trunk.

sasha CLOSED

Comment by Pavels Jelisejevs (Inactive) [ 2014 Sep 25 ]

I've added some more test cases in the /trunk r49341.

Comment by Alexander Vladishev [ 2014 Oct 10 ]

(6) branches/2.2 Fatal error occurs while saving invalid multiplier

Fatal error: Call to undefined method CDecimalStringValidator::stringify() in include/classes/validators/CDecimalStringValidator.php on line 51

not reproducible in 2.4 and trunk

kristsk RESOLVED in r49799, new branch svn://svn.zabbix.com/branches/dev/ZBX-8727 (copy of branches/2.2).

sasha CLOSED

Comment by Krists Krigers (Inactive) [ 2014 Oct 13 ]

Fixed and merged to 2.2.7rc1 in r49805.

Generated at Sat Apr 27 01:50:16 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.