[ZBX-4983] Cannot import 1.8 host/template with macro if it already exists Created: 2012 May 10  Updated: 2017 May 30  Resolved: 2012 Oct 05

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

Type: Incident report Priority: Blocker
Reporter: Toms (Inactive) Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: XML File zbx_templates_export.xml    

 Description   

Try to import given file twice.



 Comments   
Comment by Alexander Vladishev [ 2012 May 10 ]

Please, specify "Affects Version/s"

Comment by Alexei Vladishev [ 2012 Aug 29 ]

I am getting 'Macro "{$ASD}" already exists on "Exp Temp 001".' when trying to import this template twice in the latest trunk.

Comment by Alexey Fukalov [ 2012 Sep 18 ]

dev branch: svn://svn.zabbix.com/branches/dev/ZBX-4983

Comment by Toms (Inactive) [ 2012 Sep 19 ]

(1) Consider easy fix replacing order of

if ($macroIdsToDelete)

{ $this->delete($macroIdsToDelete); }

if ($macrosToAdd)

{ $this->create($macrosToAdd); }

in CUserMacro.php replaceMacros() function

but regarding solution with extra SELECT statement, I think It would be better to make that check inside replaceMacros() function

Error still persist in template edit form, if you remove macro and add macro with same name and then try to save changes.

Vedmak RESOLVED

<Toms> CLOSED

Comment by Toms (Inactive) [ 2012 Sep 19 ]

TESTED

Comment by Alexey Fukalov [ 2012 Oct 04 ]

Fixed in 2.0.4rc1 r30539, pre-2.1.0 r30540.

Comment by Pavels Jelisejevs (Inactive) [ 2012 Oct 05 ]

(2) Please document the API fix in the 2.0 changelog.

Vedmak CLOSED

Generated at Fri Apr 26 16:56:19 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.