Merge branch 'master' of https://github.com/easysoft/zentaopms
This commit is contained in:
@@ -99,6 +99,7 @@ $filter->webhook->bind = new stdclass();
|
||||
$filter->bug->batchcreate->cookie['preBranch'] = 'int';
|
||||
$filter->bug->browse->cookie['bugModule'] = 'int';
|
||||
$filter->bug->browse->cookie['bugBranch'] = 'int';
|
||||
$filter->bug->browse->cookie['treeBranch'] = 'int';
|
||||
$filter->bug->browse->cookie['preBranch'] = 'int';
|
||||
$filter->bug->browse->cookie['qaBugOrder'] = 'reg::orderBy';
|
||||
$filter->bug->browse->cookie['windowWidth'] = 'int';
|
||||
@@ -127,6 +128,7 @@ $filter->product->browse->cookie['preProductID'] = 'int';
|
||||
$filter->product->browse->cookie['productStoryOrder'] = 'reg::orderBy';
|
||||
$filter->product->browse->cookie['storyModule'] = 'int';
|
||||
$filter->product->browse->cookie['storyBranch'] = 'int';
|
||||
$filter->product->browse->cookie['treeBranch'] = 'int';
|
||||
$filter->product->default->cookie['lastProduct'] = 'int';
|
||||
$filter->product->default->cookie['preProductID'] = 'int';
|
||||
$filter->product->index->cookie['preBranch'] = 'int';
|
||||
|
||||
+16
-5
@@ -77,7 +77,6 @@ class bug extends control
|
||||
/* Set productID, moduleID, queryID and branch. */
|
||||
$productID = $this->product->saveState($productID, $this->products);
|
||||
$branch = ($branch == '') ? (int)$this->cookie->preBranch : (int)$branch;
|
||||
$branchID = $browseType == '' ? $branch : ($browseType == 'bybranch' ? (int)$param : ($this->cookie->bugBranch ? $this->cookie->bugBranch : $branch));
|
||||
setcookie('preProductID', $productID, $this->config->cookieLife, $this->config->webRoot, '', false, true);
|
||||
setcookie('preBranch', (int)$branch, $this->config->cookieLife, $this->config->webRoot, '', false, true);
|
||||
|
||||
@@ -91,9 +90,9 @@ class bug extends control
|
||||
setcookie('bugModule', (int)$param, 0, $this->config->webRoot, '', false, false);
|
||||
$_COOKIE['bugBranch'] = 0;
|
||||
setcookie('bugBranch', 0, 0, $this->config->webRoot, '', false, false);
|
||||
if($browseType == '') $browseType = 'unclosed';
|
||||
if($browseType == '') setcookie('treeBranch', (int)$branch, 0, $this->config->webRoot, '', false, false);
|
||||
}
|
||||
if($browseType == 'bybranch') setcookie('bugBranch', (int)$param, 0, $this->config->webRoot, '', false, false);
|
||||
if($browseType == 'bybranch') setcookie('bugBranch', (int)$branch, 0, $this->config->webRoot, '', false, false);
|
||||
if($browseType != 'bymodule' and $browseType != 'bybranch') $this->session->set('bugBrowseType', $browseType);
|
||||
|
||||
$moduleID = ($browseType == 'bymodule') ? (int)$param : (($browseType == 'bysearch' or $browseType == 'bybranch') ? 0 : ($this->cookie->bugModule ? $this->cookie->bugModule : 0));
|
||||
@@ -103,6 +102,18 @@ class bug extends control
|
||||
$this->bug->setMenu($this->products, $productID, $branch, $moduleID, $browseType, $orderBy);
|
||||
$this->session->set('bugList', $this->app->getURI(true));
|
||||
|
||||
/* Set moduleTree. */
|
||||
if($browseType == '')
|
||||
{
|
||||
setcookie('treeBranch', (int)$branch, 0, $this->config->webRoot, '', false, false);
|
||||
$browseType = 'unclosed';
|
||||
$moduleTree = $this->tree->getTreeMenu($productID, $viewType = 'bug', $startModuleID = 0, array('treeModel', 'createBugLink'), '', $branch);
|
||||
}
|
||||
else
|
||||
{
|
||||
$moduleTree = $this->tree->getTreeMenu($productID, $viewType = 'bug', $startModuleID = 0, array('treeModel', 'createBugLink'), '', (int)$this->cookie->treeBranch);
|
||||
}
|
||||
|
||||
/* Process the order by field. */
|
||||
if(!$orderBy) $orderBy = $this->cookie->qaBugOrder ? $this->cookie->qaBugOrder : 'id_desc';
|
||||
setcookie('qaBugOrder', $orderBy, 0, $this->config->webRoot, '', false, true);
|
||||
@@ -119,7 +130,7 @@ class bug extends control
|
||||
$projects = $this->loadModel('project')->getPairs('empty|withdelete');
|
||||
|
||||
/* Get bugs. */
|
||||
$bugs = $this->bug->getBugs($productID, $projects, $branchID, $browseType, $moduleID, $queryID, $sort, $pager);
|
||||
$bugs = $this->bug->getBugs($productID, $projects, $branch, $browseType, $moduleID, $queryID, $sort, $pager);
|
||||
|
||||
/* Process the sql, get the conditon partion, save it to session. */
|
||||
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'bug', $browseType == 'needconfirm' ? false : true);
|
||||
@@ -157,7 +168,7 @@ class bug extends control
|
||||
$this->view->productName = $this->products[$productID];
|
||||
$this->view->builds = $this->loadModel('build')->getProductBuildPairs($productID);
|
||||
$this->view->modules = $this->tree->getOptionMenu($productID, $viewType = 'bug', $startModuleID = 0, $branch);
|
||||
$this->view->moduleTree = $this->tree->getTreeMenu($productID, $viewType = 'bug', $startModuleID = 0, array('treeModel', 'createBugLink'), '', $branch);
|
||||
$this->view->moduleTree = $moduleTree;
|
||||
$this->view->moduleName = $moduleID ? $this->tree->getById($moduleID)->name : $this->lang->tree->all;
|
||||
$this->view->summary = $this->bug->summary($bugs);
|
||||
$this->view->browseType = $browseType;
|
||||
|
||||
@@ -116,7 +116,6 @@ class product extends control
|
||||
/* Set product, module and query. */
|
||||
$productID = $this->product->saveState($productID, $this->products);
|
||||
$branch = ($branch === '') ? (int)$this->cookie->preBranch : (int)$branch;
|
||||
$branchID = $browseType == '' ? $branch : ($browseType == 'bybranch' ? (int)$param : ($this->cookie->storyBranch ? $this->cookie->storyBranch : $branch));
|
||||
setcookie('preProductID', $productID, $this->config->cookieLife, $this->config->webRoot, '', false, true);
|
||||
setcookie('preBranch', (int)$branch, $this->config->cookieLife, $this->config->webRoot, '', false, true);
|
||||
|
||||
@@ -125,14 +124,15 @@ class product extends control
|
||||
$_COOKIE['storyModule'] = 0;
|
||||
setcookie('storyModule', 0, 0, $this->config->webRoot, '', false, false);
|
||||
}
|
||||
|
||||
if($browseType == 'bymodule' or $browseType == '')
|
||||
{
|
||||
setcookie('storyModule', (int)$param, 0, $this->config->webRoot, '', false, false);
|
||||
$_COOKIE['storyBranch'] = 0;
|
||||
setcookie('storyBranch', 0, 0, $this->config->webRoot, '', false, false);
|
||||
if($browseType == '') $browseType = 'unclosed';
|
||||
if($browseType == '') setcookie('treeBranch', (int)$branch, 0, $this->config->webRoot, '', false, false);
|
||||
}
|
||||
if($browseType == 'bybranch') setcookie('storyBranch', (int)$param, 0, $this->config->webRoot, '', false, false);
|
||||
if($browseType == 'bybranch') setcookie('storyBranch', (int)$branch, 0, $this->config->webRoot, '', false, false);
|
||||
if($browseType != 'bymodule' and $browseType != 'bybranch') $this->session->set('storyBrowseType', $browseType);
|
||||
|
||||
$moduleID = ($browseType == 'bymodule') ? (int)$param : (($browseType == 'bysearch' or $browseType == 'bybranch') ? 0 : ($this->cookie->storyModule ? $this->cookie->storyModule : 0));
|
||||
@@ -141,6 +141,19 @@ class product extends control
|
||||
/* Set menu. */
|
||||
$this->product->setMenu($this->products, $productID, $branch);
|
||||
|
||||
/* Set moduleTree. */
|
||||
$createModuleLink = $storyType == 'story' ? 'createStoryLink' : 'createRequirementLink';
|
||||
if($browseType == '')
|
||||
{
|
||||
setcookie('treeBranch', (int)$branch, 0, $this->config->webRoot, '', false, false);
|
||||
$browseType = 'unclosed';
|
||||
$moduleTree = $this->tree->getTreeMenu($productID, $viewType = 'story', $startModuleID = 0, array('treeModel', $createModuleLink), '', $branch);
|
||||
}
|
||||
else
|
||||
{
|
||||
$moduleTree = $this->tree->getTreeMenu($productID, $viewType = 'story', $startModuleID = 0, array('treeModel', $createModuleLink), '', (int)$this->cookie->treeBranch);
|
||||
}
|
||||
|
||||
/* Process the order by field. */
|
||||
if(!$orderBy) $orderBy = $this->cookie->productStoryOrder ? $this->cookie->productStoryOrder : 'id_desc';
|
||||
setcookie('productStoryOrder', $orderBy, 0, $this->config->webRoot, '', false, true);
|
||||
@@ -154,7 +167,7 @@ class product extends control
|
||||
$pager = new pager($recTotal, $recPerPage, $pageID);
|
||||
|
||||
/* Get stories. */
|
||||
$stories = $this->product->getStories($productID, $branchID, $browseType, $queryID, $moduleID, $storyType, $sort, $pager);
|
||||
$stories = $this->product->getStories($productID, $branch, $browseType, $queryID, $moduleID, $storyType, $sort, $pager);
|
||||
|
||||
/* Process the sql, get the conditon partion, save it to session. */
|
||||
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'story', $browseType != 'bysearch');
|
||||
@@ -188,8 +201,6 @@ class product extends control
|
||||
$showModule = !empty($this->config->datatable->productBrowse->showModule) ? $this->config->datatable->productBrowse->showModule : '';
|
||||
$this->view->modulePairs = $showModule ? $this->tree->getModulePairs($productID, 'story', $showModule) : array();
|
||||
|
||||
$createModuleLink = $storyType == 'story' ? 'createStoryLink' : 'createRequirementLink';
|
||||
|
||||
/* Assign. */
|
||||
$this->view->title = $this->products[$productID]. $this->lang->colon . $this->lang->product->browse;
|
||||
$this->view->position[] = $this->products[$productID];
|
||||
@@ -201,7 +212,7 @@ class product extends control
|
||||
$this->view->stories = $stories;
|
||||
$this->view->plans = $this->loadModel('productplan')->getPairs($productID, $branch);
|
||||
$this->view->summary = $this->product->summary($stories, $storyType);
|
||||
$this->view->moduleTree = $this->tree->getTreeMenu($productID, $viewType = 'story', $startModuleID = 0, array('treeModel', $createModuleLink), '', $branch);
|
||||
$this->view->moduleTree = $moduleTree;
|
||||
$this->view->parentModules = $this->tree->getParents($moduleID);
|
||||
$this->view->pager = $pager;
|
||||
$this->view->users = $this->user->getPairs('noletter|pofirst|nodeleted');
|
||||
|
||||
@@ -561,8 +561,8 @@ class productModel extends model
|
||||
|
||||
/* Set modules and browse type. */
|
||||
$modules = $moduleID ? $this->loadModel('tree')->getAllChildID($moduleID) : '0';
|
||||
$browseType = ($browseType == 'bymodule' and $this->session->storyBrowseType and $this->session->storyBrowseType != 'bysearch') ? $this->session->storyBrowseType : $browseType;
|
||||
$browseType = $browseType == 'bybranch' ? 'bymodule' : $browseType;
|
||||
$browseType = ($browseType == 'bymodule' and $this->session->storyBrowseType and $this->session->storyBrowseType != 'bysearch') ? $this->session->storyBrowseType : $browseType;
|
||||
|
||||
/* Get stories by browseType. */
|
||||
$stories = array();
|
||||
|
||||
@@ -945,6 +945,7 @@ class story extends control
|
||||
{
|
||||
if($this->post->comments)
|
||||
{
|
||||
$data = fixer::input('post')->get();
|
||||
$allChanges = $this->story->batchClose();
|
||||
|
||||
if($allChanges)
|
||||
@@ -955,6 +956,13 @@ class story extends control
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
}
|
||||
|
||||
foreach($data->storyParentList as $storyID => $parent)
|
||||
{
|
||||
if($parent == -1) $skipStory[$storyID] = $data->storyIdList[$storyID];
|
||||
}
|
||||
if(isset($skipStory)) echo js::alert(sprintf($this->lang->story->parentSkip, join(',', $skipStory)));
|
||||
|
||||
if(!dao::isError()) $this->loadModel('score')->create('ajax', 'batchOther');
|
||||
die(js::locate($this->session->storyList, 'parent'));
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ $lang->story->batchChangeStage = "批量修改阶段";
|
||||
$lang->story->batchAssignTo = "批量指派";
|
||||
$lang->story->batchChangeModule = "批量修改模块";
|
||||
$lang->story->viewAll = '查看全部';
|
||||
$lang->story->parentClose = '需求:%s 为父需求,将不会被关闭。';
|
||||
$lang->story->parentSkip = '需求:%s 为父需求,将不会被关闭。';
|
||||
|
||||
$lang->story->common = $lang->storyCommon;
|
||||
$lang->story->id = '编号';
|
||||
|
||||
@@ -1136,11 +1136,10 @@ class storyModel extends model
|
||||
$storyIdList = $data->storyIdList ? $data->storyIdList : array();
|
||||
|
||||
$oldStories = $this->getByList($storyIdList);
|
||||
$parentIdList = array();
|
||||
foreach($storyIdList as $storyID)
|
||||
{
|
||||
$oldStory = $oldStories[$storyID];
|
||||
if($oldStory->parent == -1) $parentIdList[] = $oldStory->id;
|
||||
if($oldStory->parent == -1) continue;
|
||||
if($oldStory->status == 'closed') continue;
|
||||
|
||||
$story = new stdclass();
|
||||
@@ -1163,12 +1162,6 @@ class storyModel extends model
|
||||
unset($story);
|
||||
}
|
||||
|
||||
if(count($parentIdList))
|
||||
{
|
||||
$noticeParentID = implode(',', $parentIdList);
|
||||
die(js::alert(sprintf($this->lang->story->parentClose, $noticeParentID)));
|
||||
}
|
||||
|
||||
foreach($stories as $storyID => $story)
|
||||
{
|
||||
if(!$story->closedReason) continue;
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
<?php foreach($stories as $storyID => $story):?>
|
||||
<tr class='text-center'>
|
||||
<td><?php echo $storyID . html::hidden("storyIdList[$storyID]", $storyID);?></td>
|
||||
<?php echo html::hidden("storyParentList[$storyID]", $story->parent);?>
|
||||
<td class='text-left'><?php echo $story->title;?></td>
|
||||
<td class='story-<?php echo $story->status;?>'><?php echo $this->processStatus('story', $story);?></td>
|
||||
<td>
|
||||
|
||||
@@ -117,10 +117,12 @@ class testreport extends control
|
||||
* @param int $objectID
|
||||
* @param string $objectType
|
||||
* @param string $extra
|
||||
* @param string $begin
|
||||
* @param string $end
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function create($objectID = 0, $objectType = 'testtask', $extra = '')
|
||||
public function create($objectID = 0, $objectType = 'testtask', $extra = '', $begin = '', $end = '')
|
||||
{
|
||||
if($_POST)
|
||||
{
|
||||
@@ -165,8 +167,8 @@ class testreport extends control
|
||||
if($productID != $task->product) die(js::error($this->lang->error->accessDenied) . js::locate('back'));
|
||||
$productIdList[$productID] = $productID;
|
||||
|
||||
$begin = $task->begin;
|
||||
$end = $task->end;
|
||||
$begin = !empty($begin) ? date("Y-m-d", strtotime($begin)) : $task->begin;
|
||||
$end = !empty($end) ? date("Y-m-d", strtotime($end)) : $task->end;
|
||||
$project = $this->project->getById($task->project);
|
||||
$builds = array();
|
||||
if($task->build == 'trunk')
|
||||
@@ -225,8 +227,8 @@ class testreport extends control
|
||||
$builds = $this->build->getByList($buildIdList);
|
||||
$stories = !empty($builds) ? $this->testreport->getStories4Test($builds) : $this->story->getProjectStories($project->id);;
|
||||
|
||||
$begin = $project->begin;
|
||||
$end = $project->end;
|
||||
$begin = !empty($begin) ? date("Y-m-d", strtotime($begin)) : $project->begin;
|
||||
$end = !empty($end) ? date("Y-m-d", strtotime($end)) : $project->end;
|
||||
$owner = current($owners);
|
||||
$bugs = $this->testreport->getBugs4Test($builds, $productIdList, $begin, $end, 'project');
|
||||
|
||||
@@ -267,6 +269,7 @@ class testreport extends control
|
||||
|
||||
$this->view->objectID = $objectID;
|
||||
$this->view->objectType = $objectType;
|
||||
$this->view->extra = $extra;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -278,7 +281,7 @@ class testreport extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function edit($reportID, $from = 'product')
|
||||
public function edit($reportID, $from = 'product', $begin = '', $end ='')
|
||||
{
|
||||
if($_POST)
|
||||
{
|
||||
@@ -295,6 +298,8 @@ class testreport extends control
|
||||
|
||||
$report = $this->testreport->getById($reportID);
|
||||
$project = $this->project->getById($report->project);
|
||||
$begin = !empty($begin) ? date("Y-m-d", strtotime($begin)) : $report->begin;
|
||||
$end = !empty($end) ? date("Y-m-d", strtotime($end)) : $report->end;
|
||||
if($from == 'product' and is_numeric($report->product))
|
||||
{
|
||||
$product = $this->product->getById($report->product);
|
||||
@@ -333,7 +338,7 @@ class testreport extends control
|
||||
$stories = empty($build->stories) ? array() : $this->story->getByList($build->stories);
|
||||
|
||||
if(!empty($build->id)) $builds[$build->id] = $build;
|
||||
$bugs = $this->testreport->getBugs4Test($builds, $report->product, $report->begin, $report->end);
|
||||
$bugs = $this->testreport->getBugs4Test($builds, $report->product, $begin, $end);
|
||||
}
|
||||
$tasks = array($task->id => $task);
|
||||
|
||||
@@ -346,15 +351,18 @@ class testreport extends control
|
||||
|
||||
$builds = $this->build->getByList($report->builds);
|
||||
$stories = !empty($builds) ? $this->testreport->getStories4Test($builds) : $this->story->getProjectStories($project->id);;
|
||||
$bugs = $this->testreport->getBugs4Test($builds, $productIdList, $report->begin, $report->end, 'project');
|
||||
$bugs = $this->testreport->getBugs4Test($builds, $productIdList, $begin, $end, 'project');
|
||||
}
|
||||
|
||||
$cases = $this->testreport->getTaskCases($tasks, $report->begin, $report->end);
|
||||
$bugInfo = $this->testreport->getBugInfo($tasks, $productIdList, $report->begin, $report->end, $builds);
|
||||
$cases = $this->testreport->getTaskCases($tasks, $begin, $end);
|
||||
$bugInfo = $this->testreport->getBugInfo($tasks, $productIdList, $begin, $end, $builds);
|
||||
|
||||
$this->view->title = $report->title . $this->lang->testreport->edit;
|
||||
|
||||
$this->view->report = $report;
|
||||
$this->view->from = $from;
|
||||
$this->view->begin = $begin;
|
||||
$this->view->end = $end;
|
||||
$this->view->stories = $stories;
|
||||
$this->view->bugs = $bugs;
|
||||
$this->view->project = $project;
|
||||
@@ -366,10 +374,10 @@ class testreport extends control
|
||||
$this->view->users = $this->user->getPairs('noletter|noclosed|nodeleted');
|
||||
|
||||
$this->view->cases = $cases;
|
||||
$this->view->caseSummary = $this->testreport->getResultSummary($tasks, $cases, $report->begin, $report->end);
|
||||
$this->view->caseSummary = $this->testreport->getResultSummary($tasks, $cases, $begin, $end);
|
||||
|
||||
$perCaseResult = $this->testreport->getPerCaseResult4Report($tasks, $cases, $report->begin, $report->end);
|
||||
$perCaseRunner = $this->testreport->getPerCaseRunner4Report($tasks, $cases, $report->begin, $report->end);
|
||||
$perCaseResult = $this->testreport->getPerCaseResult4Report($tasks, $cases, $begin, $end);
|
||||
$perCaseRunner = $this->testreport->getPerCaseRunner4Report($tasks, $cases, $begin, $end);
|
||||
$this->view->datas['testTaskPerRunResult'] = $this->loadModel('report')->computePercent($perCaseResult);
|
||||
$this->view->datas['testTaskPerRunner'] = $this->report->computePercent($perCaseRunner);
|
||||
|
||||
|
||||
@@ -10,3 +10,8 @@ $(function()
|
||||
};
|
||||
resizeChartTable();
|
||||
});
|
||||
|
||||
function changeDate()
|
||||
{
|
||||
$("#refresh").removeAttr("style");
|
||||
}
|
||||
|
||||
@@ -95,18 +95,13 @@ class testreportModel extends model
|
||||
->add('createdDate', helper::now())
|
||||
->join('stories', ',')
|
||||
->join('builds', ',')
|
||||
->join('bugs', ',')
|
||||
->join('cases', ',')
|
||||
->join('members', ',')
|
||||
->remove('files,labels,uid')
|
||||
->get();
|
||||
$data->members = trim($data->members, ',');
|
||||
|
||||
$builds = array();
|
||||
$build = $this->loadModel('build')->getById($data->builds);
|
||||
if(!empty($build->id)) $builds[$build->id] = $build;
|
||||
$bugs = $this->getBugs4Test($builds, $data->product, $data->begin, $data->end);
|
||||
if(!empty($bugs)) $data->bugs = implode(",", array_keys($bugs));
|
||||
|
||||
$data = $this->loadModel('file')->processImgURL($data, $this->config->testreport->editor->create['id'], $this->post->uid);
|
||||
$this->dao->insert(TABLE_TESTREPORT)->data($data)->autocheck()
|
||||
->batchCheck($this->config->testreport->create->requiredFields, 'notempty')
|
||||
@@ -134,18 +129,13 @@ class testreportModel extends model
|
||||
->stripTags($this->config->testreport->editor->edit['id'], $this->config->allowedTags)
|
||||
->join('stories', ',')
|
||||
->join('builds', ',')
|
||||
->join('bugs', ',')
|
||||
->join('cases', ',')
|
||||
->join('members', ',')
|
||||
->remove('files,labels,uid')
|
||||
->get();
|
||||
$data->members = trim($data->members, ',');
|
||||
|
||||
$builds = array();
|
||||
$build = $this->loadModel('build')->getById($data->builds);
|
||||
if(!empty($build->id)) $builds[$build->id] = $build;
|
||||
$bugs = $this->getBugs4Test($builds, $data->product, $data->begin, $data->end);
|
||||
$data->bugs = !empty($bugs) ? implode(",", array_keys($bugs)) : '';
|
||||
|
||||
$data = $this->loadModel('file')->processImgURL($data, $this->config->testreport->editor->edit['id'], $this->post->uid);
|
||||
$this->dao->update(TABLE_TESTREPORT)->data($data)->autocheck()
|
||||
->batchCheck($this->config->testreport->edit->requiredFields, 'notempty')
|
||||
|
||||
@@ -37,10 +37,12 @@
|
||||
<th class='w-100px'><?php echo $lang->testreport->startEnd?></th>
|
||||
<td class='w-p50'>
|
||||
<div class='input-group'>
|
||||
<?php echo html::input('begin', $begin, "class='form-control form-date'")?>
|
||||
<?php echo html::input('begin', $begin, "class='form-control form-date' onchange=changeDate()")?>
|
||||
<span class='input-group-addon'> ~ </span>
|
||||
<?php echo html::input('end', $end, "class='form-control form-date'")?>
|
||||
<?php
|
||||
<?php echo html::input('end', $end, "class='form-control form-date' onchange=changeDate()")?>
|
||||
<?php echo "<div class='input-group-btn' id='refresh' style='display: none'>"?>
|
||||
<a onclick=refreshPage() class='btn btn-icon' data-toggle='modal' data-type='iframe'><?php echo $lang->refresh?></a>
|
||||
<?php echo "</div>";
|
||||
echo html::hidden('product', $productIdList) . ($config->global->flow != 'onlyTest' ? html::hidden('project', isset($project->id) ? $project->id : 0) : '') . html::hidden('tasks', $tasks);
|
||||
echo html::hidden('objectID', $objectID) . html::hidden('objectType', $objectType);
|
||||
?>
|
||||
@@ -136,4 +138,27 @@
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function refreshPage()
|
||||
{
|
||||
var begin = $("#begin").val();
|
||||
var end = $("#end").val();
|
||||
var objectID = $("#objectID").val();
|
||||
var objectType = $("#objectType").val();
|
||||
var extra = <?php echo $extra;?>;
|
||||
if(begin.indexOf('-') != -1)
|
||||
{
|
||||
var beginarray = begin.split("-");
|
||||
var begin = '';
|
||||
for(i = 0; i < beginarray.length; i++) begin = begin + beginarray[i];
|
||||
}
|
||||
if(end.indexOf('-') != -1)
|
||||
{
|
||||
var endarray = end.split("-");
|
||||
var end = '';
|
||||
for(i = 0 ; i < endarray.length ; i++) end = end + endarray[i];
|
||||
}
|
||||
location.href = createLink('testreport', 'create', "project=" + objectID + "&objectType=" + objectType + "&extra=" + extra + "&begin=" + begin + "&end=" + end);
|
||||
}
|
||||
</script>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -28,9 +28,12 @@
|
||||
<th class='w-100px'><?php echo $lang->testreport->startEnd?></th>
|
||||
<td class='w-p50'>
|
||||
<div class='input-group'>
|
||||
<?php echo html::input('begin', $report->begin, "class='form-control form-date'")?>
|
||||
<?php echo html::input('begin', $begin, "class='form-control form-date' onchange=changeDate()")?>
|
||||
<span class='input-group-addon'> ~ </span>
|
||||
<?php echo html::input('end', $report->end, "class='form-control form-date'")?>
|
||||
<?php echo html::input('end', $end, "class='form-control form-date' onchange=changeDate()")?>
|
||||
<?php echo "<div class='input-group-btn' id='refresh' style='display: none'>"?>
|
||||
<a onclick=refreshPage() class='btn btn-icon' data-toggle='modal' data-type='iframe'><?php echo $lang->refresh?></a>
|
||||
<?php echo "</div>"?>
|
||||
<?php echo html::hidden('product', $productIdList) . ($config->global->flow != 'onlyTest' ? html::hidden('project', $project->id) : '') . html::hidden('tasks', $tasks);?>
|
||||
</div>
|
||||
</td>
|
||||
@@ -113,4 +116,26 @@
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function refreshPage()
|
||||
{
|
||||
var begin = $("#begin").val();
|
||||
var end = $("#end").val();
|
||||
var reportID = <?php echo $report->id;?>;
|
||||
var from = <?php echo "'" . $from . "'";?>;
|
||||
if(begin.indexOf('-') != -1)
|
||||
{
|
||||
var beginarray = begin.split("-");
|
||||
var begin = '';
|
||||
for(i = 0; i < beginarray.length; i++) begin = begin + beginarray[i];
|
||||
}
|
||||
if(end.indexOf('-') != -1)
|
||||
{
|
||||
var endarray = end.split("-");
|
||||
var end = '';
|
||||
for(i = 0 ; i < endarray.length ; i++) end = end + endarray[i];
|
||||
}
|
||||
location.href = createLink('testreport', 'edit', "reportID=" + reportID + "&from=" + from + "&begin=" + begin + "&end=" + end);
|
||||
}
|
||||
</script>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -408,7 +408,7 @@ class treeModel extends model
|
||||
{
|
||||
$linkHtml = ($type == 'case' and !empty($extra)) ? '<a>' . $branch . '</a>' : $this->createBranchLink($type, $rootID, $branchID, $branch);
|
||||
$linkHtml = $manage ? html::a(inlink('browse', "root=$rootID&viewType=$type¤tModuleID=0&branch=$branchID"), $branch) : $linkHtml;
|
||||
if($type == 'story' or $type == 'bug') $linkHtml = html::a(inlink('browse', "productID=$rootID&branch=&browseType=bybranch¶m=$branchID"), $branch, "", "id=branch" . $branchID);
|
||||
if($type == 'story' or $type == 'bug') $linkHtml = html::a(inlink('browse', "productID=$rootID&branch=$branchID&browseType=bybranch"), $branch, "", "id=branch" . $branchID);
|
||||
if($firstBranch and $product->type != 'normal')
|
||||
{
|
||||
$linkHtml = '<a>' . $this->lang->product->branchName[$product->type] . '</a><ul><li>' . $linkHtml;
|
||||
|
||||
Reference in New Issue
Block a user