From 5c1ef6e4f2c73b27a00009a3f341afe804fc371d Mon Sep 17 00:00:00 2001 From: wangyidong Date: Thu, 2 Nov 2017 10:42:48 +0800 Subject: [PATCH 1/8] =?UTF-8?q?Finish=20task#3299=20=E9=9C=80=E6=B1=82?= =?UTF-8?q?=E7=9C=8B=E6=9D=BF=E9=A1=B5=E9=9D=A2=E4=B8=8D=E8=83=BD=E6=8B=96?= =?UTF-8?q?=E6=94=BE=E7=9A=84=E5=88=97=E9=A2=9C=E8=89=B2=E4=B8=8A=E7=BB=99?= =?UTF-8?q?=E5=87=BA=E6=8F=90=E7=A4=BA=EF=BC=8C=E5=BE=80=E5=8F=B3=E6=8B=96?= =?UTF-8?q?=E7=9A=84=E6=97=B6=E5=80=99=E6=89=80=E6=9C=89=E7=BB=8F=E8=BF=87?= =?UTF-8?q?=E7=9A=84=E5=88=97=E9=A2=9C=E8=89=B2=E9=83=BD=E5=8F=98=E4=BA=86?= =?UTF-8?q?=EF=BC=8C=E5=8E=86=E5=8F=B2=E8=AE=B0=E5=BD=95=E6=96=87=E6=A1=88?= =?UTF-8?q?=E6=94=B9=E6=88=90=EF=BC=9A=E7=94=B1XXX=E9=AA=8C=E6=94=B6,cost:?= =?UTF-8?q?0.5=20left:0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/action/lang/en.php | 3 +++ module/action/lang/zh-cn.php | 3 +++ module/project/css/storykanban.css | 13 ++++++------- module/project/view/story.html.php | 8 +++++--- module/project/view/storykanban.html.php | 19 +++++++++---------- module/story/control.php | 4 +++- 6 files changed, 29 insertions(+), 21 deletions(-) diff --git a/module/action/lang/en.php b/module/action/lang/en.php index b82e62f4db..af2b86eb59 100755 --- a/module/action/lang/en.php +++ b/module/action/lang/en.php @@ -110,6 +110,7 @@ $lang->action->desc->svncommited = '$date, submitted by $actoraction->desc->gitcommited = '$date, submitted by $actor and the version is #$extra.' . "\n"; $lang->action->desc->finished = '$date, finished by $actor.' . "\n"; $lang->action->desc->paused = '$date, paused by $actor.' . "\n"; +$lang->action->desc->verified = '$date, verified by $actor.' . "\n"; $lang->action->desc->diff1 = '%s has been changed. Its value was "%s" and the new value is "%s".
' . "\n"; $lang->action->desc->diff2 = '%s has been changed. The difference is ' . "\n" . "
%s
" . "\n"; $lang->action->desc->diff3 = 'File Name %s was changed to %s .' . "\n"; @@ -171,6 +172,7 @@ $lang->action->label->editestimate = 'Edited Man-Hour'; $lang->action->label->canceled = 'Cancelled'; $lang->action->label->finished = 'Finished'; $lang->action->label->paused = 'Paused'; +$lang->action->label->paused = 'Verified'; $lang->action->label->delayed = 'Delayed'; $lang->action->label->suspended = 'Suspended'; $lang->action->label->login = 'Login'; @@ -262,5 +264,6 @@ $lang->action->search->label['editestimate'] = $lang->action->label->edit $lang->action->search->label['canceled'] = $lang->action->label->canceled; $lang->action->search->label['finished'] = $lang->action->label->finished; $lang->action->search->label['paused'] = $lang->action->label->paused; +$lang->action->search->label['verified'] = $lang->action->label->verified; $lang->action->search->label['login'] = $lang->action->label->login; $lang->action->search->label['logout'] = $lang->action->label->logout; diff --git a/module/action/lang/zh-cn.php b/module/action/lang/zh-cn.php index 96e6aa1ca1..86a3f4edcf 100755 --- a/module/action/lang/zh-cn.php +++ b/module/action/lang/zh-cn.php @@ -112,6 +112,7 @@ $lang->action->desc->svncommited = '$date, 由 $actor 提交 $lang->action->desc->gitcommited = '$date, 由 $actor 提交代码,版本为#$extra。' . "\n"; $lang->action->desc->finished = '$date, 由 $actor 完成。' . "\n"; $lang->action->desc->paused = '$date, 由 $actor 暂停。' . "\n"; +$lang->action->desc->verified = '$date, 由 $actor 验收。' . "\n"; $lang->action->desc->diff1 = '修改了 %s,旧值为 "%s",新值为 "%s"。
' . "\n"; $lang->action->desc->diff2 = '修改了 %s,区别为:' . "\n" . "
%s
" . "\n"; $lang->action->desc->diff3 = '将文件名 %s 改为 %s 。' . "\n"; @@ -173,6 +174,7 @@ $lang->action->label->editestimate = '编辑了工时'; $lang->action->label->canceled = '取消了'; $lang->action->label->finished = '完成了'; $lang->action->label->paused = '暂停了'; +$lang->action->label->verified = '验收了'; $lang->action->label->delayed = '延期'; $lang->action->label->suspended = '挂起'; $lang->action->label->login = '登录系统'; @@ -266,5 +268,6 @@ $lang->action->search->label['editestimate'] = $lang->action->label->edit $lang->action->search->label['canceled'] = $lang->action->label->canceled; $lang->action->search->label['finished'] = $lang->action->label->finished; $lang->action->search->label['paused'] = $lang->action->label->paused; +$lang->action->search->label['verified'] = $lang->action->label->verified; $lang->action->search->label['login'] = $lang->action->label->login; $lang->action->search->label['logout'] = $lang->action->label->logout; diff --git a/module/project/css/storykanban.css b/module/project/css/storykanban.css index 2a46209874..bf48fab63b 100644 --- a/module/project/css/storykanban.css +++ b/module/project/css/storykanban.css @@ -12,7 +12,6 @@ #kanbanWrapper tbody td {vertical-align: top; padding: 6px} #kanbanWrapper tbody th {background: #f1f1f1} #kanbanWrapper .board-shadow {height: 0; opacity: 0; transition: opacity 0.2s;} -#kanbanWrapper tbody tr.dragging td.col-droppable {background: #fff4e5} #kanbanWrapper tbody tr.dragging td.col-droppable.drop-to {background: #ffeacc} #kanbanWrapper tbody tr.dragging td.col-droppable.drop-to .board-story + .board-shadow {margin-top: 6px;} #kanbanWrapper tbody tr.dragging td.col-droppable.drop-to .board-shadow {height: 28px; background: #999; background: rgba(0,0,0,0.35); opacity: 1;} @@ -56,12 +55,12 @@ .story-pri.pri-4 {background-color:#795523;} .board-story {color: #dd7503; background-color: #FFF3E0;} -.board-story.stage-projected {color:#777;} -.board-story.stage-developing {color:#D2322D; background-color: #FFEBEE;} -.board-story.stage-developed {color:#229F24; background-color: #E8F5E9;} -.board-story.stage-testing {color:#EF6C00; background-color: #FFF3E0;} -.board-story.stage-tested {color:#827717; background-color: #F9FBE7} -.board-story.stage-released {color:#9C27B0; background-color: #F3E5F5} +.board-story.board-story-projected {color:#777;} +.board-story.board-story-developing {color:#D2322D; background-color: #FFEBEE;} +.board-story.board-story-developed {color:#229F24; background-color: #E8F5E9;} +.board-story.board-story-testing {color:#EF6C00; background-color: #FFF3E0;} +.board-story.board-story-tested {color:#827717; background-color: #F9FBE7} +.board-story.board-story-released {color:#9C27B0; background-color: #F3E5F5} .affix {position:fixed; top:0px; width:95%;z-index:1030;} #kanbanHeader.affix {box-shadow: 0 3px 10px rgba(0,0,0,.1);} diff --git a/module/project/view/story.html.php b/module/project/view/story.html.php index d66a3a994a..b416ef606e 100644 --- a/module/project/view/story.html.php +++ b/module/project/view/story.html.php @@ -16,12 +16,14 @@ project->confirmUnlinkStory)?> -
-
icons['story']);?> project->story;?>
+
+
id", '', 'button', 'columns', '', '', '', '', $lang->project->kanban); common::printIcon('story', 'export', "productID=$productID&orderBy=id_desc", '', 'button', '', '', 'export'); $this->lang->story->create = $this->lang->project->createStory; diff --git a/module/project/view/storykanban.html.php b/module/project/view/storykanban.html.php index 21fe7bb2f1..969cfd34c7 100644 --- a/module/project/view/storykanban.html.php +++ b/module/project/view/storykanban.html.php @@ -10,12 +10,14 @@ ?> project->confirmUnlinkStory)?> -
-
icons['story']);?> project->story;?>
+
+
id", '', 'button', 'list', '', '', '', '', $lang->project->story); common::printIcon('story', 'export', "productID=$productID&orderBy=id_desc", '', 'button', '', '', 'export'); $this->lang->story->create = $this->lang->project->createStory; @@ -43,15 +45,12 @@ $account = $this->app->user->account - -
story->stageList[$col];?> story->stageList[$endCol];?>
- @@ -64,7 +63,7 @@ $account = $this->app->user->account id}&orderBy=%s&type=$type¶m=$param&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?> + + + @@ -75,9 +78,6 @@ - - - @@ -98,6 +98,9 @@ id));?> + + + - - - diff --git a/module/story/model.php b/module/story/model.php index d3c73d8229..d3b1d312bf 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -40,7 +40,7 @@ class storyModel extends model $story->projects = $this->dao->select('t1.project, t2.name, t2.status')->from(TABLE_PROJECTSTORY)->alias('t1') ->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id') ->where('t1.story')->eq($storyID) - ->orderBy('t1.project DESC') + ->orderBy('t1.`order` DESC') ->fetchAll('project'); $story->tasks = $this->dao->select('id, name, assignedTo, project, status, consumed, `left`')->from(TABLE_TASK)->where('story')->eq($storyID)->andWhere('deleted')->eq(0)->orderBy('id DESC')->fetchGroup('project'); $story->stages = $this->dao->select('*')->from(TABLE_STORYSTAGE)->where('story')->eq($storyID)->fetchPairs('branch', 'stage'); @@ -1574,7 +1574,7 @@ class storyModel extends model * @access public * @return array */ - public function getProjectStories($projectID = 0, $orderBy = 'pri_asc,id_desc', $type = 'byModule', $param = 0, $pager = null) + public function getProjectStories($projectID = 0, $orderBy = 't1.`order`_desc', $type = 'byModule', $param = 0, $pager = null) { if(defined('TUTORIAL')) return $this->loadModel('tutorial')->getProjectStories(); @@ -1667,6 +1667,7 @@ class storyModel extends model ->beginIF($productID)->andWhere('t2.product')->eq((int)$productID)->fi() ->beginIF($branch)->andWhere('t2.branch')->in("0,$branch")->fi() ->beginIF($moduleIdList)->andWhere('t2.module')->in($moduleIdList)->fi() + ->orderBy('t1.`order` desc') ->fetchAll(); if(!$stories) return array(); return $this->formatStories($stories, $type); diff --git a/module/tutorial/model.php b/module/tutorial/model.php index b5930811cb..dcdafdfbb9 100644 --- a/module/tutorial/model.php +++ b/module/tutorial/model.php @@ -110,6 +110,7 @@ class tutorialModel extends model $story->duplicateStory = 0; $story->version = 1; $story->deleted = '0'; + $story->order = '0'; $stories = array(); $stories[] = $story; @@ -202,14 +203,15 @@ class tutorialModel extends model public function getTeamMembers() { $member = new stdclass(); - $member->project = 1; - $member->account = $this->app->user->account; - $member->role = $this->app->user->role; - $member->join = $this->app->user->join; - $member->days = 10; - $member->hours = 7.0; - $member->totalHours = 70.0; - $member->realname = $this->app->user->realname; + $member->project = 1; + $member->account = $this->app->user->account; + $member->role = $this->app->user->role; + $member->join = $this->app->user->join; + $member->days = 10; + $member->hours = 7.0; + $member->totalHours = 70.0; + $member->realname = $this->app->user->realname; + $member->limitedUser = 0; return array($member->account => $member); } From 80b14f7c0459ca424ed2c07150bbac630e1934a8 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Thu, 2 Nov 2017 15:20:29 +0800 Subject: [PATCH 3/8] =?UTF-8?q?Finish=20task#3287=20=E7=9C=8B=E6=9D=BF?= =?UTF-8?q?=E5=88=86=E7=BB=84=E6=8C=89=E9=92=AE=E5=90=88=E5=B9=B6=E5=88=B0?= =?UTF-8?q?=E5=B7=A6=E4=BE=A7=E6=8E=92=E5=BA=8F=E8=8F=9C=E5=8D=95=E9=87=8C?= =?UTF-8?q?=E9=9D=A2=EF=BC=8C=E9=9C=80=E6=B1=82ID=E6=8E=92=E5=BA=8F?= =?UTF-8?q?=E5=8E=BB=E6=8E=89=EF=BC=8C=E5=A2=9E=E5=8A=A0=E9=9C=80=E6=B1=82?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E6=8E=92=E5=BA=8F,cost:1=20left:0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/project/control.php | 2 +- module/project/css/kanban.css | 3 +++ module/project/lang/en.php | 4 ++-- module/project/lang/zh-cn.php | 4 ++-- module/project/view/kanban.html.php | 21 +++++++++++++-------- module/upgrade/model.php | 5 ++++- 6 files changed, 25 insertions(+), 14 deletions(-) diff --git a/module/project/control.php b/module/project/control.php index 3fa6459aa6..bbcaacc0d5 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -1254,7 +1254,7 @@ class project extends control * @access public * @return void */ - public function kanban($projectID, $type = 'story', $orderBy = 'pri_asc') + public function kanban($projectID, $type = 'story', $orderBy = 'order_asc') { /* Save to session. */ $uri = $this->app->getURI(true); diff --git a/module/project/css/kanban.css b/module/project/css/kanban.css index 5511a1dddc..453f4a8cfb 100644 --- a/module/project/css/kanban.css +++ b/module/project/css/kanban.css @@ -86,6 +86,9 @@ table th.col-closed {width:14%} .board-story.stage-tested.inverse {background-color:#827717;} .board-story.stage-released.inverse {background-color:#9C27B0;} +.board-assignedTo {color:#D2322D; background-color: #FFEBEE;} +.board-finishedBy {color:#229F24; background-color: #E8F5E9;} + .bug-pri,.task-pri {display: inline-block; width: 16px; height: 16px; text-align: center; border-radius: 8px; border: 1px solid #ddd; font-size: 12px; line-height: 14px;} .affix {position:fixed; top:0px; width:95%;z-index:1030;} diff --git a/module/project/lang/en.php b/module/project/lang/en.php index a51c8c57c9..f963818496 100644 --- a/module/project/lang/en.php +++ b/module/project/lang/en.php @@ -238,10 +238,10 @@ $lang->project->placeholder->totalLeft = 'Total man-hour remained when start Pro $lang->project->selectGroup = new stdclass(); $lang->project->selectGroup->done = '(Done)'; +$lang->project->orderList['order_asc'] = "Order Asc"; +$lang->project->orderList['order_desc'] = "Order Desc"; $lang->project->orderList['pri_asc'] = "Priority Asc"; $lang->project->orderList['pri_desc'] = "Priority Desc"; -$lang->project->orderList['id_asc'] = "ID Asc"; -$lang->project->orderList['id_desc'] = "ID Desc"; $lang->project->orderList['stage_asc'] = "Stage Asc"; $lang->project->orderList['stage_desc'] = "Stage Desc"; diff --git a/module/project/lang/zh-cn.php b/module/project/lang/zh-cn.php index 75dfc0e5aa..becffa1fd1 100644 --- a/module/project/lang/zh-cn.php +++ b/module/project/lang/zh-cn.php @@ -238,10 +238,10 @@ $lang->project->placeholder->totalLeft = '项目开始时的总预计工时'; $lang->project->selectGroup = new stdclass(); $lang->project->selectGroup->done = '(已结束)'; +$lang->project->orderList['order_asc'] = "需求排序正序"; +$lang->project->orderList['order_desc'] = "需求排序倒序"; $lang->project->orderList['pri_asc'] = "需求优先级正序"; $lang->project->orderList['pri_desc'] = "需求优先级倒序"; -$lang->project->orderList['id_asc'] = "需求ID正序"; -$lang->project->orderList['id_desc'] = "需求ID倒序"; $lang->project->orderList['stage_asc'] = "需求阶段正序"; $lang->project->orderList['stage_desc'] = "需求阶段倒序"; diff --git a/module/project/view/kanban.html.php b/module/project/view/kanban.html.php index e92107ee8c..b7a6ed1b25 100644 --- a/module/project/view/kanban.html.php +++ b/module/project/view/kanban.html.php @@ -27,18 +27,23 @@ $account = $this->app->user->account 0) or $type != 'story');?> diff --git a/module/upgrade/model.php b/module/upgrade/model.php index 29a25377b5..1c5d1a4828 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -1802,7 +1802,10 @@ class upgradeModel extends model */ public function initProjectStoryOrder() { - $storyGroup = $this->dao->select('*')->from(TABLE_PROJECTSTORY)->orderBy('story_asc')->fetchGroup('project', 'story'); + $storyGroup = $this->dao->select('t1.*')->from(TABLE_PROJECTSTORY)->alias('t1') + ->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story=t2.id') + ->orderBy('t2.pri_desc,t1.story_asc') + ->fetchGroup('project', 'story'); foreach($storyGroup as $projectID => $stories) { From a5a18ad2e4d78fd5beb1ca3fcc5e301b999753b2 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Thu, 2 Nov 2017 15:25:55 +0800 Subject: [PATCH 4/8] =?UTF-8?q?Finish=20task#3315=20=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E7=9A=84=E7=9B=B8=E5=85=B3=E9=9C=80=E6=B1=82?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E5=8E=BB=E6=8E=89,cost:0.1=20left:0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/task/config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/task/config.php b/module/task/config.php index 200c71b7e2..ee0236e1f1 100644 --- a/module/task/config.php +++ b/module/task/config.php @@ -58,7 +58,7 @@ if($config->global->flow == 'onlyTask') } $config->task->datatable = new stdclass(); -$config->task->datatable->defaultField = array('id', 'pri', 'name', 'status', 'deadline', 'openedDate', 'assignedTo', 'finishedBy', 'estimate', 'consumed', 'left', 'story', 'actions'); +$config->task->datatable->defaultField = array('id', 'pri', 'name', 'status', 'deadline', 'openedDate', 'assignedTo', 'finishedBy', 'estimate', 'consumed', 'left', 'actions'); $config->task->datatable->fieldList['id']['title'] = 'idAB'; $config->task->datatable->fieldList['id']['fixed'] = 'left'; From cddabe418855202b44b6fcde7cc3fa22fa0343fc Mon Sep 17 00:00:00 2001 From: wangyidong Date: Thu, 2 Nov 2017 15:50:52 +0800 Subject: [PATCH 5/8] =?UTF-8?q?Finish=20task#3300=20=E5=B7=B2=E9=AA=8C?= =?UTF-8?q?=E6=94=B6=E7=9A=84=E9=A1=B9=E7=9B=AE=E9=9C=80=E6=B1=82=E6=89=80?= =?UTF-8?q?=E5=A4=84=E9=98=B6=E6=AE=B5=E5=8F=AA=E8=83=BD=E6=94=B9=E5=88=B0?= =?UTF-8?q?=E5=8F=91=E5=B8=83,cost:0.2=20left:0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/project/view/edit.html.php | 2 +- module/story/model.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/module/project/view/edit.html.php b/module/project/view/edit.html.php index d9f2b4f990..85f467c348 100644 --- a/module/project/view/edit.html.php +++ b/module/project/view/edit.html.php @@ -117,7 +117,7 @@
id, "class='form-control chosen' onchange='loadBranches(this)'");?> - type != 'normal') echo html::select("branch[$i]", $branchGroups[$product->id], $product->branch, "class='form-control' style='width:80px'")?> + type != 'normal' and isset($branchGroups[$product->id])) echo html::select("branch[$i]", $branchGroups[$product->id], $product->branch, "class='form-control' style='width:80px'")?>
diff --git a/module/story/model.php b/module/story/model.php index d3b1d312bf..7f3764f9ef 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -976,6 +976,9 @@ class storyModel extends model $story->lastEditedDate = $now; $story->stage = $stage; + /* When stage is verified then only change to released. */ + if($oldStory->stage == 'verified' and $stage->stage != 'released') $stage->stage = 'verified'; + $this->dao->update(TABLE_STORY)->data($story)->autoCheck()->where('id')->eq((int)$storyID)->exec(); if(!dao::isError()) $allChanges[$storyID] = common::createChanges($oldStory, $story); } From 19114bbf63ace22f726e194272dc5576ed88ad5e Mon Sep 17 00:00:00 2001 From: wangyidong Date: Thu, 2 Nov 2017 16:07:08 +0800 Subject: [PATCH 6/8] * fix bug #3296. --- module/project/config.php | 2 +- module/project/lang/en.php | 2 +- module/project/lang/zh-cn.php | 2 +- module/project/lang/zh-tw.php | 2 +- module/project/view/all.html.php | 2 +- module/project/view/taskdata.html.php | 211 -------------------------- 6 files changed, 5 insertions(+), 216 deletions(-) delete mode 100644 module/project/view/taskdata.html.php diff --git a/module/project/config.php b/module/project/config.php index 27288cdde1..0bda9aa952 100644 --- a/module/project/config.php +++ b/module/project/config.php @@ -6,7 +6,7 @@ $config->project->maxBurnDay = '31'; $config->project->weekend = '2'; $config->project->list = new stdclass(); -$config->project->list->exportFields = 'id,name,code,PM,end,status,totalEstimate,totalConsumed,totalLeft,progess'; +$config->project->list->exportFields = 'id,name,code,PM,end,status,totalEstimate,totalConsumed,totalLeft,progress'; global $lang, $app; $app->loadLang('task'); diff --git a/module/project/lang/en.php b/module/project/lang/en.php index f963818496..fa3ed277d0 100644 --- a/module/project/lang/en.php +++ b/module/project/lang/en.php @@ -38,7 +38,7 @@ $lang->project->totalEstimate = 'Est.'; $lang->project->totalConsumed = 'Consumed'; $lang->project->totalLeft = 'Total Remained'; $lang->project->Left = 'Remained'; -$lang->project->progess = 'Progess'; +$lang->project->progress = 'Progress'; $lang->project->hours = 'Estimate %s, Consumed %s, Remained %s'; $lang->project->viewBug = 'Bugs'; $lang->project->noProduct = "No {$lang->productCommon}"; diff --git a/module/project/lang/zh-cn.php b/module/project/lang/zh-cn.php index becffa1fd1..6aefabc777 100644 --- a/module/project/lang/zh-cn.php +++ b/module/project/lang/zh-cn.php @@ -38,7 +38,7 @@ $lang->project->totalEstimate = '总预计'; $lang->project->totalConsumed = '总消耗'; $lang->project->totalLeft = '总剩余'; $lang->project->Left = '剩余'; -$lang->project->progess = '进度'; +$lang->project->progress = '进度'; $lang->project->hours = '预计 %s 消耗 %s 剩余 %s'; $lang->project->viewBug = '查看bug'; $lang->project->noProduct = "无{$lang->productCommon}{$lang->projectCommon}"; diff --git a/module/project/lang/zh-tw.php b/module/project/lang/zh-tw.php index cd6b3baf38..88aa5254df 100644 --- a/module/project/lang/zh-tw.php +++ b/module/project/lang/zh-tw.php @@ -38,7 +38,7 @@ $lang->project->totalEstimate = '總預計'; $lang->project->totalConsumed = '總消耗'; $lang->project->totalLeft = '總剩餘'; $lang->project->Left = '剩餘'; -$lang->project->progess = '進度'; +$lang->project->progress = '進度'; $lang->project->hours = '預計 %s 消耗 %s 剩餘 %s'; $lang->project->viewBug = '查看bug'; $lang->project->noProduct = "無{$lang->productCommon}{$lang->projectCommon}"; diff --git a/module/project/view/all.html.php b/module/project/view/all.html.php index 45d11f03b9..1990468546 100644 --- a/module/project/view/all.html.php +++ b/module/project/view/all.html.php @@ -42,7 +42,7 @@
- + diff --git a/module/project/view/taskdata.html.php b/module/project/view/taskdata.html.php deleted file mode 100644 index 1401800464..0000000000 --- a/module/project/view/taskdata.html.php +++ /dev/null @@ -1,211 +0,0 @@ - - * @package project - * @version $Id$ - * @link http://www.zentao.net - */ -?> - - -
-
+
createLink('story', 'view', "story=$story->id", '', true), $story->title, '', 'class="kanbanFrame" title="' . $story->title . '"');?>
@@ -80,10 +79,10 @@ $account = $this->app->user->account
diff --git a/module/story/control.php b/module/story/control.php index f7d6a5b7e4..ae815aba81 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -933,9 +933,11 @@ class story extends control $storyIDList = array_unique($storyIDList); $allChanges = $this->story->batchChangeStage($storyIDList, $stage); if(dao::isError()) die(js::error(dao::getError())); + + $action = $stage == 'verified' ? 'Verified' : 'Edited'; foreach($allChanges as $storyID => $changes) { - $actionID = $this->action->create('story', $storyID, 'Edited'); + $actionID = $this->action->create('story', $storyID, $action); $this->action->logHistory($actionID, $changes); $this->story->sendmail($storyID, $actionID); } From 99bd7ed90961e1cb5ced3873360308e4159cdbec Mon Sep 17 00:00:00 2001 From: wangyidong Date: Thu, 2 Nov 2017 14:28:02 +0800 Subject: [PATCH 2/8] * finish task #3289. --- module/project/control.php | 16 +++++----------- module/project/js/story.js | 9 ++++++++- module/project/model.php | 1 + module/project/view/story.html.php | 12 ++++++------ module/story/model.php | 5 +++-- module/tutorial/model.php | 18 ++++++++++-------- 6 files changed, 33 insertions(+), 28 deletions(-) diff --git a/module/project/control.php b/module/project/control.php index 18d557a42c..3fa6459aa6 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -530,7 +530,7 @@ class project extends control * @access public * @return void */ - public function story($projectID = 0, $orderBy = 'order', $type = 'byModule', $param = 0, $recTotal = 0, $recPerPage = 50, $pageID = 1) + public function story($projectID = 0, $orderBy = 'order_desc', $type = 'byModule', $param = 0, $recTotal = 0, $recPerPage = 50, $pageID = 1) { /* Load these models. */ $this->loadModel('story'); @@ -2010,17 +2010,11 @@ class project extends control $idList = explode(',', trim($this->post->storys, ',')); $orderBy = $this->post->orderBy; - $stories = $this->dao->select('story,`order`')->from(TABLE_PROJECTSTORY)->alias('t1') - ->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story=t2.id') - ->where('t1.story')->in($idList) - ->andWhere('t1.project')->eq($projectID) - ->orderBy($orderBy) - ->fetchPairs('order', 'story'); - foreach($stories as $order => $id) + $order = $this->dao->select('*')->from(TABLE_PROJECTSTORY)->where('story')->in($idList)->andWhere('project')->eq($projectID)->orderBy('order_asc')->fetch('order'); + foreach($idList as $storyID) { - $newID = array_shift($idList); - if($id == $newID) continue; - $this->dao->update(TABLE_PROJECTSTORY)->set('`order`')->eq($order)->where('story')->eq($newID)->andWhere('project')->eq($projectID)->exec(); + $this->dao->update(TABLE_PROJECTSTORY)->set('`order`')->eq($order)->where('story')->eq($storyID)->andWhere('project')->eq($projectID)->exec(); + $order++; } } diff --git a/module/project/js/story.js b/module/project/js/story.js index 08d74073cb..d28778aae3 100644 --- a/module/project/js/story.js +++ b/module/project/js/story.js @@ -6,7 +6,14 @@ $(function() { var list = ''; for(i = 0; i < data.list.length; i++) list += $(data.list[i]).attr('data-id') + ','; - $.post(createLink('project', 'storySort', 'projectID=' + projectID), {'storys' : list, 'orderBy' : orderBy}); + $.post(createLink('project', 'storySort', 'projectID=' + projectID), {'storys' : list, 'orderBy' : orderBy}, function() + { + var $target = $(data.element[0]); + $target.hide(); + $target.fadeIn(1000); + order = 'order_asc' + history.pushState({}, 0, createLink('project', 'story', "projectID=" + projectID + '&orderBy=' + order)); + }); }); fixedTfootAction('#projectStoryForm'); diff --git a/module/project/model.php b/module/project/model.php index 23bdf207fa..c4fdf44a39 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -2314,6 +2314,7 @@ class projectModel extends model ->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story = t2.id') ->where('t1.project')->eq((int)$projectID) ->andWhere('t2.deleted')->eq(0) + ->orderBy('t1.`order`_desc') ->fetchAll(); $storyGroups = array(); foreach($stories as $story) $storyGroups[$story->product][$story->module][$story->id] = $story; diff --git a/module/project/view/story.html.php b/module/project/view/story.html.php index b416ef606e..8cc879670d 100644 --- a/module/project/view/story.html.php +++ b/module/project/view/story.html.php @@ -64,6 +64,9 @@
idAB);?> project->updateOrder);?> priAB);?> story->title);?> openedByAB);?>story->bugCountAB;?> story->caseCountAB;?> actions;?> project->updateOrder);?>
story->priList, $story->pri, $story->pri)?>'>story->priList, $story->pri, $story->pri);?> product][$story->branch])) echo "" . $branchGroups[$story->product][$story->branch] . '';?> @@ -154,9 +157,6 @@ } ?>
- - - task->$type;?> - project->totalEstimate;?> project->totalConsumed;?> project->totalLeft;?>project->progess;?>project->progress;?> project->burn;?> project->updateOrder);?>
- - - - - - - - - cookie->windowWidth > $this->config->wideSize):?> - - - - - - - - cookie->windowWidth > $this->config->wideSize):?> - - - - - - - - - - type == 'sprint'): ?> - - - - - - - - - - - assignedTo == $app->user->account ? 'style=color:red' : ''; ?> - - - - - - - - cookie->windowWidth > $this->config->wideSize):?> - - - - - - - cookie->windowWidth > $this->config->wideSize):?> - - - - - - - - type == 'sprint') - { - echo ''; - } - ?> - - - children):?> - children as $child):?> - assignedTo == $app->user->account ? 'style=color:red' : ''; ?> - - - - - - - - cookie->windowWidth > $this->config->wideSize):?> - - - - - - - cookie->windowWidth > $this->config->wideSize):?> - - - - - - - - type == 'sprint') - { - echo ''; - } - ?> - - - - - - - From 500139efde90c633c62141b5fc101281b0373f13 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Thu, 2 Nov 2017 16:11:59 +0800 Subject: [PATCH 7/8] * fix error for projectblock. --- module/block/view/projectblock.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/block/view/projectblock.html.php b/module/block/view/projectblock.html.php index 66bddacff9..e6858c71e0 100644 --- a/module/block/view/projectblock.html.php +++ b/module/block/view/projectblock.html.php @@ -23,7 +23,7 @@ - + From 04cab43447f17721fd8d9683180990d83fb9072b Mon Sep 17 00:00:00 2001 From: wangyidong Date: Thu, 2 Nov 2017 16:14:36 +0800 Subject: [PATCH 8/8] =?UTF-8?q?Finish=20task#3304=20=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E6=8A=A5=E5=91=8A=E4=B8=89=E8=A7=92=E5=9B=BE=E6=A0=87=E6=94=B9?= =?UTF-8?q?=E4=B8=80=E4=B8=8B=E4=BD=BF=E7=94=A8info=E5=9B=BE=E6=A0=87,cost?= =?UTF-8?q?:0.2=20left:0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/testreport/lang/en.php | 6 +++--- module/testreport/lang/zh-cn.php | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/module/testreport/lang/en.php b/module/testreport/lang/en.php index e8d745527e..9f5a688bac 100644 --- a/module/testreport/lang/en.php +++ b/module/testreport/lang/en.php @@ -64,8 +64,8 @@ $lang->testreport->fromCaseBugTip= "Bug created after failure of use case in tes $lang->testreport->errorTrunk = "The trunk version cannot create a test report. Please modify the associated version!"; $lang->testreport->bugSummary = <<%s Bug(s) generated in total , -%s Bug(s) remained unresolve , -%s Bug(s) failure of case . +%s Bug(s) generated in total , +%s Bug(s) remained unresolve , +%s Bug(s) failure of case testreport->fromCaseBugTip= "测试时间范围内,用例执行失败 $lang->testreport->errorTrunk = "主干版本不能创建测试报告,请修改关联版本!"; $lang->testreport->bugSummary = <<%s个Bug , -遗留%s个Bug 。 -用例执行产生%s个Bug 。 +共发现%s个Bug , +遗留%s个Bug 。 +用例执行产生%s个Bug 。 有效Bug率(方案为已解决或延期 / 状态为已解决或已关闭):%s,用例发现Bug率(用例创建的Bug / 发现Bug数):%s EOD;
idAB);?> priAB);?> task->name);?> statusAB);?> task->deadlineAB);?> task->openedDateAB);?> task->assignedToAB);?> task->finishedByAB);?> task->finishedDateAB);?> task->estimateAB);?> task->consumedAB);?> task->leftAB);?>task->progess;?>task->story); ?>actions;?>
- - id", sprintf('%03d', $task->id))) printf('%03d', $task->id);?> - task->priList, $task->pri, $task->pri)?>'>pri == '0' ? '' : zget($lang->task->priList, $task->pri, $task->pri);?> - product][$task->branch])) echo "" . $branchGroups[$task->product][$task->branch] . '';?> - module) echo "" . $modulePairs[$task->module] . '';?> - id", $task->name, null, "style='color: $task->color'")) echo $task->name; - if($task->fromBug) echo html::a($this->createLink('bug', 'view', "id=$task->fromBug"), "[BUG#$task->fromBug]", '_blank', "class='bug'"); - ?> - - storyStatus == 'active' and $task->latestStoryVersion > $task->storyVersion); - if($storyChanged) - { - echo "({$lang->story->changed} "; - echo html::a($this->createLink('task', 'confirmStoryChange', "taskID=$task->id"), $lang->confirm, 'hiddenwin'); - echo ")"; - } - else - { - echo $lang->task->statusList[$task->status]; - } - ?> - deadline, 0, 4) > 0) echo substr($task->deadline, 5, 6);?>openedDate, 5, 6);?>>assignedTo == 'closed' ? 'Closed' : zget($users, $task->assignedTo, $task->assignedTo);?>finishedBy, $task->finishedBy);?>finishedDate, 5, 6);?>estimate;?>consumed;?>left;?>progess?>%'; - if($task->storyID) - { - if(!common::printLink('story', 'view', "storyid=$task->storyID", $task->storyTitle)) print $task->storyTitle; - } - echo ' - project&taskID=$task->id", $task, 'list', '', '', 'iframe', true); - common::printIcon('task', 'start', "taskID=$task->id", $task, 'list', '', '', 'iframe', true); - - common::printIcon('task', 'recordEstimate', "taskID=$task->id", $task, 'list', 'time', '', 'iframe', true); - if($browseType == 'needconfirm') - { - $lang->task->confirmStoryChange = $lang->confirm; - common::printIcon('task', 'confirmStoryChange', "taskid=$task->id", '', 'list', '', 'hiddenwin'); - } - common::printIcon('task', 'finish', "taskID=$task->id", $task, 'list', '', '', 'iframe', true); - common::printIcon('task', 'close', "taskID=$task->id", $task, 'list', '', '', 'iframe', true); - common::printIcon('task', 'edit', "taskID=$task->id", $task, 'list'); - common::printIcon('task', 'batchCreate', "project=$projectID&storyID=&moduleID=$moduleID&taskID=$task->id", $task, 'list','plus','','','','',$lang->task->children); - ?> -
- - id", sprintf('%03d', $child->id))) printf('%03d', $child->id);?> - task->priList, $child->pri, $child->pri)?>'>pri == '0' ? '' : zget($lang->task->priList, $child->pri, $child->pri);?> - product][$child->branch])) echo "" . $branchGroups[$child->product][$child->branch] . '';?> - module) echo "" . $modulePairs[$child->module] . '';?> - id", $child->name, null, "style='color: $child->color'")) echo $child->name; - if($child->fromBug) echo html::a($this->createLink('bug', 'view', "id=$child->fromBug"), "[BUG#$child->fromBug]", '_blank', "class='bug'"); - ?> - - storyStatus == 'active' and $child->latestStoryVersion > $child->storyVersion); - if($storyChanged) - { - echo "({$lang->story->changed} "; - echo html::a($this->createLink('task', 'confirmStoryChange', "taskID=$child->id"), $lang->confirm, 'hiddenwin'); - echo ")"; - } - else - { - echo $lang->task->statusList[$child->status]; - } - ?> - deadline, 0, 4) > 0) echo substr($child->deadline, 5, 6);?>openedDate, 5, 6);?>>assignedTo == 'closed' ? 'Closed' : zget($users, $child->assignedTo, $child->assignedTo);?>finishedBy, $child->finishedBy);?>finishedDate, 5, 6);?>estimate;?>consumed;?>left;?>progess?>%'; - if($child->storyID) - { - if(!common::printLink('story', 'view', "storyid=$child->storyID", $child->storyTitle)) print $child->storyTitle; - } - echo ' - project&taskID=$child->id", $child, 'list', '', '', 'iframe', true); - common::printIcon('task', 'start', "taskID=$child->id", $child, 'list', '', '', 'iframe', true); - - common::printIcon('task', 'recordEstimate', "taskID=$child->id", $child, 'list', 'time', '', 'iframe', true); - if($browseType == 'needconfirm') - { - $lang->task->confirmStoryChange = $lang->confirm; - common::printIcon('task', 'confirmStoryChange', "taskid=$child->id", '', 'list', '', 'hiddenwin'); - } - common::printIcon('task', 'finish', "taskID=$child->id", $child, 'list', '', '', 'iframe', true); - common::printIcon('task', 'close', "taskID=$child->id", $child, 'list', '', '', 'iframe', true); - common::printIcon('task', 'edit', "taskID=$child->id", $child, 'list'); - common::printIcon('task', 'batchCreate', "", $child, 'list','plus','','','','',$lang->task->children); - ?> -
project->totalEstimate;?> project->totalConsumed;?> project->totalLeft;?>project->progess;?>project->progress;?> project->burn;?>