* Finish task #3226.
This commit is contained in:
@@ -30,7 +30,7 @@ $config->task->editor->cancel = array('id' => 'comment', 'tools' => 'simpleToo
|
||||
$config->task->editor->pause = array('id' => 'comment', 'tools' => 'simpleTools');
|
||||
|
||||
$config->task->exportFields = '
|
||||
id, project, module, story,
|
||||
id, project, module, progess, story,
|
||||
name, desc,
|
||||
type, pri,estStarted, realStarted, deadline, status,estimate, consumed, left,
|
||||
mailto,
|
||||
|
||||
@@ -1150,6 +1150,27 @@ class task extends control
|
||||
$tasks = $this->dao->select('*')->from(TABLE_TASK)->alias('t1')->where($this->session->taskQueryCondition)
|
||||
->beginIF($this->post->exportType == 'selected')->andWhere('t1.id')->in($this->cookie->checkedItem)->fi()
|
||||
->orderBy($orderBy)->fetchAll('id');
|
||||
|
||||
foreach($tasks as $key => $task)
|
||||
{
|
||||
/* Compute task progess. */
|
||||
if($task->consumed == 0 and $task->left == 0)
|
||||
{
|
||||
$task->progess = 0;
|
||||
}
|
||||
elseif($task->consumed != 0 and $task->left == 0)
|
||||
{
|
||||
$task->progess = 100;
|
||||
}
|
||||
else
|
||||
{
|
||||
$task->progess = round($task->consumed / ($task->consumed + $task->left), 2) * 100;
|
||||
}
|
||||
|
||||
$task->progess .= '%';
|
||||
|
||||
$tasks[$key] = $task;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1215,25 +1215,25 @@ class taskModel extends model
|
||||
|
||||
/**
|
||||
* Process a task, judge it's status.
|
||||
*
|
||||
* @param object $task
|
||||
*
|
||||
* @param object $task
|
||||
* @access private
|
||||
* @return object
|
||||
*/
|
||||
public function processTask($task)
|
||||
{
|
||||
$today = helper::today();
|
||||
|
||||
|
||||
/* Delayed or not?. */
|
||||
if($task->status !== 'done' and $task->status !== 'cancel' and $task->status != 'closed')
|
||||
{
|
||||
if($task->deadline != '0000-00-00')
|
||||
{
|
||||
$delay = helper::diffDate($today, $task->deadline);
|
||||
if($delay > 0) $task->delay = $delay;
|
||||
}
|
||||
if($delay > 0) $task->delay = $delay;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Story changed or not. */
|
||||
$task->needConfirm = false;
|
||||
if($task->storyStatus == 'active' and $task->latestStoryVersion > $task->storyVersion) $task->needConfirm = true;
|
||||
|
||||
Reference in New Issue
Block a user