diff --git a/db/update15.0.sql b/db/update15.0.sql index f3d4d00c13..49c165548a 100644 --- a/db/update15.0.sql +++ b/db/update15.0.sql @@ -30,6 +30,7 @@ ALTER TABLE `zt_burn` CHANGE `project` `execution` mediumint(8) unsigned NOT NUL ALTER TABLE `zt_doc` CHANGE `project` `execution` mediumint(8) unsigned NOT NULL; ALTER TABLE `zt_relation` CHANGE `project` `execution` mediumint(8) unsigned NOT NULL; ALTER TABLE `zt_relation` CHANGE `program` `project` mediumint(8) unsigned NOT NULL; +ALTER TABLE `zt_case` CHANGE `project` `execution` mediumint(8) unsigned NOT NULL; ALTER TABLE `zt_doclib` CHANGE `project` `execution` mediumint(8) unsigned NOT NULL; ALTER TABLE `zt_task` CHANGE `project` `execution` mediumint(8) unsigned NOT NULL; ALTER TABLE `zt_testreport` CHANGE `project` `execution` mediumint(8) unsigned NOT NULL; diff --git a/db/zentao.sql b/db/zentao.sql index 0752a52985..8af4ca067b 100644 --- a/db/zentao.sql +++ b/db/zentao.sql @@ -185,6 +185,7 @@ CREATE TABLE IF NOT EXISTS `zt_case` ( `id` mediumint(8) unsigned NOT NULL auto_increment, `project` mediumint(8) unsigned NOT NULL, `product` mediumint(8) unsigned NOT NULL default '0', + `execution` mediumint(8) unsigned NOT NULL, `branch` mediumint(8) unsigned NOT NULL default '0', `lib` mediumint(8) unsigned NOT NULL default '0', `module` mediumint(8) unsigned NOT NULL default '0', diff --git a/module/block/view/projectblock.html.php b/module/block/view/projectblock.html.php index 5af4c1331f..8d80bab6bf 100644 --- a/module/block/view/projectblock.html.php +++ b/module/block/view/projectblock.html.php @@ -24,9 +24,7 @@ - createLink('program', 'index', "programID={$project->id}"); - ?> + createLink('project', 'index', "programID={$project->id}");?> name);?> PM, $project->PM)?> diff --git a/module/execution/control.php b/module/execution/control.php index 2fa7cfc67d..ef26bad92d 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -476,7 +476,7 @@ class execution extends control $toExecution = $execution->id; $branches = $this->execution->getBranches($toExecution); $tasks = $this->execution->getTasks2Imported($toExecution, $branches); - $executions = $this->execution->getsToImport(array_keys($tasks), $execution->type); + $executions = $this->execution->getToImport(array_keys($tasks), $execution->type); unset($executions[$toExecution]); unset($tasks[$toExecution]); @@ -1984,7 +1984,7 @@ class execution extends control $this->execution->setMenu($this->executions, $executionID); $execution = $this->loadModel('execution')->getById($executionID); - $stories = $this->loadModel('story')->getStories($executionID); + $stories = $this->loadModel('story')->getExecutionStories($executionID); $this->loadModel('common')->saveQueryCondition($this->dao->get(), 'story', false); /* Get execution's product. */ diff --git a/module/execution/js/importtask.js b/module/execution/js/importtask.js index 7b76460b86..47b2dca33d 100644 --- a/module/execution/js/importtask.js +++ b/module/execution/js/importtask.js @@ -1,5 +1,5 @@ function reload(toProject, fromProject) -{ - link = createLink('project','importtask','toProject='+toProject + '&fromProject='+fromProject); +{ + link = createLink('execution','importtask','toProject='+toProject + '&fromProject='+fromProject); location.href = link; } diff --git a/module/execution/model.php b/module/execution/model.php index bfcd233efd..612a74f452 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -1733,7 +1733,7 @@ class executionModel extends model $executions = $this->dao->select('t1.product, t1.project')->from(TABLE_PROJECTPRODUCT)->alias('t1') ->leftJoin(TABLE_EXECUTION)->alias('t2')->on('t1.project=t2.id') ->where('t1.product')->in(array_keys($products)) - ->andWhere('t2.project')->eq($execution->execution) + ->andWhere('t2.project')->eq($execution->project) ->fetchGroup('execution'); $branches = str_replace(',', "','", $branches);