ZABBIX BUGS AND ISSUES

Template import error

Details

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.

Activity

Hide
Oleg Egorov added a comment - - edited

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

Show
Oleg Egorov added a comment - - edited issue.xml generated from template list (Template OS Linux)
Hide
Oleg Egorov added a comment - - edited

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

Show
Oleg Egorov added a comment - - edited 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
Hide
Alexey Fukalov added a comment - - edited

(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

Alexey Fukalov CLOSED

Show
Alexey Fukalov added a comment - - edited (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 Alexey Fukalov CLOSED
Hide
Oleg Egorov added a comment -

FIXED IN 2.0.4 r31444, 2.1.0 r31445
CLOSED

Show
Oleg Egorov added a comment - FIXED IN 2.0.4 r31444, 2.1.0 r31445 CLOSED

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: