Details
Description
Steps to reproduce the problem:
Have a set up with 2 zones.
Create a template1 for zone1.
Initiate copytemplate for this template to zone2.
Delete this template from zone2.
Initiate copytemplate for this template(from zone1) to zone2 copy.
Copy gets initiated successfully and it gets copied as well.
But this template is marked as "Removed" in template_zone_ref and is not seen in "My Templates" list view.
After creation of zone2 template:
mysql> select * from template_zone_ref where template_id = 219;
-------------------------------------------------------------------+
id | zone_id | template_id | created | last_updated | removed |
-------------------------------------------------------------------+
43 | 1 | 219 | 2012-04-27 15:08:07 | 2012-04-27 15:08:07 | NULL |
47 | 2 | 219 | 2012-04-27 16:58:46 | 2012-04-27 16:58:46 | NULL |
-------------------------------------------------------------------+
2 rows in set (0.00 sec)
After deletion of zone2 template:
mysql> select * from template_zone_ref where template_id = 219;
-------------------------------------------------------------------------------+
id | zone_id | template_id | created | last_updated | removed |
-------------------------------------------------------------------------------+
43 | 1 | 219 | 2012-04-27 15:08:07 | 2012-04-27 15:08:07 | NULL |
47 | 2 | 219 | 2012-04-27 16:58:46 | 2012-04-27 16:58:46 | 2012-04-27 18:49:54 |
-------------------------------------------------------------------------------+
2 rows in set (0.00 sec)
After re copying of zone2 template:
mysql> select * from template_zone_ref where template_id = 219;
-------------------------------------------------------------------------------+
id | zone_id | template_id | created | last_updated | removed |
-------------------------------------------------------------------------------+
43 | 1 | 219 | 2012-04-27 15:08:07 | 2012-04-27 15:08:07 | NULL |
47 | 2 | 219 | 2012-04-27 16:58:46 | 2012-04-27 18:50:51 | 2012-04-27 18:50:51 |
-------------------------------------------------------------------------------+