This commit is contained in:
hufangzhou
2021-08-18 16:27:35 +08:00
16 changed files with 29 additions and 27 deletions
-1
View File
@@ -523,7 +523,6 @@ class gitlab
if(!scm::checkRevision($version)) return array();
$api = "commits";
/* TODO Put getCommits into cron job. And check best size of $count. */
if(empty($count)) $count = 10;
$params = array();
+2 -2
View File
@@ -285,7 +285,7 @@ class bugModel extends model
public function createBugFromGitlabIssue($bug, $executionID)
{
$bug->openedBy = $this->app->user->account;
$bug->openedDate = helper::now(); // TODO(dingguodong) use from issue->created_at ?
$bug->openedDate = helper::now();
$bug->assignedDate = isset($bug->assignedTo) ? helper::now() : 0;
$bug->openedBuild = 'trunk';
$bug->story = 0;
@@ -1817,7 +1817,7 @@ class bugModel extends model
$bugSteps .= $this->lang->bug->tplResult;
$bugSteps .= $this->lang->bug->tplExpect;
}
if(!empty($run->task)) $testtask = $this->loadModel('testtask')->getById($run->task);
$executionID = isset($testtask->execution) ? $testtask->execution : 0;
+8 -6
View File
@@ -195,9 +195,13 @@ class entryModel extends model
$detail->url = helper::createLink('user', 'profile', "userID={$user->id}");
if($user->avatar != "")
{
$detail->avatar = common::getSysURL() . $user->avatar;
}
else
{
$detail->avatar = "https://www.gravatar.com/avatar/" . md5($user->account) . "?d=identicon&s=80";
}
return $detail;
}
@@ -212,11 +216,10 @@ class entryModel extends model
*/
public function getAssignees($objectType, $object)
{
$users = $this->dao
->select('account')->from(TABLE_TEAM)
->where('type')->eq($objectType)
->andWhere('root')->eq($object->id)
->fetchAll();
$users = $this->dao->select('account')->from(TABLE_TEAM)
->where('type')->eq($objectType)
->andWhere('root')->eq($object->id)
->fetchAll();
if($users)
{
@@ -230,5 +233,4 @@ class entryModel extends model
return ($object->assignedTo == "" or $object->assignedTo == "closed") ? array() : array($this->getUser($object->assignedTo));
}
}
+2 -1
View File
@@ -22,7 +22,8 @@
.board-title {padding-right: 20px;}
.board-actions {position: absolute; right: 3px; top: 3px;}
.board-actions.nav > li > a {padding: 3px 3px;}
#kanban {overflow-y: auto; min-height:350px;}
#kanban {overflow-y: auto; min-height: 350px;}
#kanban > .table {min-width: 1100px; table-layout: auto;}
#kanban.dragging .boards.dragging .board {background: #eee; opacity: .35; border-color: #f1f1f1;}
#kanban thead > tr > th {padding-left: 0; padding-right: 0;}
+4 -4
View File
@@ -1299,15 +1299,15 @@ class executionModel extends model
{
$link = helper::createLink('repo', 'browse', "repoID=0&branchID=&executionID=%s");
}
elseif($module == 'doc')
{
$link = helper::createLink('doc', $method, "type=execution&objectID=%s&from=execution");
}
else
{
$link = helper::createLink($module, $method, "executionID=%s");
}
if($module == 'doc')
{
$link = helper::createLink('doc', $method, "type=execution&objectID=%s&from=execution");
}
return $link;
}
-1
View File
@@ -623,7 +623,6 @@ class gitlabModel extends model
*/
public function apiGetIssues($gitlabID, $projectID, $options = null)
{
/* TODO(dingguodong) not pagination yet. */
if($options)
{
$url = sprintf($this->getApiRoot($gitlabID), "/projects/{$projectID}/issues") . '&per_page=20' . $options;
+4 -4
View File
@@ -247,7 +247,7 @@ class programModel extends model
{
$totalProgress = array();
$projectCount = array();
$userPrjCount = array();
$userPRJCount = array();
$progressList = array();
$programPairs = $this->getPairs();
$projectStats = $this->getProjectStats(0, 'all', 0, 'id_desc', null, 0, 0, true);
@@ -257,7 +257,7 @@ class programModel extends model
{
$totalProgress[$programID] = 0;
$projectCount[$programID] = 0;
$userPrjCount[$programID] = 0;
$userPRJCount[$programID] = 0;
$progressList[$programID] = 0;
foreach($projectStats as $project)
@@ -265,7 +265,7 @@ class programModel extends model
if(strpos($project->path, ',' . $programID . ',') === false) continue;
/* The number of projects under this program that the user can view. */
if(strpos(',' . $this->app->user->view->projects . ',', ',' . $project->id . ',') !== false) $userPrjCount[$programID] ++;
if(strpos(',' . $this->app->user->view->projects . ',', ',' . $project->id . ',') !== false) $userPRJCount[$programID] ++;
$totalProgress[$programID] += $project->hours->progress;
$projectCount[$programID] ++;
@@ -274,7 +274,7 @@ class programModel extends model
if(empty($projectCount[$programID])) continue;
/* Program progress can't see when this user don't have all projects priv. */
if(!$this->app->user->admin and $userPrjCount[$programID] != $projectCount[$programID])
if(!$this->app->user->admin and $userPRJCount[$programID] != $projectCount[$programID])
{
unset($progressList[$programID]);
continue;
+1 -1
View File
@@ -1617,7 +1617,7 @@ class projectModel extends model
return $this->dao->select('account, role, hours')
->from(TABLE_TEAM)
->where('root')->eq($projectID)
->andWhere('type')->in('project')
->andWhere('type')->eq('project')
->andWhere('account')->notIN($currentMembers)
->fetchAll('account');
}
+1 -1
View File
@@ -14,7 +14,7 @@ $lang->projectstory->confirm = 'Confirm';
/* Notice. */
$lang->projectstory->whyNoStories = "No story can be linked. Please check whether there is any story in project which is linked to {$lang->productCommon} and make sure it has been reviewed.";
$lang->projectstory->batchUnlinkTip = 'The following requirements are linked to Executions of this project, please remove them from the execution first.';
$lang->projectstory->batchUnlinkTip = 'Other requirements are removed. The following requirements are linked to the execution of this project. Please remove them from the execution first.';
global $app;
$app->loadLang('product');
+1 -1
View File
@@ -14,7 +14,7 @@ $lang->projectstory->confirm = 'Confirm';
/* Notice. */
$lang->projectstory->whyNoStories = "No story can be linked. Please check whether there is any story in project which is linked to {$lang->productCommon} and make sure it has been reviewed.";
$lang->projectstory->batchUnlinkTip = 'The following requirements are linked to Executions of this project, please remove them from the execution first.';
$lang->projectstory->batchUnlinkTip = 'Other requirements are removed. The following requirements are linked to the execution of this project. Please remove them from the execution first.';
global $app;
$app->loadLang('product');
+1 -1
View File
@@ -14,7 +14,7 @@ $lang->projectstory->confirm = 'Confirm';
/* Notice. */
$lang->projectstory->whyNoStories = "No story can be linked. Please check whether there is any story in project which is linked to {$lang->productCommon} and make sure it has been reviewed.";
$lang->projectstory->batchUnlinkTip = 'The following requirements are linked to Executions of this project, please remove them from the execution first.';
$lang->projectstory->batchUnlinkTip = 'Other requirements are removed. The following requirements are linked to the execution of this project. Please remove them from the execution first.';
global $app;
$app->loadLang('product');
+1 -1
View File
@@ -14,7 +14,7 @@ $lang->projectstory->confirm = 'Confirm';
/* Notice. */
$lang->projectstory->whyNoStories = "No story can be linked. Please check whether there is any story in project which is linked to {$lang->productCommon} and make sure it has been reviewed.";
$lang->projectstory->batchUnlinkTip = 'The following requirements are linked to Executions of this project, please remove them from the execution first.';
$lang->projectstory->batchUnlinkTip = 'Other requirements are removed. The following requirements are linked to the execution of this project. Please remove them from the execution first.';
global $app;
$app->loadLang('product');
+1 -1
View File
@@ -14,7 +14,7 @@ $lang->projectstory->confirm = '确定';
/* Notice. */
$lang->projectstory->whyNoStories = "看起来没有{$lang->SRCommon}可以关联。请检查下项目关联的{$lang->productCommon}中有没有{$lang->SRCommon},而且要确保它们已经审核通过。";
$lang->projectstory->batchUnlinkTip = '如下需求已与该项目下执行相关联,请从执行中移除后再操作。';
$lang->projectstory->batchUnlinkTip = '其他需求已经移除,如下需求已与该项目下执行相关联,请从执行中移除后再操作。';
global $app;
$app->loadLang('product');
+1 -1
View File
@@ -2,4 +2,4 @@
#sidebar>.sidebar-toggle>.icon {right: -2px; left: auto;}
.main-row {width: 99%;}
.btn-toolbar > .last-sync-time {display: inline-block; float: left; margin-right: 10px;}
.dropdown-menu>li.selected>a:after {content: '';}
.dropdown-menu > li.selected > a:after {content: '';}
+1
View File
@@ -614,6 +614,7 @@ class repoModel extends model
{
$repo = $this->getRepoByID($repoID);
if(empty($repo)) return array();
return $this->dao->select('id,name')->from(TABLE_PRODUCT)
->where('id')->in($repo->product)
->andWhere('deleted')->eq(0)
+1 -1
View File
@@ -30,7 +30,7 @@ class searchModel extends model
if($module == 'projectStory') $flowModule = 'story';
if($module == 'projectBug') $flowModule = 'bug';
$fields = $this->loadModel('workflowfield')->getList($flowModule);
$fields = $this->loadModel('workflowfield')->getList($flowModule);
$maxCount = $this->config->maxCount;
$this->config->maxCount = 0;