[ZBX-4336] Error not cleared when changing item status to active in frontend. Created: 2011 Nov 09  Updated: 2017 May 30  Resolved: 2012 Apr 10

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 1.9.8 (beta)
Fix Version/s: 1.9.9 (beta), 2.0.0

Type: Incident report Priority: Blocker
Reporter: dimir Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: items, unsupported
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

MySQL 5.1, Debian GNU/Linux.



 Description   

2 ways of changing item status from "not supported" to "active" out of 4 are not working properly. Not working properly meaning here not clearing the error message so on the right of the item an "error" icon is left.

Not working ways:

  • changing status from item edit form
  • changing status using "Mass update" (and then "Status" -> "Active") from the drop-down in items list

Working ways

  • clicking status in items list
  • changing status using "Activate selected" from the drop-down in items list


 Comments   
Comment by Vjacheslav Shipillo (Inactive) [ 2011 Dec 01 ]

fixed problem with item status clearing when changing to active in front-end.

Comment by richlv [ 2011 Dec 01 ]

(1) i believe spacing at the end of line for this changed block does not conform to the coding style anymore :

+ $sql = 'SELECT itemid,interfaceid,name,key_,error, hostid,delay,history,status,type,' .
<Vedmak> ye, coding style is not correct at some places.
<SlaVa>RESOLVED

<Vedmak> btw, why this sql was changed? We should not allow user change 'error' field anyhow, it's done only by server.
<SlaVa>RESOLVED
<Vedmak> CLOSED

Comment by Alexey Fukalov [ 2011 Dec 02 ]

(2) [GUI]
Error should be reset only if we change item status from "Not supported". This also should work for item prototypes and discovery rules.
<SlaVa>RESOLVED

<Vedmak> CLOSED

Comment by Vjacheslav Shipillo (Inactive) [ 2011 Dec 02 ]

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

Comment by Alexey Fukalov [ 2011 Dec 05 ]

(3) [GUI]
Code formatting should be corrected.
<SlaVa>RESOLVED

<Vedmak> still incorrect at some places.
<SlaVa>RESOLVED

<Vedmak> CLOSED

Comment by Alexey Fukalov [ 2011 Dec 05 ]

(4) [GUI]
If we try to call item.update method without "status", which is not required, we got "Undefined index: status [api/classes/class.citemgeneral.php:174]"
<SlaVa>RESOLVED

<Vedmak> try to update any item, error about undefined index status appears.
<Slava>RESOLVED

<Vedmak> CLOSED

Comment by Alexey Fukalov [ 2011 Dec 05 ]

(5) [GUI]
If statement in items.inc.php:238
if ($status == ITEM_STATUS_ACTIVE)

{ $sql = 'UPDATE items SET status='.$status.',error=\'\' WHERE itemid='.$item['itemid']; }
else { $sql = 'UPDATE items SET status='.$status.',error='' WHERE itemid='.$item['itemid']; }

If/else with same statement
<SlaVa> changed and RESOLVED

<Vedmak> CLOSED

Comment by Alexey Fukalov [ 2011 Dec 08 ]

(6)[GUI]
Please review my changes in rev. 23863
<SlaVa>CLOSED

Comment by Vjacheslav Shipillo (Inactive) [ 2011 Dec 12 ]

fixed in version pre 1.9.9, revision 23888

Comment by richlv [ 2012 Apr 10 ]

reopen to change labels

Generated at Thu Apr 03 13:58:28 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.