Merge branch 'master' of github.com:easysoft/zentaopms
This commit is contained in:
@@ -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')
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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?";
|
||||
|
||||
@@ -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版本起增加了测试主页视图,是否默认进入测试主页?";
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -1364,10 +1364,12 @@ class story extends control
|
||||
$story->spec = htmlspecialchars_decode($story->spec);
|
||||
$story->spec = str_replace("<br />", "\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("<br />", "\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)";
|
||||
|
||||
+10
-7
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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];
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
<th class='w-100px'><?php echo $lang->testcase->type?></th>
|
||||
<th class='w-100px'><?php echo $lang->testcase->status?></th>
|
||||
<th><?php echo $lang->testcase->stage?></th>
|
||||
<th class='w-80px'><?php echo $lang->testcase->keywords?></th>
|
||||
<th><?php echo $lang->testcase->precondition?></th>
|
||||
<th class='w-300px'>
|
||||
<table class='w-p100 table-borderless'>
|
||||
@@ -51,14 +52,15 @@
|
||||
<td><?php echo html::select("type[$key]", $lang->testcase->typeList, !empty($case->type) ? $case->type : (!empty($case->id) ? $cases[$case->id]->type : ''), "class='form-control'")?></td>
|
||||
<td><?php echo html::select("status[$key]", $lang->testcase->statusList, !empty($case->status) ? $case->status : (!empty($case->id) ? $cases[$case->id]->status : 'normal'), "class='form-control'")?></td>
|
||||
<td class='text-left' style='overflow:visible'><?php echo html::select("stage[$key][]", $lang->testcase->stageList, !empty($case->stage) ? $case->stage : (!empty($case->id) ? $cases[$case->id]->stage : ''), "multiple='multiple' class='form-control chosen'")?></td>
|
||||
<td><?php echo html::textarea("precondition[$key]", isset($case->precondition) ? $case->precondition : "", "class='form-control'")?></td>
|
||||
<td><?php echo html::input("keywords[$key]", isset($case->keywords) ? $case->keywords : "", "class='form-control'")?></td>
|
||||
<td><?php echo html::textarea("precondition[$key]", isset($case->precondition) ? htmlspecialchars($case->precondition) : "", "class='form-control'")?></td>
|
||||
<td>
|
||||
<?php if(isset($stepData[$key]['desc'])):?>
|
||||
<table class='w-p100 bd-0'>
|
||||
<?php foreach($stepData[$key]['desc'] as $id => $desc):?>
|
||||
<tr>
|
||||
<td><?php echo html::textarea("desc[$key][$id]", $desc, "class='form-control'")?></td>
|
||||
<td><?php echo html::textarea("expect[$key][$id]", isset($stepData[$key]['expect'][$id]) ? $stepData[$key]['expect'][$id] : '', "class='form-control'")?></td>
|
||||
<td><?php echo html::textarea("desc[$key][$id]", htmlspecialchars($desc), "class='form-control'")?></td>
|
||||
<td><?php echo html::textarea("expect[$key][$id]", isset($stepData[$key]['expect'][$id]) ? htmlspecialchars($stepData[$key]['expect'][$id]) : '', "class='form-control'")?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user