goback, '', "class='btn'");?>
" . $lang->action->dynamic->hidden, '', "class='btn btn-danger'");?>
@@ -36,10 +35,10 @@
action->objectType);?>
- idAB);?>
+ idAB);?>
action->objectName;?>
- action->actor);?>
- action->date);?>
+ action->actor);?>
+ action->date);?>
actions;?>
diff --git a/module/execution/control.php b/module/execution/control.php
index 720bd993a7..be311aba62 100644
--- a/module/execution/control.php
+++ b/module/execution/control.php
@@ -2038,9 +2038,9 @@ class execution extends control
{
/* Delete execution. */
$this->dao->update(TABLE_EXECUTION)->set('deleted')->eq(1)->where('id')->eq($executionID)->exec();
- $this->loadModel('action')->create($this->objectType, $executionID, 'deleted', '', $extra = ACTIONMODEL::CAN_UNDELETED);
- $this->dao->update(TABLE_DOCLIB)->set('deleted')->eq(1)->where('execution')->eq($executionID)->exec();
+ $this->loadModel('action')->create('execution', $executionID, 'deleted', '', ACTIONMODEL::CAN_UNDELETED);
$this->execution->updateUserView($executionID);
+
$this->session->set('execution', '');
$this->executeHooks($executionID);
die(js::locate(inlink('index'), 'parent'));
diff --git a/module/program/control.php b/module/program/control.php
index 01a907690e..9e515e8d08 100644
--- a/module/program/control.php
+++ b/module/program/control.php
@@ -47,7 +47,7 @@ class program extends control
if(common::hasPriv('program', 'create')) $this->lang->pageActions = html::a($this->createLink('program', 'create'), " " . $this->lang->program->create, '', "class='btn btn-secondary'");
- $this->app->session->set('programList', $this->app->getURI(true));
+ $this->session->set('programList', $this->app->getURI(true));
$programType = $this->cookie->programType ? $this->cookie->programType : 'bylist';
@@ -368,7 +368,7 @@ class program extends control
if($confirm == 'no') die(js::confirm($this->lang->program->confirmDelete, $this->createLink('program', 'delete', "programID=$programID&confirm=yes")));
$this->dao->update(TABLE_PROGRAM)->set('deleted')->eq(1)->where('id')->eq($programID)->exec();
- $this->loadModel('action')->create('program', $programID, 'deleted', '', $extra = ACTIONMODEL::CAN_UNDELETED);
+ $this->loadModel('action')->create('program', $programID, 'deleted', '', ACTIONMODEL::CAN_UNDELETED);
die(js::reload('parent'));
}
diff --git a/module/project/control.php b/module/project/control.php
index 6033f94b7c..941c6f095a 100644
--- a/module/project/control.php
+++ b/module/project/control.php
@@ -1326,13 +1326,22 @@ class project extends control
}
else
{
- $projectIdList = $this->project->getExecutionsByProject($projectID);
- $this->project->delete(TABLE_PROJECT, $projectID);
- $this->dao->update(TABLE_PROJECT)->set('deleted')->eq(1)->where('id')->in(array_keys($projectIdList))->exec();
- $this->dao->update(TABLE_DOCLIB)->set('deleted')->eq(1)->where('project')->eq($projectID)->exec();
- $this->project->updateUserView($projectID);
- $this->session->set('project', '');
+ $this->loadModel('user');
+ $this->loadModel('action');
+ $this->project->delete(TABLE_PROJECT, $projectID);
+ $this->dao->update(TABLE_DOCLIB)->set('deleted')->eq(1)->where('execution')->eq($projectID)->exec();
+ $this->user->updateUserView($projectID, 'project');
+
+ /* Delete the execution under the project. */
+ $executionIdList = $this->execution->getByProject($projectID);
+ if(empty($executionIdList)) die(js::reload('parent'));
+
+ $this->dao->update(TABLE_EXECUTION)->set('deleted')->eq(1)->where('id')->in(array_keys($executionIdList))->exec();
+ foreach($executionIdList as $executionID => $execution) $this->action->create('execution', $executionID, 'deleted', '', ACTIONMODEL::CAN_UNDELETED);
+ $this->user->updateUserView($executionIdList, 'sprint');
+
+ $this->session->set('project', '');
die(js::reload('parent'));
}
}
diff --git a/module/project/lang/zh-cn.php b/module/project/lang/zh-cn.php
index 502fe346b9..3f08fa2def 100644
--- a/module/project/lang/zh-cn.php
+++ b/module/project/lang/zh-cn.php
@@ -41,6 +41,7 @@ $lang->project->errorSameProducts = '项目不能关联多个相同的产品。'
$lang->project->errorNoProducts = '最少关联一个产品';
$lang->project->copyNoProject = '没有可用的项目来复制';
$lang->project->searchByName = '输入项目名称进行检索';
+$lang->project->deleted = '已删除';
/* Fields. */
$lang->project->common = '项目';
diff --git a/module/project/view/view.html.php b/module/project/view/view.html.php
index a95bfa7f60..a4143dd277 100644
--- a/module/project/view/view.html.php
+++ b/module/project/view/view.html.php
@@ -90,8 +90,9 @@
id";
- common::printBack(inlink('browse'));
+ $params = "project=$project->id";
+ $browseLink = $this->session->projectList ? $this->session->projectList : inlink('browse');
+ common::printBack($browseLink);
if(!$project->deleted)
{
echo "";
diff --git a/module/story/view/view.html.php b/module/story/view/view.html.php
index a6bda3ae77..766abc2f33 100644
--- a/module/story/view/view.html.php
+++ b/module/story/view/view.html.php
@@ -12,7 +12,7 @@
?>
-session->storyList != false ? $app->session->storyList : $this->createLink('product', 'browse', "productID=$story->product&branch=$story->branch&moduleID=$story->module");?>
+session->storyList ? $app->session->storyList : $this->createLink('product', 'browse', "productID=$story->product&branch=$story->branch&moduleID=$story->module");?>