foreach ($sections as $section) {
if (isset ($oldsettings[$section])) {
foreach ($oldsettings[$section] as $k => $v) {
- $newrole->setSetting ($section,
- $id_mappings[$section][$k],
- $v) ;
+ // Only copy perms for tools that have been copied
+ if (isset ($id_mappings[$section][$k])) {
+ $newrole->setSetting ($section,
+ $id_mappings[$section][$k],
+ $v) ;
+ }
}
}
}
$this->click("link=Tracker");
$this->waitForPageToLoad("30000");
$this->assertTrue($this->isTextPresent("Tracker for ProjectA (projecta)"));
+
+ // Test for fusionforge.org bug #245
+ $this->open( ROOT . '/projects/template') ;
+ $this->waitForPageToLoad("30000");
+
+ $this->click("link=Admin");
+ $this->waitForPageToLoad("30000");
+ $this->click("link=Tools");
+ $this->waitForPageToLoad("30000");
+ $this->uncheck("//input[@name='use_tracker']") ;
+ $this->click("submit");
+ $this->waitForPageToLoad("30000");
+
+ $this->createAndGoto('ProjectB');
}
function testEmptyProject()