From 399ad7fcac665e91d87417a597b2a93aed6c5b43 Mon Sep 17 00:00:00 2001 From: chenfeiCF Date: Tue, 20 Dec 2016 19:27:48 +0800 Subject: [PATCH 1/5] * fix colspan for product browse method. --- module/product/view/browse.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/product/view/browse.html.php b/module/product/view/browse.html.php index 5344eed959..77c806c409 100644 --- a/module/product/view/browse.html.php +++ b/module/product/view/browse.html.php @@ -109,7 +109,7 @@ ?> - +
From e0b2e258d5a6c29d534a305bf28f55f2be034578 Mon Sep 17 00:00:00 2001 From: chenfeiCF Date: Tue, 20 Dec 2016 19:40:08 +0800 Subject: [PATCH 2/5] * finish task #2809. --- module/story/view/tasks.html.php | 9 +++++++-- module/task/model.php | 21 ++++++++++++++++++++- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/module/story/view/tasks.html.php b/module/story/view/tasks.html.php index 5822d635ab..4e254fd20e 100644 --- a/module/story/view/tasks.html.php +++ b/module/story/view/tasks.html.php @@ -1,4 +1,7 @@ - +
icons['report']);?> @@ -10,7 +13,7 @@ - + @@ -18,6 +21,7 @@ + @@ -31,6 +35,7 @@ + diff --git a/module/task/model.php b/module/task/model.php index f2b7de368c..6f1a8ec2f7 100644 --- a/module/task/model.php +++ b/module/task/model.php @@ -989,12 +989,31 @@ class taskModel extends model */ public function getStoryTasks($storyID, $projectID = 0) { - return $this->dao->select('id, name, assignedTo, pri, status, estimate, consumed, `left`') + $tasks = $this->dao->select('id, name, assignedTo, pri, status, estimate, consumed, `left`') ->from(TABLE_TASK) ->where('story')->eq((int)$storyID) ->andWhere('deleted')->eq(0) ->beginIF($projectID)->andWhere('project')->eq($projectID)->fi() ->fetchAll('id'); + + foreach($tasks as $task) + { + /* Compute task progess. */ + if($task->consumed == 0 and $task->left == 0) + { + $task->progess = 0; + } + elseif($task->consumed != 0 and $task->left == 0) + { + $task->progess = 100; + } + else + { + $task->progess = round($task->consumed / ($task->consumed + $task->left), 2) * 100; + } + } + + return $tasks; } /** From 22b9aeae2b3b8a94de5b50487bd6619580a14763 Mon Sep 17 00:00:00 2001 From: chenfeiCF Date: Wed, 21 Dec 2016 09:03:55 +0800 Subject: [PATCH 3/5] * code for task #2808. --- module/project/control.php | 2 +- module/project/view/importbug.html.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module/project/control.php b/module/project/control.php index 8809a6e7af..d333791e5d 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -387,7 +387,7 @@ class project extends control foreach($mails as $mail) $this->task->sendmail($mail->taskID, $mail->actionID); /* Locate the browser. */ - die(js::locate($this->createLink('project', 'importBug', "projectID=$projectID"), 'parent')); + die(js::locate($this->createLink('project', 'task', "projectID=$projectID"), 'parent')); } /* Set browseType, productID, moduleID and queryID. */ diff --git a/module/project/view/importbug.html.php b/module/project/view/importbug.html.php index c0c9ec3ffa..0dbe1ee4c7 100755 --- a/module/project/view/importbug.html.php +++ b/module/project/view/importbug.html.php @@ -49,7 +49,7 @@ var browseType = ''; - + From 778b70e8149e912edfbbe9310c62fbe115d073e5 Mon Sep 17 00:00:00 2001 From: chenfeiCF Date: Wed, 21 Dec 2016 09:21:21 +0800 Subject: [PATCH 4/5] * code for task #2808: adjust style if select rows. --- www/theme/default/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/theme/default/style.css b/www/theme/default/style.css index 6ff42c5c6e..42c137e7f6 100644 --- a/www/theme/default/style.css +++ b/www/theme/default/style.css @@ -117,7 +117,7 @@ hr.small {margin: 10px 0} .table caption {padding: 8px 20px; border: 1px solid #DDD; border-bottom: 0; background: #fafafa;} .table.table-condensed caption {padding: 6px 15px;} -.table td.td-has-control {padding: 2px 4px;} +.table td.td-has-control {padding: 2px 4px; background-color: white!important} /* Datepicker */ .datepicker-wrapper {position: relative; cursor: pointer;} From cac3e5cc76d93052e4e56d8afa97a1308a8265d4 Mon Sep 17 00:00:00 2001 From: chenfeiCF Date: Wed, 21 Dec 2016 10:31:32 +0800 Subject: [PATCH 5/5] * finish task #2811. --- module/story/config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/story/config.php b/module/story/config.php index 6857e06ee5..8859b99fa8 100644 --- a/module/story/config.php +++ b/module/story/config.php @@ -47,7 +47,7 @@ $config->story->custom->batchCreateFields = 'module,plan,spec,pri,estimate,revie $config->story->custom->batchEditFields = 'module,plan,estimate,pri,source,stage,closedBy,closedReason'; $config->story->datatable = new stdclass(); -$config->story->datatable->defaultField = array('id', 'pri', 'title', 'plan', 'source', 'openedBy', 'assignedTo', 'estimate', 'status', 'stage', 'actions'); +$config->story->datatable->defaultField = array('id', 'pri', 'title', 'plan', 'source', 'openedBy', 'assignedTo', 'estimate', 'status', 'stage', 'taskCount', 'bugCount', 'caseCount', 'actions'); $config->story->datatable->fieldList['id']['title'] = 'idAB'; $config->story->datatable->fieldList['id']['fixed'] = 'left';
idAB;?> idAB;?> task->name;?> priAB;?> statusAB;?> task->estimateAB;?> task->consumedAB;?> task->leftAB;?> task->progess;?>
estimate;?> consumed;?> left;?>
id", $bug->title, '', "class='preview'", true, true);?> bug->statusList[$bug->status];?> id]", $lang->task->priList, 3, "class='input-sm form-control'");?>id]", $users, zget($users, $bug->assignedTo, '', $bug->assignedTo), "class='input-sm form-control chosen'");?>id]", $users, zget($users, $bug->assignedTo, '', $bug->assignedTo), "class='input-sm form-control chosen'");?> id]", '', 'size=4 class="input-sm form-control"');?>