[ZBX-5821] Template import error Created: 2012 Nov 07  Updated: 2017 May 30  Resolved: 2012 Nov 14

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

Type: Incident report Priority: Major
Reporter: Oleg Egorov (Inactive) Assignee: Oleg Egorov (Inactive)
Resolution: Fixed Votes: 0
Labels: import, template, xml
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: XML File issue.xml    

 Description   

After first import all is ok! Because template have unique name.
After next import, when updated our template, we have problems...

In 2.0.4 Cannot update "templateid" for screen "System performance".
In 2.1.0 Empty input parameter.



 Comments   
Comment by Oleg Egorov (Inactive) [ 2012 Nov 09 ]

issue.xml generated from template list (Template OS Linux)

Comment by Oleg Egorov (Inactive) [ 2012 Nov 13 ]

Fix for 2.0: svn://svn.zabbix.com/branches/dev/ZBX-5821 r31431
Fix for 2.1: svn://svn.zabbix.com/branches/dev/ZBX-5821-trunk r31437

RESOLVED

Comment by Alexey Fukalov [ 2012 Nov 14 ]

(1)
I think removed check for templateid existance must be left.
We can fix it by not passing templateid when import updates screens, it can be done in file CTemplateScreenImporter.php.
move line 45 to 50

foreach ($screens as $screen) {
	$screen = $this->resolveScreenReferences($screen);
	if (isset($screen['screenid'])) {
		$screensToUpdate[] = $screen;
	}
	else {
		$screen['templateid'] = $this->referencer->resolveTemplate($template);
		$screensToCreate[] = $screen;
	}
}

oleg.egorov RESOLVED IN svn://svn.zabbix.com/branches/dev/ZBX-5821 r31442 for 2.0 and 2.1

Vedmak CLOSED

Comment by Oleg Egorov (Inactive) [ 2012 Nov 14 ]

FIXED IN 2.0.4 r31444, 2.1.0 r31445
CLOSED

Generated at Fri Mar 29 04:21:19 EET 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.