diff --git a/module/block/model.php b/module/block/model.php
index 31010c5ee3..ea26ca8e64 100644
--- a/module/block/model.php
+++ b/module/block/model.php
@@ -162,14 +162,12 @@ class blockModel extends model
$data['stories'] = (int)$this->dao->select('count(*) AS count')->from(TABLE_STORY)->where('assignedTo')->eq($this->app->user->account)->andWhere('deleted')->eq(0)->fetch('count');
$data['projects'] = (int)$this->dao->select('count(*) AS count')->from(TABLE_PROJECT)
->where("(status='wait' or status='doing')")
- ->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->projects)
- ->fi()
+ ->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->projects)->fi()
->andWhere('deleted')->eq(0)
->fetch('count');
$data['products'] = (int)$this->dao->select('count(*) AS count')->from(TABLE_PRODUCT)
->where('status')->ne('closed')
- ->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->products)
- ->fi()
+ ->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->products)->fi()
->andWhere('deleted')->eq(0)
->fetch('count');
@@ -190,8 +188,7 @@ class blockModel extends model
->fetch('count');
$data['delayProject'] = (int)$this->dao->select('count(*) AS count')->from(TABLE_PROJECT)
->where('status')->in('wait,doing')
- ->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->projects)
- ->fi()
+ ->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->projects)->fi()
->andWhere('end')->lt($today)
->andWhere('deleted')->eq(0)
->fetch('count');
diff --git a/module/bug/model.php b/module/bug/model.php
index e4c295402a..c77772e9b7 100644
--- a/module/bug/model.php
+++ b/module/bug/model.php
@@ -2471,6 +2471,10 @@ class bugModel extends model
$class .= ' text-left';
$title = "title='{$bug->title}'";
}
+ if($id == 'type')
+ {
+ $title = "title='" . zget($this->lang->bug->typeList, $bug->type) . "'";
+ }
if($id == 'assignedTo')
{
$class .= ' has-btn text-left';
diff --git a/module/product/view/browse.html.php b/module/product/view/browse.html.php
index 15ec523d71..89f37e7966 100644
--- a/module/product/view/browse.html.php
+++ b/module/product/view/browse.html.php
@@ -401,7 +401,7 @@ $(function()
}
var data = $row.data();
checkedEstimate += data.estimate;
- checkedCase += data.cases;
+ if(data.cases > 0) checkedCase += 1;
});
var rate = Math.round(checkedCase / checkedTotal * 10000) / 100 + '' + '%';
return checkedSummary.replace('%total%', checkedTotal)
diff --git a/module/project/lang/zh-cn.php b/module/project/lang/zh-cn.php
index de4b8db9bb..4aa18fc800 100644
--- a/module/project/lang/zh-cn.php
+++ b/module/project/lang/zh-cn.php
@@ -302,7 +302,7 @@ $lang->project->featureBar['task']['unclosed'] = $lang->project->unclosed;
$lang->project->featureBar['task']['assignedtome'] = $lang->project->assignedToMe;
$lang->project->featureBar['task']['myinvolved'] = $lang->project->myInvolved;
$lang->project->featureBar['task']['delayed'] = '已延期';
-$lang->project->featureBar['task']['needconfirm'] = '需求变动';
+$lang->project->featureBar['task']['needconfirm'] = '需求变更';
$lang->project->featureBar['task']['status'] = $lang->project->statusSelects[''];
$lang->project->treeLevel = array();
diff --git a/module/report/model.php b/module/report/model.php
index 0c58fe8ed6..5253853775 100644
--- a/module/report/model.php
+++ b/module/report/model.php
@@ -93,6 +93,7 @@ class reportModel extends model
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')
->where('t1.status')->ne('cancel')
->andWhere('t1.deleted')->eq(0)
+ ->beginIF(!$this->app->user->admin)->andWhere('t2.id')->in($this->app->user->view->projects)->fi()
->andWhere('t2.deleted')->eq(0)
->andWhere('t1.parent')->eq(0)
->andWhere('t2.status')->eq('closed')
@@ -131,6 +132,7 @@ class reportModel extends model
$products = $this->dao->select('id, code, name, PO')->from(TABLE_PRODUCT)
->where('deleted')->eq(0)
->beginIF(strpos($conditions, 'closedProduct') === false)->andWhere('status')->ne('closed')->fi()
+ ->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->products)->fi()
->fetchAll('id');
$plans = $this->dao->select('*')->from(TABLE_PRODUCTPLAN)->where('deleted')->eq(0)->andWhere('product')->in(array_keys($products))
->beginIF(strpos($conditions, 'overduePlan') === false)->andWhere('end')->gt(date('Y-m-d'))->fi()
diff --git a/module/testcase/js/batchcreate.js b/module/testcase/js/batchcreate.js
index 6ce0166461..b9b48f46aa 100644
--- a/module/testcase/js/batchcreate.js
+++ b/module/testcase/js/batchcreate.js
@@ -23,7 +23,7 @@ $(document).ready(function()
}
}
}
- link = createLink('story', 'ajaxGetProductStories', 'productID=' + productID + '&branch=' + branch + '&moduleID=' + module + '&storyID='+ $(select).val() + '&onlyOption=true&status=noclosed');
+ link = createLink('story', 'ajaxGetProductStories', 'productID=' + productID + '&branch=' + branch + '&moduleID=' + module + '&storyID='+ $(select).val() + '&onlyOption=true');
$('#story' + index).load(link, function(){$(this).trigger("chosen:updated");});
}
if($(select).val() == 'ditto')
diff --git a/module/todo/js/common.js b/module/todo/js/common.js
index 8a93301c81..d2afa91671 100644
--- a/module/todo/js/common.js
+++ b/module/todo/js/common.js
@@ -42,18 +42,17 @@ function loadList(type, id)
{
$.get(link, function(data, status)
{
- if(data != ' ')
+ if(data.length != 0)
{
$(divClass).html(data).find('select').chosen();
}
else
{
- $("#type").val("custom");
- $(divClass).html("").find('select').chosen();
+ $(divClass).html("").find('select').chosen();
}
});
}
- else if(type == 'custom')
+ else
{
$(divClass).html($(divID).html());
}