This commit is contained in:
liyuchun
2021-09-13 11:17:48 +08:00
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -371,7 +371,8 @@ class productModel extends model
public function getProductIDByProject($projectID, $isFirst = true)
{
$products = $this->dao->select('product')->from(TABLE_PROJECTPRODUCT)
->where('product')->in($this->app->user->view->products)
->where('1=1')
->beginIF(!$this->app->user->admin)->andWhere('product')->in($this->app->user->view->products)->fi()
->beginIF($projectID)->andWhere('project')->eq($projectID)->fi()
->fetchPairs();
+2 -1
View File
@@ -350,7 +350,7 @@ class repoModel extends model
$scm = $repo->SCM == 'Subversion' ? 'svn' : 'git';
if($this->checkPriv($repo))
{
if($type == 'project' or $type == 'execution')
if(($type == 'project' or $type == 'execution') and $projectID)
{
foreach($productIdList as $productID)
{
@@ -1510,6 +1510,7 @@ class repoModel extends model
elseif($taskAction == 'finish' and in_array($task->status, array('wait', 'pause', 'doing')))
{
$this->post->set('finishedDate', date('Y-m-d'));
$this->post->set('realStarted', date('Y-m-d'));
$this->post->set('currentConsumed', $this->post->consumed);
$this->post->set('consumed', $this->post->consumed + $task->consumed);
$changes = $this->task->finish($taskID);