diff --git a/module/bug/control.php b/module/bug/control.php index cce79a645b..386d617b99 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -235,7 +235,7 @@ class bug extends control $this->view->projects = $this->product->getProjectPairs($bug->product); $this->view->stories = $bug->project ? $this->story->getProjectStoryPairs($bug->project) : $this->story->getProductStoryPairs($bug->product); $this->view->tasks = $this->task->getProjectTaskPairs($bug->project); - $this->view->users = $this->user->getPairs(); + $this->view->users = $this->user->getPairs(); $this->view->builds = $this->loadModel('build')->getProductBuildPairs($productID); $this->view->actions = $this->action->getList('bug', $bugID); @@ -255,20 +255,23 @@ class bug extends control die(js::locate($this->createLink('bug', 'view', "bugID=$bugID"), 'parent')); } - /* 生成表单。*/ + /* 查找bug和产品信息。*/ $bug = $this->bug->getById($bugID); $productID = $bug->product; - $header['title'] = $this->products[$productID] . $this->lang->colon . $this->lang->bug->resolve; - $position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $this->products[$productID]); - $position[] = $this->lang->bug->resolve; /* 设置菜单。*/ $this->bug->setMenu($this->products, $productID); - $users = $this->user->getPairs(); - $this->assign('header', $header); - $this->assign('position', $position); - $this->assign('bug', $bug); + /* 位置。*/ + $this->view->header['title'] = $this->products[$productID] . $this->lang->colon . $this->lang->bug->resolve; + $this->view->position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $this->products[$productID]); + $this->view->position[] = $this->lang->bug->resolve; + + /* 赋值。*/ + $this->view->bug = $bug; + $this->view->users = $this->user->getPairs(); + $this->view->builds = $this->loadModel('build')->getProductBuildPairs($productID); + $this->view->actions = $this->action->getList('bug', $bugID); $this->display(); } @@ -280,28 +283,30 @@ class bug extends control { $this->bug->activate($bugID); if(dao::isError()) die(js::error(dao::getError())); - $files = $this->loadModel('file')->saveUpload('files', 'bug', $bugID); + $files = $this->loadModel('file')->saveUpload('bug', $bugID); $actionID = $this->action->create('bug', $bugID, 'Activated', $this->post->comment); $this->sendmail($bugID, $actionID); die(js::locate($this->createLink('bug', 'view', "bugID=$bugID"), 'parent')); } - /* 生成表单。*/ + /* 获得bug和产品信息。*/ $bug = $this->bug->getById($bugID); $productID = $bug->product; - $users = $this->user->getPairs(); /* 设置菜单。*/ $this->bug->setMenu($this->products, $productID); - $header['title'] = $this->products[$productID] . $this->lang->colon . $this->lang->bug->activate; - $position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $this->products[$productID]); - $position[] = $this->lang->bug->activate; + /* 当前位置。*/ + $this->view->header->title = $this->products[$productID] . $this->lang->colon . $this->lang->bug->activate; + $this->view->position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $this->products[$productID]); + $this->view->position[] = $this->lang->bug->activate; + + /* 赋值。*/ + $this->view->bug = $bug; + $this->view->users = $this->user->getPairs(); + $this->view->builds = $this->loadModel('build')->getProductBuildPairs($productID); + $this->view->actions = $this->action->getList('bug', $bugID); - $this->assign('header', $header); - $this->assign('position', $position); - $this->assign('bug', $bug); - $this->assign('users', $users); $this->display(); } @@ -318,20 +323,20 @@ class bug extends control die(js::locate($this->createLink('bug', 'view', "bugID=$bugID"), 'parent')); } - /* 生成表单。*/ + /* bug和产品信息。*/ $bug = $this->bug->getById($bugID); $productID = $bug->product; /* 设置菜单。*/ $this->bug->setMenu($this->products, $productID); - $header['title'] = $this->products[$productID] . $this->lang->colon . $this->lang->bug->activate; - $position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $this->products[$productID]); - $position[] = $this->lang->bug->activate; + $this->view->header->title = $this->products[$productID] . $this->lang->colon . $this->lang->bug->activate; + $this->view->position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $this->products[$productID]); + $this->view->position[] = $this->lang->bug->activate; - $this->assign('header', $header); - $this->assign('position', $position); - $this->assign('bug', $bug); + $this->view->bug = $bug; + $this->view->users = $this->user->getPairs(); + $this->view->actions = $this->action->getList('bug', $bugID); $this->display(); } diff --git a/module/bug/lang/zh-cn.php b/module/bug/lang/zh-cn.php index 12bdecb254..b854e97dc1 100644 --- a/module/bug/lang/zh-cn.php +++ b/module/bug/lang/zh-cn.php @@ -145,7 +145,7 @@ $lang->bug->status = 'Bug状态'; $lang->bug->mailto = '抄送给'; $lang->bug->openedBy = '由谁创建'; $lang->bug->openedDate = '创建日期'; -$lang->bug->openedBuild = '创建版本'; +$lang->bug->openedBuild = '影响版本'; $lang->bug->assignedTo = '指派给'; $lang->bug->assignedDate = '指派日期'; $lang->bug->resolvedBy = '解决者'; diff --git a/module/bug/model.php b/module/bug/model.php index c9bff1f633..0c857f8385 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -133,11 +133,11 @@ class bugModel extends model ->add('resolvedBy', $this->app->user->account) ->add('resolvedDate', $now) ->add('status', 'resolved') - ->add('assignedTo', $oldBug->openedBy) ->add('assignedDate', $now) ->add('lastEditedBy', $this->app->user->account) ->add('lastEditedDate', $now) ->setDefault('duplicateBug', 0) + ->setDefault('assignedTo', $oldBug->openedBy) ->remove('comment') ->get(); diff --git a/module/bug/view/activate.html.php b/module/bug/view/activate.html.php index e0547cb53a..b1b0d5a885 100644 --- a/module/bug/view/activate.html.php +++ b/module/bug/view/activate.html.php @@ -31,6 +31,10 @@