From f34bce05bf6c32e24d27168591efcc6a033c7d8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=80=A1=E6=A0=8B?= Date: Wed, 23 Feb 2022 17:00:55 +0800 Subject: [PATCH 1/2] * code for task #49401. --- module/execution/view/all.html.php | 6 ++- module/task/model.php | 4 +- module/todo/model.php | 3 +- module/todo/view/batchcreate.html.php | 58 +++++++++++++-------------- 4 files changed, 38 insertions(+), 33 deletions(-) diff --git a/module/execution/view/all.html.php b/module/execution/view/all.html.php index 9389fca476..4ef7797cb9 100644 --- a/module/execution/view/all.html.php +++ b/module/execution/view/all.html.php @@ -91,6 +91,8 @@ execution->realEnd);?> actions;?> + execution->begin);?> + execution->end);?> execution->totalEstimate;?> execution->totalConsumed;?> execution->totalLeft;?> @@ -118,7 +120,7 @@ id);?> flex' title='name?>'> - systemMode == 'new'):?> + systemMode == 'new'):?> '>execution->typeList[$execution->type]?> + begin) ? '' : $execution->begin;?> + end) ? '' : $execution->end;?> lang->execution->workHour;?>'>hours->totalEstimate . $this->lang->execution->workHourUnit;?> lang->execution->workHour;?>'>hours->totalConsumed . $this->lang->execution->workHourUnit;?> lang->execution->workHour;?>'>hours->totalLeft . $this->lang->execution->workHourUnit;?> diff --git a/module/task/model.php b/module/task/model.php index c7df38e81e..b0d6152ae3 100644 --- a/module/task/model.php +++ b/module/task/model.php @@ -2526,7 +2526,7 @@ class taskModel extends model $lastEstimate = $this->dao->select('*')->from(TABLE_TASKESTIMATE)->where('task')->eq($estimate->task)->orderBy('date desc,id desc')->limit(1)->fetch(); $consumed = $task->consumed - $estimate->consumed; - $left = $lastEstimate->left ? $lastEstimate->left : $estimate->left; + $left = isset($lastEstimate->left) ? $lastEstimate->left : $estimate->left; $data = new stdclass(); $data->consumed = $consumed; @@ -2551,7 +2551,7 @@ class taskModel extends model $this->dao->update(TABLE_TASK)->data($data) ->where('id')->eq($estimate->task)->exec(); if($task->parent > 0) $this->updateParentStatus($task->id); - if($task->story) $this->loadModel('story')->setStage($oldTask->story); + if($task->story) $this->loadModel('story')->setStage($task->story); $oldTask = new stdClass(); $oldTask->consumed = $task->consumed; diff --git a/module/todo/model.php b/module/todo/model.php index d842163c4e..6336923bf3 100644 --- a/module/todo/model.php +++ b/module/todo/model.php @@ -30,6 +30,7 @@ class todoModel extends model $todo = fixer::input('post') ->add('account', $this->app->user->account) ->setDefault('idvalue', 0) + ->setDefault('vision', $this->config->vision) ->setDefault('assignedTo', $this->app->user->account) ->setDefault('assignedBy', $this->app->user->account) ->setDefault('assignedDate', helper::now()) @@ -175,7 +176,7 @@ class todoModel extends model $todo->assignedTo = $this->app->user->account; $todo->assignedBy = $this->app->user->account; $todo->assignedDate = $now; - $todo->vision = $todos->vision[$i]; + $todo->vision = $this->config->vision; if(in_array($todo->type, $this->config->todo->moduleList)) $todo->idvalue = isset($todos->{$this->config->todo->objectList[$todo->type]}[$i + 1]) ? $todos->{$this->config->todo->objectList[$todo->type]}[$i + 1] : 0; diff --git a/module/todo/view/batchcreate.html.php b/module/todo/view/batchcreate.html.php index 1d1b307da9..4fb05c2e10 100755 --- a/module/todo/view/batchcreate.html.php +++ b/module/todo/view/batchcreate.html.php @@ -14,34 +14,34 @@ todo->moduleList)?> todo->getUserObjectsMethod)?> -
'> -
-
-

todo->batchCreate . $lang->todo->common;?>

-
- todo->date;?> - - -
- - -
-
-
-
- createLink('custom', 'ajaxSaveCustomFields', 'module=todo§ion=custom&key=batchCreateFields')?> - -
-
+
+
+

todo->batchCreate . $lang->todo->common;?>

+
+ todo->date;?> + + +
+ + +
+
- +
+ createLink('custom', 'ajaxSaveCustomFields', 'module=todo§ion=custom&key=batchCreateFields')?> + +
+
+
+ + '> @@ -88,8 +88,8 @@
'>
-
- + +