[ZBX-8930] Map import successful without elements from map Created: 2014 Oct 20 Updated: 2017 May 30 Resolved: 2015 Jan 27 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | API (A) |
Affects Version/s: | 2.4.1 |
Fix Version/s: | 2.4.4rc1, 2.5.0 |
Type: | Incident report | Priority: | Major |
Reporter: | Alexey Pustovalov | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | maps, regression | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Issue Links: |
|
Description |
Import map always successful independent of existence map elements. The message is "Imported successfully". It happens because of inherited map elements on map, like this: <selement> <elementtype>1</elementtype> <label>test_map</label> <label_location>3</label_location> <x>11</x> <y>180</y> <elementsubtype>0</elementsubtype> <areatype>0</areatype> <width>200</width> <height>200</height> <viewtype>0</viewtype> <use_iconmap>0</use_iconmap> <selementid>2924</selementid> <element> <name>some_map_name</name> </element> <icon_off> <name>Cloud (32)</name> </icon_off> <icon_on/> <icon_disabled/> <icon_maintenance/> <urls/> </selement> |
Comments |
Comment by Pavels Jelisejevs (Inactive) [ 2014 Oct 21 ] |
When trying to import a map that references an unexisting map, we should trigger an error: "Cannot find map "%referencedMap%" used in map "%importedMap%"." |
Comment by Arvids Godjuks (Inactive) [ 2014 Oct 22 ] |
Fixed in dev branch svn://svn.zabbix.com/branches/dev/ZBX-8930 Additional info: |
Comment by Arvids Godjuks (Inactive) [ 2014 Oct 22 ] |
(1) No translation changes oleg.egorov CLOSED |
Comment by Pavels Jelisejevs (Inactive) [ 2014 Oct 27 ] |
(2) I've exported a map with a host, deleted it and tried to import it back with the "Create new" checkbox unchecked. The new map shouldn't be created. Instead I get an error:
arvids.godjuks RESOLVED in r50246 jelisejev CLOSED. |
Comment by Pavels Jelisejevs (Inactive) [ 2014 Oct 27 ] |
(3) Element updating doesn't respect the "updateExisting" option. arvids.godjuks RESOLVED in r50246 jelisejev CLOSED. |
Comment by Pavels Jelisejevs (Inactive) [ 2014 Oct 27 ] |
(4) Cannot import a map with links between elements. arvids.godjuks RESOLVED in r50246 jelisejev CLOSED. |
Comment by Pavels Jelisejevs (Inactive) [ 2014 Oct 27 ] |
(5) Map background images and icon maps must be resolved before creating a map. arvids.godjuks Woun't fix: For images to be resolved and imported you need tick the checkboxes on the "Images" line when selecting what to import. jelisejev No, the images checkboxes only affect creating and updating the images in the "images" XML element. Map element backgrounds are map properties and should be imported regardless of the image settings. And the icon maps should be imported as well (although icon map map export is currently broken by arvids.godjuks RESOLVED in r50571 jelisejev Some code issues:
arvids.godjuks RESOLVED in r50639 oleg.egorov CLOSED |
Comment by Pavels Jelisejevs (Inactive) [ 2014 Oct 27 ] |
(6) The second update request must update only elements and map links, not all of the map properties. arvids.godjuks RESOLVED in r50246 jelisejev Is there any reason to update the name of the map? arvids.godjuks RESOLVED in r50571 - map name is removed from the second update request oleg.egorov CLOSED |
Comment by Pavels Jelisejevs (Inactive) [ 2014 Oct 27 ] |
(7) Some coding style issues:
arvids.godjuks RESOLVED in r50246 jelisejev CLOSED. |
Comment by Pavels Jelisejevs (Inactive) [ 2014 Nov 11 ] |
(8) The "if (array_key_exists($actionMapItem['name'], $maps)) {" condition seems to be unnecessary in CMapImporter::import(). And the variable names $mapActionArray and $actionMapItem are very confusing. arvids.godjuks RESOLVED in r50571 jelisejev CLOSED. |
Comment by Oleg Egorov (Inactive) [ 2014 Dec 16 ] |
(9) Please review my minor changes in r51190, r51678 and r51692 iivs I made minor coding style and typo fixes. See r51846 oleg.egorov CLOSED |
Comment by Ivo Kurzemnieks [ 2015 Jan 27 ] |
TESTED, but don't forget to close (9) and since dev branch was created from trunk, merge into 2.4 |
Comment by Oleg Egorov (Inactive) [ 2015 Jan 27 ] |
FIXED IN 2.4.4rc1 r51869 and 2.5.0(trunk) r51870 |