[ZBX-8509] Item edit form field "Use custom multiplier" value gets deleted on type change Created: 2014 Jul 22  Updated: 2017 May 30  Resolved: 2014 Aug 01

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 2.3.3
Fix Version/s: 2.3.4

Type: Incident report Priority: Minor
Reporter: Ivo Kurzemnieks Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: forms, items
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Steps to reproduce:
1) Create an item of any type and save it. For example "Zabbix agent".
2) Edit item and change type and save it again. For example change "Zabbix agent" to For example "Zabbix agent (active)".
3) Open item again and observe missing value from disabled field "Use custom multiplier".

It is possible to save the item, but the problem is:
if the item is made in template and template is linked to a host, then the templated item cannot be edited and will result with error: 'Value "" of "Custom multiplier" has incorrect decimal format.'



 Comments   
Comment by Krists Krigers (Inactive) [ 2014 Jul 23 ]

RESOLVED in r47556, branch svn://svn.zabbix.com/branches/dev/ZBX-8509.

Comment by Ivo Kurzemnieks [ 2014 Jul 24 ]

(1) Coding style:

if (hasRequest('formula')) {
	$_REQUEST['multiplier'] = 1;
}
if (getRequest('formula', null) === '0') {
	$_REQUEST['multiplier'] = 0;
	$_REQUEST['formula'] = '1';
}
  1. Please avoid modifying superglobal variables.
  2. Re-factor the code so it doesn't overwrite variables multiple times. In this case multiplier is re-written twice on hasRequest() and getRequest().

REOPENED.

kristsk RESOLVED in r47609.

iivs CLOSED.

Comment by Ivo Kurzemnieks [ 2014 Jul 30 ]

Massupdate form saves multiple zeros: moved to ZBX-8554

Comment by Ivo Kurzemnieks [ 2014 Jul 30 ]

TESTED.

Comment by Krists Krigers (Inactive) [ 2014 Jul 31 ]

Issue fixed, merged and committed to 2.3.3 (trunk) in r47691.

Comment by Alexander Vladishev [ 2014 Jul 31 ]

(2) the same issue should be fixed with item prototypes

kristsk RESOLVED in r47736, branch svn://svn.zabbix.com/branches/dev/ZBX-8509.

sasha CLOSED

Comment by Krists Krigers (Inactive) [ 2014 Aug 20 ]

Fixed and merged to 2.3.4 (trunk) in r48244.

Generated at Tue Apr 23 21:55:30 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.