[ZBX-8901] "Item Custom Multiplier has incorrect decimal format" Created: 2014 Oct 14  Updated: 2017 May 30  Resolved: 2014 Oct 20

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

Type: Incident report Priority: Major
Reporter: Brad Turnbough Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: validation
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

CentOS 6.4 x64 (fully patched)
Zabbix 2.4.1 (everything from repo.zabbix.com)


Attachments: PNG File zabbix-2.4.1-bug.png    

 Description   

Create a Template with an autodiscovery rule. Create items off of that auto discovery rule. One of these items must be a decimal datatype. Multiply that value by .01 in the item configuration.



 Comments   
Comment by richlv [ 2014 Oct 14 ]

try 0.01 - but we should eventually support omitting the leading zero everywhere (including trigger expressions)

Comment by Brad Turnbough [ 2014 Oct 14 ]

0.01 works. Thanks for the tip. I have lots and lots of custom multipliers without the leading zero's in my production database. Will my upgraded database work properly due to this behavior?

Comment by Aleksandrs Saveljevs [ 2014 Oct 14 ]

A similar issue was fixed for regular items in ZBX-8727 in Zabbix 2.4.1. This issue is only concerned with item prototypes.

Comment by Aleksandrs Saveljevs [ 2014 Oct 14 ]

Brad, yes, ".01" will work perfectly fine on the server.

Comment by Arvids Godjuks (Inactive) [ 2014 Oct 20 ]

Fixed in development branch https://support.zabbix.com/browse/ZBX-8901

Comment by Arvids Godjuks (Inactive) [ 2014 Oct 20 ]

(1) No translation changes

jelisejev CLOSED.

Comment by Pavels Jelisejevs (Inactive) [ 2014 Oct 21 ]

TESTED.

Comment by Alexander Vladishev [ 2014 Oct 28 ]

(2) Validation rules for "formula" field is different for regular items and item prototypes.

disc_prototypes.php

'formula' => array(T_ZBX_DBL_STR, O_OPT, null, NOT_ZERO                                                       , '(isset({add}) || isset({update})) && isset({multiplier}) && ({multiplier} == 1) && '.IN('0,3','value_type'), _('Custom multiplier'))

items.php

'formula' => array(T_ZBX_DBL_STR, O_OPT, null, '({value_type} == 0 && {} != 0)||({value_type} == 3 && {} > 0)', '(isset({add}) || isset({update})) && isset({multiplier}) && {multiplier} == 1', _('Custom multiplier'))

arvids.godjuks RESOLVED in r50257

sasha CLOSED

Comment by Alexander Vladishev [ 2014 Oct 29 ]

(3) Please review my changes in r50262 before a merge.

arvids.godjuks CLOSED

Comment by Arvids Godjuks (Inactive) [ 2014 Oct 29 ]

Fixed in pre-2.4.2 r50275 and pre-2.5.0 (trunk) r50274

Generated at Fri Apr 19 02:49:56 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.