Merge branch 'zentaopms_283' into 'master'
Zentaopms 283 See merge request easycorp/zentaopms!6725
This commit is contained in:
+14
-6
@@ -863,7 +863,7 @@ class bugModel extends model
|
||||
|
||||
if($bug->assignedTo != $oldBug->assignedTo) $bug->assignedDate = $now;
|
||||
if($bug->resolution != '') $bug->confirmed = 1;
|
||||
if(($bug->resolvedBy != '' or $bug->resolution != '') and $oldBug->status != 'closed')
|
||||
if(($bug->resolvedBy != '' or $bug->resolution != '') and strpos(',resolved,closed,', ",{$oldBug->status},") === false)
|
||||
{
|
||||
$bug->resolvedDate = $now;
|
||||
$bug->status = 'resolved';
|
||||
@@ -1528,16 +1528,24 @@ class bugModel extends model
|
||||
*/
|
||||
public function getBugs2Link($bugID, $browseType = 'bySearch', $queryID = 0, $pager = null, $excludeBugs = '')
|
||||
{
|
||||
$bug = $this->getById($bugID);
|
||||
$bugIDList = $bug->id . ',' . $bug->linkBug . ',' . $excludeBugs;
|
||||
|
||||
if($browseType == 'bySearch')
|
||||
{
|
||||
$bug = $this->getById($bugID);
|
||||
$bugIDList = $bug->id . ',' . $bug->linkBug . ',' . $excludeBugs;
|
||||
$bugs2Link = $this->getBySearch($bug->product, 'all', $queryID, 'id', $bugIDList, $pager);
|
||||
return $bugs2Link;
|
||||
return $this->getBySearch($bug->product, 'all', $queryID, 'id', $bugIDList, $pager);
|
||||
}
|
||||
else
|
||||
{
|
||||
return array();
|
||||
return $this->dao->select('*')->from(TABLE_BUG)
|
||||
->where('deleted')->eq('0')
|
||||
->andWhere('id')->notin($bugIDList)
|
||||
->andWhere('product')->eq($bug->product)
|
||||
->beginIF($bug->project)->andWhere('project')->eq($bug->project)->fi()
|
||||
->beginIF($bug->execution)->andWhere('execution')->eq($bug->execution)->fi()
|
||||
->orderBy('id desc')
|
||||
->page($pager)
|
||||
->fetchAll();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -90,6 +90,9 @@ class datatable extends control
|
||||
}
|
||||
|
||||
$cols = $this->datatable->getFieldList($module);
|
||||
|
||||
if($module == 'story' && $extra != 'requirement') unset($cols['SRS']);
|
||||
|
||||
if($extra == 'requirement')
|
||||
{
|
||||
unset($cols['plan']);
|
||||
@@ -97,6 +100,8 @@ class datatable extends control
|
||||
unset($cols['taskCount']);
|
||||
unset($cols['bugCount']);
|
||||
unset($cols['caseCount']);
|
||||
unset($cols['URS']);
|
||||
|
||||
$cols['title']['title'] = str_replace($this->lang->SRCommon, $this->lang->URCommon, $this->lang->story->title);
|
||||
}
|
||||
|
||||
|
||||
@@ -395,6 +395,7 @@ $lang->kanbancard->beginAndEnd = 'Begin & End';
|
||||
$lang->kanbancard->begin = 'Begin';
|
||||
$lang->kanbancard->end = 'End';
|
||||
$lang->kanbancard->pri = 'Priority';
|
||||
$lang->kanbancard->status = 'Status';
|
||||
$lang->kanbancard->progress = 'Progress';
|
||||
$lang->kanbancard->desc = 'Description';
|
||||
$lang->kanbancard->estimate = 'Estimate';
|
||||
|
||||
@@ -395,6 +395,7 @@ $lang->kanbancard->beginAndEnd = 'Begin & End';
|
||||
$lang->kanbancard->begin = 'Begin';
|
||||
$lang->kanbancard->end = 'End';
|
||||
$lang->kanbancard->pri = 'Priority';
|
||||
$lang->kanbancard->status = 'Status';
|
||||
$lang->kanbancard->progress = 'Progress';
|
||||
$lang->kanbancard->desc = 'Description';
|
||||
$lang->kanbancard->estimate = 'Estimate';
|
||||
|
||||
@@ -395,6 +395,7 @@ $lang->kanbancard->beginAndEnd = 'Begin & End';
|
||||
$lang->kanbancard->begin = 'Begin';
|
||||
$lang->kanbancard->end = 'End';
|
||||
$lang->kanbancard->pri = 'Priority';
|
||||
$lang->kanbancard->status = 'Status';
|
||||
$lang->kanbancard->progress = 'Progress';
|
||||
$lang->kanbancard->desc = 'Description';
|
||||
$lang->kanbancard->estimate = 'Estimate';
|
||||
|
||||
@@ -395,6 +395,7 @@ $lang->kanbancard->beginAndEnd = '起止日期';
|
||||
$lang->kanbancard->begin = '预计开始';
|
||||
$lang->kanbancard->end = '截止日期';
|
||||
$lang->kanbancard->pri = '优先级';
|
||||
$lang->kanbancard->status = '状态';
|
||||
$lang->kanbancard->progress = '进度';
|
||||
$lang->kanbancard->desc = '描述';
|
||||
$lang->kanbancard->estimate = '预计';
|
||||
|
||||
@@ -1364,7 +1364,7 @@ class story extends control
|
||||
$buildApp = $tab == 'product' ? 'project' : $tab;
|
||||
$releaseApp = $tab == 'execution' ? 'product' : $tab;
|
||||
$this->session->set('productList', $uri . "#app={$tab}", 'product');
|
||||
if(!isonlybody())$this->session->set('buildList', $uri, $buildApp);
|
||||
if(!isonlybody()) $this->session->set('buildList', $uri, $buildApp);
|
||||
$this->app->loadLang('bug');
|
||||
|
||||
$storyID = (int)$storyID;
|
||||
@@ -1401,7 +1401,8 @@ class story extends control
|
||||
}
|
||||
elseif($from == 'project')
|
||||
{
|
||||
$this->loadModel('project')->setMenu($this->session->project);
|
||||
$projectID = (isset($story->projects[$this->session->project]) || empty($story->projects)) ? $this->session->project : key($story->projects);
|
||||
$this->loadModel('project')->setMenu($projectID);
|
||||
}
|
||||
elseif($from == 'qa')
|
||||
{
|
||||
|
||||
+19
-2
@@ -47,13 +47,30 @@ class storyModel extends model
|
||||
if($setImgSize) $story->spec = $this->file->setImgSize($story->spec);
|
||||
if($setImgSize) $story->verify = $this->file->setImgSize($story->verify);
|
||||
|
||||
$story->executions = $this->dao->select('t1.project, t2.name, t2.status, t2.type, t2.multiple')->from(TABLE_PROJECTSTORY)->alias('t1')
|
||||
$projects = $this->dao->select('t1.project, t2.name, t2.status, t2.type, t2.multiple, t2.project AS parentProject')->from(TABLE_PROJECTSTORY)->alias('t1')
|
||||
->leftJoin(TABLE_EXECUTION)->alias('t2')->on('t1.project = t2.id')
|
||||
->where('t2.type')->in('sprint,stage,kanban')
|
||||
->where('t2.type')->in('sprint,stage,kanban,project')
|
||||
->beginIF($story->twins)->andWhere('t1.story')->in(ltrim($story->twins, ',') . $story->id)
|
||||
->beginIF(!$story->twins)->andWhere('t1.story')->in($story->id)
|
||||
->orderBy('t1.`order` DESC')
|
||||
->fetchAll('project');
|
||||
|
||||
$story->projects = array();
|
||||
$story->executions = array();
|
||||
foreach($projects as $project)
|
||||
{
|
||||
if($project->type == 'project')
|
||||
{
|
||||
$story->projects[$project->project] = $project->project;
|
||||
}
|
||||
else
|
||||
{
|
||||
$story->executions[$project->project] = $project;
|
||||
|
||||
if(!$project->multiple) $story->projects[$project->parentProject] = $project->parentProject;
|
||||
}
|
||||
}
|
||||
|
||||
$story->tasks = $this->dao->select('id, name, assignedTo, execution, project, status, consumed, `left`,type')->from(TABLE_TASK)
|
||||
->where('deleted')->eq(0)
|
||||
->beginIF($story->twins)->andWhere('story')->in(ltrim($story->twins, ',') . $story->id)
|
||||
|
||||
Reference in New Issue
Block a user