Merge branch release/21.7.8 of zentao/zentaopms (#13162)
This commit is contained in:
@@ -37,8 +37,9 @@ class commonTao extends commonModel
|
||||
$select = '';
|
||||
if($this->session->$typeOnlyCondition)
|
||||
{
|
||||
if($orderBy and str_contains($orderBy, 'priOrder')) $select .= ", IF(`pri` = 0, {$this->config->maxPriValue}, `pri`) as priOrder";
|
||||
if($orderBy and str_contains($orderBy, 'severityOrder')) $select .= ", IF(`severity` = 0, {$this->config->maxPriValue}, `severity`) as severityOrder";
|
||||
if($orderBy and str_contains($orderBy, 'priOrder')) $select .= ", IF(`pri` = 0, {$this->config->maxPriValue}, `pri`) as priOrder";
|
||||
if($orderBy and str_contains($orderBy, 'severityOrder')) $select .= ", IF(`severity` = 0, {$this->config->maxPriValue}, `severity`) as severityOrder";
|
||||
if($type == 'task' && str_contains($orderBy, 'statusOrder')) $select .= ", INSTR('wait,doing,done,pause,cancel,closed,', status) as statusOrder";
|
||||
$queryCondition = str_replace('t4.status', 'status', $queryCondition);
|
||||
|
||||
$sql = $this->dao->select("*$select")->from($table)
|
||||
|
||||
@@ -46,7 +46,7 @@ foreach($config->design->view->operateList['common'] as $operate)
|
||||
$moduleName = empty($project->hasProduct) ? 'projectstory' : (isset($design->storyInfo) ? $design->storyInfo->type : 'story');
|
||||
$storyName = zget($stories, $design->story, '');
|
||||
$storyItem = array();
|
||||
if($common::hasPriv($moduleName, 'view'))
|
||||
if(common::hasPriv($moduleName, 'view'))
|
||||
{
|
||||
$storyItem[] = a(
|
||||
set::href(helper::createLink($moduleName, 'view', "id={$design->story}")),
|
||||
|
||||
@@ -1508,6 +1508,7 @@ class executionModel extends model
|
||||
*/
|
||||
public function fetchExecutionList(int $projectID = 0, string $browseType = 'undone', int $productID = 0, int $param = 0, string $orderBy = 'id_asc', ?object $pager = null): array
|
||||
{
|
||||
if(strpos($orderBy, 'nameCol') !== false) $orderBy = str_replace('nameCol', 'name', $orderBy);
|
||||
/* Construct the query SQL at search executions. */
|
||||
$executionQuery = $browseType == 'bySearch' ? $this->getExecutionQuery($param) : '';
|
||||
$projectModel = $this->dao->select('model')->from(TABLE_PROJECT)->where('id')->eq($projectID)->fetch('model');
|
||||
|
||||
@@ -24,7 +24,7 @@ $cols['assignedTo']['type'] = 'user';
|
||||
$cols['module']['type'] = 'text';
|
||||
$cols['module']['map'] = $modules;
|
||||
|
||||
foreach($allStories as $story) $story->estimate = $story->estimate . $config->hourUnit;
|
||||
foreach($allStories as $story) $story->estimate = helper::formatHours($story->estimate) . $config->hourUnit;
|
||||
|
||||
$config->product->search['fields']['title'] = $lang->productplan->storyTitle;
|
||||
searchForm
|
||||
|
||||
@@ -104,7 +104,7 @@ formPanel
|
||||
)
|
||||
);
|
||||
|
||||
foreach($planStories as $story) $story->estimate = $story->estimate . $config->hourUnit;
|
||||
foreach($planStories as $story) $story->estimate = helper::formatHours($story->estimate) . $config->hourUnit;
|
||||
dtable
|
||||
(
|
||||
setID('planStories'),
|
||||
|
||||
@@ -154,7 +154,7 @@ if($canBatchActionBug)
|
||||
|
||||
$planStories = initTableData($planStories, $storyCols, $this->productplan);
|
||||
$planBugs = initTableData($planBugs, $bugCols, $this->productplan);
|
||||
foreach($planStories as $story) $story->estimate = $story->estimate . $config->hourUnit;
|
||||
foreach($planStories as $story) $story->estimate = helper::formatHours($story->estimate) . $config->hourUnit;
|
||||
|
||||
$createStoryLink = common::hasPriv('story', 'create') ? $this->createLink('story', 'create', "productID=$plan->product&branch=$plan->branch&moduleID=0&storyID=0&projectID=$projectID&bugID=0&planID=$plan->id") : null;
|
||||
$batchCreateStoryLink = common::hasPriv('story', 'batchCreate') ? $this->createLink('story', 'batchCreate', "productID=$plan->product&branch=$plan->branch&moduleID=0&story=0&project=$projectID&plan={$plan->id}") : null;
|
||||
|
||||
@@ -158,7 +158,7 @@ if($isFromDoc || $isFromAI)
|
||||
}
|
||||
|
||||
$linkParams = $rawMethod == 'groupcase' ? "productID=$productID&branch=$branch&groupBy=$groupBy&objectID=0&caseType=$caseType&browseType={key}" : "productID=$productID&branch=$branch&browseType={key}¶m=0" . $suffixParam;
|
||||
if($app->tab == 'project' && $from != 'doc' && $from != 'ai') $linkParams = "projectID={$projectID}&$linkParams";
|
||||
if($app->tab == 'project' && $from != 'doc' && $from != 'ai' && $rawMethod != 'groupcase') $linkParams = "projectID={$projectID}&$linkParams";
|
||||
$browseLink = createLink('testcase', 'browse', $linkParams);
|
||||
if($app->tab == 'project') $browseLink = createLink('project', 'testcase', $linkParams);
|
||||
if($app->tab == 'execution' && $from != 'doc' && $from != 'ai') $browseLink = createLink('execution', 'testcase', "executionID={$executionID}&productID=$productID&branch=$branch&browseType={key}");
|
||||
|
||||
@@ -699,6 +699,7 @@ class transferModel extends model
|
||||
$selectedFields = '*';
|
||||
if($orderBy && strpos($orderBy, 'priOrder') !== false) $selectedFields .= ",IF(`pri` = 0, {$this->config->maxPriValue}, `pri`) AS priOrder";
|
||||
if($orderBy && strpos($orderBy, 'severityOrder') !== false) $selectedFields .= ",IF(`severity` = 0, {$this->config->maxPriValue}, `severity`) AS severityOrder";
|
||||
if($module == 'task' && $orderBy && strpos($orderBy, 'statusOrder') !== false) $selectedFields .= ",INSTR('wait,doing,done,pause,cancel,closed,', status) AS statusOrder";
|
||||
|
||||
$table = zget($this->config->objectTables, $module); //获取对应的表
|
||||
$moduleDatas = $this->dao->select($selectedFields)->from($table)
|
||||
|
||||
@@ -4045,6 +4045,7 @@ class upgradeModel extends model
|
||||
$project->lastEditedBy = $account;
|
||||
$project->lastEditedDate = $now;
|
||||
$project->acl = isset($data->projectAcl) ? $data->projectAcl : 'open';
|
||||
$project->storyType = 'story,requirement';
|
||||
$this->dao->insert(TABLE_PROJECT)->data($project)
|
||||
->batchcheck('name', 'notempty')
|
||||
->check('name', 'unique', "type='project' AND parent='{$programID}' AND deleted='0'")
|
||||
|
||||
Reference in New Issue
Block a user