[ZBX-9945] Configuration->Discovery: Device uniqueness criterias is updated incorrectly Created: 2015 Oct 08  Updated: 2017 May 30  Resolved: 2015 Oct 21

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 3.0.0alpha2
Fix Version/s: 3.0.0alpha4

Type: Incident report Priority: Trivial
Reporter: Alexander Vladishev Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: discovery
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

1. record from "Device uniqueness criteria" must be removed when it removed from discovery checks
2. "Device uniqueness criteria" must be correctly updated while updating a discovery check; now, a new entry was added



 Comments   
Comment by vitalijs.cemeris (Inactive) [ 2015 Oct 09 ]

(1) No translation strings changed.

sasha CLOSED

Comment by vitalijs.cemeris (Inactive) [ 2015 Oct 09 ]

RESOLVED in development branch svn://svn.zabbix.com/branches/dev/ZBX-9945

Comment by Ivo Kurzemnieks [ 2015 Oct 09 ]

(2) Radio button is getting lost when changing the check type.

vitalijs.cemeris RESOLVED in r56004

sasha This solution works fine, but this source code will be hard to maintain. Any changes in the template will shall change this code.

REOPENED

sasha RESOLVED in r56273.

iivs Discussed with richlv and decided to fix another problem that exists in this form:
When removing a discovery check, the element under "Device uniqueness criteria" is removed with the selected radio button leaving all radio buttons empty. Saving that form we receive an error "Field "Device uniqueness criteria" is mandatory.", but when the page is now refreshed, the first radio button is selected. A default one (assuming the first one) should be selected already upon removing an element with selected radio button so at least one radio button is always selected.

REOPENED

sasha Works fine on FF. I cannot reproduce the issue.

sasha Reproducible only with new checks.

Steps:

  • click [Create discovery rule]
  • create new Zabbix agent discovery check
  • select this check in Device uniqueness criteria
  • remove this discovery check

sasha RESOLVED in r56289.

iivs Thanks! Works great now.
CLOSED

Comment by Ivo Kurzemnieks [ 2015 Oct 09 ]

(3) Coding style:
configuration.discovery.edit.js.php: 21-28

  • block with CLabel is missing an indendation;
  • multiple method chaining: each method must be written on a separate line;
  • misplaced PHP closing tag

vitalijs.cemeris RESOLVED in r56004

sasha The code still incorrectly formatted. REOPENED

sasha RESOLVED in r56271 (also fixed formatting of all templates)

iivs I still think that closing parenthesis should be on a new line. For example configuration.sysmaps.js.php: 311-312. The syntax there is correct. But see, for example, line 161. It is the same thing, only instead of null there is an array, but closing parenthesis looks misplaced.
I fixed several indentation problems and line overflows in r56282, please review.

sasha Thanks! CLOSED

Comment by Ivo Kurzemnieks [ 2015 Oct 21 ]

TESTED

Comment by Alexander Vladishev [ 2015 Oct 21 ]

Fixed in pre-3.0.0alpha4 r56299.

Generated at Sat Jun 21 07:44:53 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.