[ZBX-4833] Screens are not cloned when performing full clone of the template. Created: 2012 Apr 04  Updated: 2017 May 30  Resolved: 2012 Oct 16

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

Type: Incident report Priority: Major
Reporter: Igor Danoshaites (Inactive) Assignee: Unassigned
Resolution: Fixed Votes: 1
Labels: cloning, fullcloning, templatedscreens
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by ZBX-5475 full clone does not clone template sc... Closed

 Description   

Screens are not cloned when performing full clone of the template, but items, triggers, graphs and discovery rules are cloned.



 Comments   
Comment by richlv [ 2012 Sep 13 ]

(1) docs were added to http://www.zabbix.com/documentation/2.0/manual/appendix/api/templatescreen/copy , but still missing in http://www.zabbix.com/documentation/2.0/manual/appendix/api/changes_2.0

Vedmak RESOLVED
<Eduard> OK, CLOSED

Comment by richlv [ 2012 Sep 13 ]

(2) there's something quite wrong with http://www.zabbix.com/documentation/2.0/manual/appendix/api/templatescreen - some links point to templatescreen, some to screen (and there are no corresponding pages for templatescreen). i'm afraid to touch it

Vedmak RESOLVED
<Eduard> CLOSED

Comment by Eduards Samersovs (Inactive) [ 2012 Sep 14 ]

(3) Undefined index after full cloning just created template with 1 item, 1 graph, 1 screen with 1 graph screen item.
Undefined index: templateid [api/classes/CTemplateScreen.php:429]
Undefined index: templateid [api/classes/CTemplateScreen.php:431]

Vedmak RESOLVED
<Eduard> CLOSED

Comment by Eduards Samersovs (Inactive) [ 2012 Sep 14 ]

(4) Suggest not transform "*Ids" to array calling API. For example here:
$screensCopied = API::TemplateScreen()->copy(array(
'screenIds' => zbx_objectValues($screens, 'screenid'),
'templateIds' => array($templateid)
));

Vedmak RESOLVED
<Eduard> CLOSED

Comment by Eduards Samersovs (Inactive) [ 2012 Sep 14 ]

(5) Suggest to use 'preservekeys' => true in CTemplateScreen->isReadable() and CTemplateScreen->isWritable()

Vedmak Output is set to COUNT there, so no need in preservekeys RESOLVED
<Eduard> Ok, CLOSED

Comment by Eduards Samersovs (Inactive) [ 2012 Sep 17 ]

Tested!

Comment by Alexey Fukalov [ 2012 Oct 04 ]

Fixed in 2.0.4rc1 r30554, pre-2.1.0 r30555.

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

(6) Please document the changes to the API in the 2.0 changelog.

Vedmak CLOSED

Comment by richlv [ 2012 Oct 08 ]

(7) this added a string that contains "Cannot change template for Screen", capitalising a word in the middle of the sentence.
we do not do that ( https://zabbix.org/wiki/Docs/specs/syntax#Syntax )

Vedmak Fixed in 2.0.4rc1 r30767, pre-2.1.0 r30768.

<richlv> CLOSED

Generated at Fri Apr 26 13:59:07 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.