diff --git a/module/bug/model.php b/module/bug/model.php
index 80e39b2e9a..db9a72d2e1 100644
--- a/module/bug/model.php
+++ b/module/bug/model.php
@@ -969,6 +969,7 @@ class bugModel extends model
$this->config->bug->search['params']['plan']['values'] = $this->loadModel('productplan')->getPairs($productID);
$this->config->bug->search['params']['module']['values'] = $this->loadModel('tree')->getOptionMenu($productID, $viewType = 'bug', $startModuleID = 0);
$this->config->bug->search['params']['project']['values'] = $this->product->getProjectPairs($productID);
+ $this->config->bug->search['params']['severity']['values'] = array(0 => '') + $this->lang->bug->severityList; //Fix bug #939.
$this->config->bug->search['params']['openedBuild']['values'] = $this->loadModel('build')->getProductBuildPairs($productID, 0, $params = '');
$this->config->bug->search['params']['resolvedBuild']['values'] = $this->config->bug->search['params']['openedBuild']['values'];
if($this->session->currentProductType == 'normal')
diff --git a/module/custom/control.php b/module/custom/control.php
index d1048e3fc0..f952e328a3 100644
--- a/module/custom/control.php
+++ b/module/custom/control.php
@@ -88,8 +88,11 @@ class custom extends control
$value = $_POST['values'][$index];
$system = $_POST['systems'][$index];
- //Fix bug #951.
- //if(!$system and (!$value or !$key)) continue;
+ //if(!$system and (!$value or !$key)) continue; //Fix bug #951.
+
+ /* Fix bug #942. */
+ if($field == 'priList' and !is_numeric($key)) die(js::alert($this->lang->custom->notice->priListKey));
+ if($module == 'bug' and $field == 'severityList' and !is_numeric($key)) die(js::alert($this->lang->custom->notice->severityListKey));
/* the length of role is 20, check it when save. */
if($module == 'user' and $field == 'roleList' and strlen($key) > 20) die(js::alert($this->lang->custom->notice->userRole));
diff --git a/module/custom/lang/en.php b/module/custom/lang/en.php
index 659759db6e..61b233a36b 100644
--- a/module/custom/lang/en.php
+++ b/module/custom/lang/en.php
@@ -69,10 +69,12 @@ $lang->custom->allLang = 'All Language';
$lang->custom->confirmRestore = 'Do you want to reset to Default?';
$lang->custom->notice = new stdclass();
-$lang->custom->notice->userRole = 'Key must be no more than 20 characters!';
-$lang->custom->notice->canNotAdd = 'This item will be processed, so customized feature is not enabled.';
-$lang->custom->notice->forceReview = 'Review is required for stories submitted by certain assignee.';
-$lang->custom->notice->longlife = 'List "Undone" bugs that are older than hold days from "Longlife" bugs.';
+$lang->custom->notice->userRole = 'Key must be no more than 20 characters!';
+$lang->custom->notice->canNotAdd = 'This item will be processed, so customized feature is not enabled.';
+$lang->custom->notice->forceReview = 'Review is required for stories submitted by certain assignee.';
+$lang->custom->notice->longlife = 'List "Undone" bugs that are older than hold days from "Longlife" bugs.';
+$lang->custom->notice->priListKey = 'Priority list key should be numbers!';
+$lang->custom->notice->severityListKey = 'Bug severity list key should be numbers.';
$lang->custom->notice->indexPage['product'] = "ZenTao 8.2+ has Product Homepage. Do you want to enter Product Homepage?";
$lang->custom->notice->indexPage['project'] = "ZenTao 8.2+ has Project Homepage. Do you want to enter Project Homepage?";
$lang->custom->notice->indexPage['qa'] = "ZenTao 8.2+ has Testing Homepage. Do you want to enter Testing Homepage?";
diff --git a/module/custom/lang/zh-cn.php b/module/custom/lang/zh-cn.php
index 00b2aba1c4..a3860fdc60 100644
--- a/module/custom/lang/zh-cn.php
+++ b/module/custom/lang/zh-cn.php
@@ -69,10 +69,12 @@ $lang->custom->allLang = '适用所有语言';
$lang->custom->confirmRestore = '是否要恢复默认配置?';
$lang->custom->notice = new stdclass();
-$lang->custom->notice->userRole = '键的长度必须小于20个字符!';
-$lang->custom->notice->canNotAdd = '该项参与运算,不提供自定义添加功能';
-$lang->custom->notice->forceReview = '指定人提交的需求必须评审。';
-$lang->custom->notice->longlife = 'Bug列表页面的久未处理标签中,列出设置天数之前未处理的Bug。';
+$lang->custom->notice->userRole = '键的长度必须小于20个字符!';
+$lang->custom->notice->canNotAdd = '该项参与运算,不提供自定义添加功能';
+$lang->custom->notice->forceReview = '指定人提交的需求必须评审。';
+$lang->custom->notice->longlife = 'Bug列表页面的久未处理标签中,列出设置天数之前未处理的Bug。';
+$lang->custom->notice->priListKey = '优先级的键应当为数字!';
+$lang->custom->notice->severityListKey = 'Bug严重程度的键应当为数字!';
$lang->custom->notice->indexPage['product'] = "从8.2版本起增加了产品主页视图,是否默认进入产品主页?";
$lang->custom->notice->indexPage['project'] = "从8.2版本起增加了项目主页视图,是否默认进入项目主页?";
$lang->custom->notice->indexPage['qa'] = "从8.2版本起增加了测试主页视图,是否默认进入测试主页?";
diff --git a/module/search/model.php b/module/search/model.php
index fd22b3b8f4..2381c2d8a0 100644
--- a/module/search/model.php
+++ b/module/search/model.php
@@ -193,7 +193,7 @@ class searchModel extends model
if($hasUser)
{
- $users = $this->loadModel('user')->getPairs('realname');
+ $users = $this->loadModel('user')->getPairs('realname|noclosed');
$users['$@me'] = $this->lang->search->me;
}
if($hasProduct) $products = array('' => '') + $this->loadModel('product')->getPairs();
diff --git a/module/story/control.php b/module/story/control.php
index 7e2a3e96f5..204b75f5af 100644
--- a/module/story/control.php
+++ b/module/story/control.php
@@ -1364,10 +1364,12 @@ class story extends control
$story->spec = htmlspecialchars_decode($story->spec);
$story->spec = str_replace("
", "\n", $story->spec);
$story->spec = str_replace('"', '""', $story->spec);
+ $story->spec = str_replace(' ', ' ', $story->spec);
$story->verify = htmlspecialchars_decode($story->verify);
$story->verify = str_replace("
", "\n", $story->verify);
$story->verify = str_replace('"', '""', $story->verify);
+ $story->verify = str_replace(' ', ' ', $story->verify);
}
/* fill some field with useful value. */
if(isset($products[$story->product])) $story->product = $products[$story->product] . "(#$story->product)";
diff --git a/module/task/model.php b/module/task/model.php
index 6f1a8ec2f7..7817f8ff99 100644
--- a/module/task/model.php
+++ b/module/task/model.php
@@ -22,8 +22,8 @@ class taskModel extends model
*/
public function create($projectID)
{
- $tasksID = array();
- $taskFile = '';
+ $tasksID = array();
+ $taskFiles = array();
$this->loadModel('file');
$task = fixer::input('post')
->add('project', (int)$projectID)
@@ -71,16 +71,19 @@ class taskModel extends model
$taskID = $this->dao->lastInsertID();
if($this->post->story) $this->loadModel('story')->setStage($this->post->story);
$this->file->updateObjectID($this->post->uid, $taskID, 'task');
- if(!empty($taskFile))
+ if(!empty($taskFiles))
{
- $taskFile->objectID = $taskID;
- $this->dao->insert(TABLE_FILE)->data($taskFile)->exec();
+ foreach($taskFiles as $taskFile)
+ {
+ $taskFile->objectID = $taskID;
+ $this->dao->insert(TABLE_FILE)->data($taskFile)->exec();
+ }
}
else
{
$taskFileTitle = $this->file->saveUpload('task', $taskID);
- $taskFile = $this->dao->select('*')->from(TABLE_FILE)->where('id')->eq(key($taskFileTitle))->fetch();
- unset($taskFile->id);
+ $taskFiles = $this->dao->select('*')->from(TABLE_FILE)->where('id')->in(array_keys($taskFileTitle))->fetchAll('id');
+ foreach($taskFiles as $fileID => $taskFile) unset($taskFiles[$fileID]->id);
}
$tasksID[$assignedTo] = array('status' => 'created', 'id' => $taskID);
}
diff --git a/module/testcase/model.php b/module/testcase/model.php
index ce63c620db..02885e59dc 100644
--- a/module/testcase/model.php
+++ b/module/testcase/model.php
@@ -800,6 +800,7 @@ class testcaseModel extends model
$caseData->type = $data->type[$key];
$caseData->status = $data->status[$key];
$caseData->stage = join(',', $data->stage[$key]);
+ $caseData->keywords = $data->keywords[$key];
$caseData->frequency = 1;
$caseData->precondition = $data->precondition[$key];
diff --git a/module/testcase/view/showimport.html.php b/module/testcase/view/showimport.html.php
index dd0e6bb837..0272e87649 100644
--- a/module/testcase/view/showimport.html.php
+++ b/module/testcase/view/showimport.html.php
@@ -14,6 +14,7 @@
testcase->type?> |
testcase->status?> |
testcase->stage?> |
+ testcase->keywords?> |
testcase->precondition?> |
@@ -51,14 +52,15 @@
| testcase->typeList, !empty($case->type) ? $case->type : (!empty($case->id) ? $cases[$case->id]->type : ''), "class='form-control'")?> |
testcase->statusList, !empty($case->status) ? $case->status : (!empty($case->id) ? $cases[$case->id]->status : 'normal'), "class='form-control'")?> |
testcase->stageList, !empty($case->stage) ? $case->stage : (!empty($case->id) ? $cases[$case->id]->stage : ''), "multiple='multiple' class='form-control chosen'")?> |
- precondition) ? $case->precondition : "", "class='form-control'")?> |
+ keywords) ? $case->keywords : "", "class='form-control'")?> |
+ precondition) ? htmlspecialchars($case->precondition) : "", "class='form-control'")?> |
| |