From 033af27ff32b4721096eac227875d1514eed655b Mon Sep 17 00:00:00 2001 From: dingguodong Date: Thu, 24 Aug 2023 17:13:50 +0800 Subject: [PATCH] * Fix typo in task module and related. --- module/story/zen.php | 2 +- module/task/control.php | 2 +- module/task/js/create.ui.js | 2 +- module/task/model.php | 2 +- module/task/tao.php | 6 +++--- module/task/test/task.class.php | 2 +- module/task/zen.php | 12 ++++++------ module/tree/model.php | 2 +- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/module/story/zen.php b/module/story/zen.php index 478f76b7de..588aa3a21e 100644 --- a/module/story/zen.php +++ b/module/story/zen.php @@ -762,7 +762,7 @@ class storyZen extends story protected function getAssignMeBlockID(): int { if(!isonlybody()) return 0; - return (int)$this->dao->select('id')->from(TABLE_BLOCK)->where('block')->eq('assingtome') + return (int)$this->dao->select('id')->from(TABLE_BLOCK)->where('block')->eq('assigntome') ->andWhere('module')->eq('my') ->andWhere('account')->eq($this->app->user->account) ->orderBy('order_desc') diff --git a/module/task/control.php b/module/task/control.php index 6f999dd1cc..5b0e3a231e 100755 --- a/module/task/control.php +++ b/module/task/control.php @@ -572,7 +572,7 @@ class task extends control $taskData = $this->taskZen->buildTaskForFinish($task); if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError())); - /* Get and record esitimate for task. */ + /* Get and record estimate for task. */ $effort = $this->taskZen->buildEffortForFinish($task, $taskData); if($effort->consumed > 0) $effortID = $this->task->addTaskEffort($effort); if($task->mode == 'linear' && !empty($effortID)) $this->task->updateEffortOrder($effortID, $currentTeam->order); diff --git a/module/task/js/create.ui.js b/module/task/js/create.ui.js index 3c3ce7b16c..3517f18908 100644 --- a/module/task/js/create.ui.js +++ b/module/task/js/create.ui.js @@ -80,7 +80,7 @@ function typeChange(e) * 根据选择研发需求是否勾选切换相关字段的展示与隐藏。 * Dynamically control whether task fields are hidden based on selection status of selectTestStory. * - * @param int $execuitonID + * @param int $executionID * @access public * @return void */ diff --git a/module/task/model.php b/module/task/model.php index c1b7079f13..0706e1bf82 100755 --- a/module/task/model.php +++ b/module/task/model.php @@ -236,7 +236,7 @@ class taskModel extends model if($oldTask->story) $this->story->setStage($oldTask->story); if($task->status != $oldTask->status) $this->kanban->updateLane($oldTask->execution, 'task', $taskID); - /* Udate parent task's status, date and hour. */ + /* Update parent task's status, date and hour. */ if($oldTask->parent > 0) { $this->updateParentStatus($taskID); diff --git a/module/task/tao.php b/module/task/tao.php index 0bbd7f8eeb..5f8e231c84 100644 --- a/module/task/tao.php +++ b/module/task/tao.php @@ -449,9 +449,9 @@ class taskTao extends taskModel /* If consumed of the current task is not empty and left of the current task is empty, the current task status should be done or doing. */ if($currentTask->consumed > 0 && $currentTask->left == 0) { - $finisedUsers = $this->getFinishedUsers($oldTask->id, $members); + $finishedUsers = $this->getFinishedUsers($oldTask->id, $members); /* If the number of finisher is less than the number of team members , the current task status should be doing. */ - if(count($finisedUsers) != count($members)) + if(count($finishedUsers) != count($members)) { if(strpos('cancel,pause', $oldTask->status) === false || ($oldTask->status == 'closed' && $oldTask->reason == 'done')) { @@ -1029,7 +1029,7 @@ class taskTao extends taskModel /** * 通过父任务更新子任务。 - * Update chilren task by parent task. + * Update children task by parent task. * * @param int $parentID * @param object $data diff --git a/module/task/test/task.class.php b/module/task/test/task.class.php index 99edb82125..e611d83ad1 100755 --- a/module/task/test/task.class.php +++ b/module/task/test/task.class.php @@ -1926,7 +1926,7 @@ class taskTest /** * 通过父任务更新子任务。 - * Update chilren task by parent task. + * Update children task by parent task. * * @param int $parentID * @param string $action diff --git a/module/task/zen.php b/module/task/zen.php index 7048843176..cd26643766 100644 --- a/module/task/zen.php +++ b/module/task/zen.php @@ -61,7 +61,7 @@ class taskZen extends task $this->view->gobackLink = (isset($output['from']) && $output['from'] == 'global') ? $this->createLink('execution', 'task', "executionID={$executionID}") : ''; $this->view->execution = $execution; $this->view->storyID = $storyID; - $this->view->blockID = helper::isAjaxRequest('modal') ? $this->loadModel('block')->getSpecifiedBlockID('my', 'assingtome', 'assingtome') : 0; + $this->view->blockID = helper::isAjaxRequest('modal') ? $this->loadModel('block')->getSpecifiedBlockID('my', 'assigntome', 'assigntome') : 0; $this->view->hideStory = $this->task->isNoStoryExecution($execution); $this->view->from = $storyID || $todoID || $bugID ? 'other' : 'task'; $this->view->taskID = $taskID; @@ -461,14 +461,14 @@ class taskZen extends task protected function buildTasksForBatchAssignTo(array $taskIdList, string $assignedTo): array { $taskIdList = array_unique($taskIdList); - $muletipleTasks = $this->dao->select('task, account')->from(TABLE_TASKTEAM)->where('task')->in($taskIdList)->fetchGroup('task', 'account'); + $multipleTasks = $this->dao->select('task, account')->from(TABLE_TASKTEAM)->where('task')->in($taskIdList)->fetchGroup('task', 'account'); $tasks = $this->task->getByIdList($taskIdList); /* Filter tasks. */ foreach($tasks as $taskID => $task) { - if(isset($muletipleTasks[$taskID]) && $task->assignedTo != $this->app->user->account && $task->mode == 'linear') unset($tasks[$taskID]); - if(isset($muletipleTasks[$taskID]) && !isset($muletipleTasks[$taskID][$this->post->assignedTo])) unset($tasks[$taskID]); + if(isset($multipleTasks[$taskID]) && $task->assignedTo != $this->app->user->account && $task->mode == 'linear') unset($tasks[$taskID]); + if(isset($multipleTasks[$taskID]) && !isset($multipleTasks[$taskID][$this->post->assignedTo])) unset($tasks[$taskID]); if($task->status == 'closed') unset($tasks[$taskID]); } @@ -1018,7 +1018,7 @@ class taskZen extends task /* If the task start and end date must be between the execution start and end date, check if the task start and end date accord with the conditions. */ if(!empty($this->config->limitTaskDate)) { - $this->task->checkEstStartedAndDeadline($task->execuiton, $task->estStarted, $task->deadline); + $this->task->checkEstStartedAndDeadline($task->execution, $task->estStarted, $task->deadline); if(dao::isError()) { $error = current(dao::getError()); @@ -1420,7 +1420,7 @@ class taskZen extends task * @param object $task * @param object $oldTask * @access protected - * @return objecy + * @return object */ protected function processTaskByStatus(object $task, object $oldTask): object { diff --git a/module/tree/model.php b/module/tree/model.php index bb9ae908a7..1d04247da6 100644 --- a/module/tree/model.php +++ b/module/tree/model.php @@ -1290,7 +1290,7 @@ class treeModel extends model $branchID = zget($extra, 'branchID', 0); $orderBy = zget($extra, 'orderBy', ''); $build = zget($extra, 'build', 0); - if($this->app->tab == 'execution') $param = "execuitonID={$projectID}&productID={$module->root}&branch={$branchID}&orderBy={$orderBy}&build={$build}&type={$extraType}¶m={$module->id}"; + if($this->app->tab == 'execution') $param = "executionID={$projectID}&productID={$module->root}&branch={$branchID}&orderBy={$orderBy}&build={$build}&type={$extraType}¶m={$module->id}"; if($this->app->tab == 'project') $param = "projectID={$projectID}&productID={$module->root}&branch={$branchID}&orderBy={$orderBy}&build={$build}&type={$extraType}¶m={$module->id}"; $data = new stdclass();