From e9e500efb221084cac0c62f53d4ea9a9bd81b190 Mon Sep 17 00:00:00 2001 From: leiyong <1549684884@qq.com> Date: Tue, 18 Feb 2020 14:43:31 +0800 Subject: [PATCH] =?UTF-8?q?fix=20bug=20#2939=EF=BC=8C#2912=20Finish=20the?= =?UTF-8?q?=20task=20#6901?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/action/model.php | 8 +++----- module/backup/view/index.html.php | 2 +- module/block/control.php | 2 +- module/block/view/dynamic.html.php | 2 +- module/my/view/task.html.php | 2 +- module/project/model.php | 2 +- module/task/model.php | 2 +- 7 files changed, 9 insertions(+), 11 deletions(-) diff --git a/module/action/model.php b/module/action/model.php index 3d168742bb..7bd1750486 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -590,10 +590,9 @@ class actionModel extends model /** * Get actions as dynamic. * - * @param string $objectType - * @param string $count - * @param string $period - * @param string $orderBy + * @param string $account + * @param string $period + * @param string $orderBy * @param object $pager * @param string|int $productID all|int(like 123)|notzero all => include zeror, notzero, great than 0 * @param string|int $projectID same as productID @@ -656,7 +655,6 @@ class actionModel extends model if(!$actions) return array(); $this->loadModel('common')->saveQueryCondition($this->dao->get(), 'action'); - return $this->transformActions($actions);; } diff --git a/module/backup/view/index.html.php b/module/backup/view/index.html.php index 4fb0ffce9d..4ea94a16b3 100644 --- a/module/backup/view/index.html.php +++ b/module/backup/view/index.html.php @@ -31,7 +31,7 @@ - + diff --git a/module/block/control.php b/module/block/control.php index f7960cc286..3bfe610c70 100644 --- a/module/block/control.php +++ b/module/block/control.php @@ -249,7 +249,7 @@ class block extends control $block->actionLink = ''; if($block->block == 'overview') { - if($module == 'qa' && common::hasPriv('testcase', 'create')) + if($module == 'qa' && common::hasPriv('testcase', 'create')) { $this->app->loadLang('testcase'); $block->actionLink = html::a($this->createLink('testcase', 'create', 'productID='), " " . $this->lang->testcase->create, '', "class='btn btn-primary'"); diff --git a/module/block/view/dynamic.html.php b/module/block/view/dynamic.html.php index d23610aaec..05b98b0f15 100644 --- a/module/block/view/dynamic.html.php +++ b/module/block/view/dynamic.html.php @@ -12,7 +12,7 @@ foreach($actions as $action) { $user = zget($users, $action->actor); - if($action->action == 'login' or $action->action == 'logout' or empty($action->objectLink)) $action->objectName = $action->objectLabel = ''; + if($action->action == 'login' or $action->action == 'logout') $action->objectName = $action->objectLabel = ''; $class = $action->major ? "class='active'" : ''; echo "
  • "; printf($lang->block->dynamicInfo, $action->date, $user, $action->actionLabel, $action->objectLabel, $action->objectLink, $action->objectName, $action->objectName); diff --git a/module/my/view/task.html.php b/module/my/view/task.html.php index bc64c852a2..8ce0a1b8b3 100644 --- a/module/my/view/task.html.php +++ b/module/my/view/task.html.php @@ -85,7 +85,7 @@
  • backup->time?> backup->files?>left;?> '>deadline, 0, 4) > 0) echo $task->deadline;?> - storyStatus) and $task->storyStatus == 'active' and $task->latestStoryVersion > $task->storyVersion);?> + storyStatus) and $task->storyStatus == 'active' and $task->latestStoryVersion > $task->storyVersion and !in_array($task->status, array('cancel', 'closed')));?> {$this->lang->story->changed}") : print(" " . $this->processStatus('task', $task) . "");?> diff --git a/module/project/model.php b/module/project/model.php index a09167dbe8..b670981e00 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -1433,7 +1433,7 @@ class projectModel extends model ->andWhere('t1.deleted')->eq(0) ->fetch('storyCount'); - $taskCount = $this->dao->select('count(id) as taskCount')->from(TABLE_TASK)->where('project')->eq($projectID)->andWhere('parent')->lt(1)->andWhere('deleted')->eq(0)->fetch('taskCount'); + $taskCount = $this->dao->select('count(id) as taskCount')->from(TABLE_TASK)->where('project')->eq($projectID)->andWhere('deleted')->eq(0)->fetch('taskCount'); $bugCount = $this->dao->select('count(id) as bugCount')->from(TABLE_BUG)->where('project')->eq($projectID)->andWhere('deleted')->eq(0)->fetch('bugCount'); $statData = new stdclass(); diff --git a/module/task/model.php b/module/task/model.php index 37ade8155b..b8ae24a1c4 100644 --- a/module/task/model.php +++ b/module/task/model.php @@ -2651,7 +2651,7 @@ class taskModel extends model $canBatchAssignTo = common::hasPriv('task', 'batchAssignTo', !empty($task) ? $task : null); $canBatchAction = $canBatchEdit or $canBatchClose or $canBatchCancel or $canBatchChangeModule or $canBatchAssignTo; - $storyChanged = (!empty($task->storyStatus) and $task->storyStatus == 'active' and $task->latestStoryVersion > $task->storyVersion); + $storyChanged = (!empty($task->storyStatus) and $task->storyStatus == 'active' and $task->latestStoryVersion > $task->storyVersion and !in_array($task->status, array('cancel', 'closed'))); $canView = common::hasPriv('task', 'view'); $taskLink = helper::createLink('task', 'view', "taskID=$task->id");