Merge branch 'master' of github.com:easysoft/zentaopms
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
ALTER TABLE `zt_task` DROP `statusCustom`;
|
||||
ALTER TABLE `zt_story` CHANGE `status` `status` enum('','draft','active','closed','changed') COLLATE 'utf8_general_ci' NOT NULL DEFAULT '' AFTER `estimate`;
|
||||
ALTER TABLE `zt_story` CHANGE `stage` `stage` enum('','wait','planned','projected','developing','developed','testing','tested','verified','released') COLLATE 'utf8_general_ci' NOT NULL DEFAULT 'wait' AFTER `status`;
|
||||
ALTER TABLE `zt_testTask` CHANGE `status` `status` enum('wait','doing','done','blocked') COLLATE 'utf8_general_ci' NOT NULL DEFAULT 'wait' AFTER `report`;
|
||||
ALTER TABLE `zt_todo` CHANGE `status` `status` enum('wait','doing','done') COLLATE 'utf8_general_ci' NOT NULL DEFAULT 'wait' AFTER `desc`;
|
||||
@@ -369,6 +369,11 @@ class bug extends control
|
||||
$stories = $this->story->getProductStoryPairs($productID);
|
||||
}
|
||||
|
||||
/* Remove the unused types. */
|
||||
unset($this->lang->bug->typeList['designchange']);
|
||||
unset($this->lang->bug->typeList['newfeature']);
|
||||
unset($this->lang->bug->typeList['trackthings']);
|
||||
|
||||
$this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->bug->batchCreate;
|
||||
$this->view->position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $this->products[$productID]);
|
||||
$this->view->position[] = $this->lang->bug->batchCreate;
|
||||
|
||||
@@ -41,3 +41,7 @@ $lang->build->bugs = 'Linked bugs';
|
||||
|
||||
$lang->build->finishStories = 'The total demand for a complete %s';
|
||||
$lang->build->resolvedBugs = 'The total solution of bug%s';
|
||||
|
||||
$lang->build->placeholder = new stdclass();
|
||||
$lang->build->placeholder->scmPath = 'Software source code repository, such as Subversion or Git';
|
||||
$lang->build->placeholder->filePath = 'The path of this build package to download';
|
||||
|
||||
@@ -41,3 +41,7 @@ $lang->build->bugs = '已关联Bug';
|
||||
|
||||
$lang->build->finishStories = '本次共完成需求%s个';
|
||||
$lang->build->resolvedBugs = '本次共解决Bug%s个';
|
||||
|
||||
$lang->build->placeholder = new stdclass();
|
||||
$lang->build->placeholder->scmPath = ' 软件源代码库,如Subversion、Git库地址';
|
||||
$lang->build->placeholder->filePath = ' 该版本软件包下载存储地址';
|
||||
|
||||
@@ -47,11 +47,11 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->build->scmPath;?></th>
|
||||
<td colspan='2'><?php echo html::input('scmPath', '', "class='form-control'");?></td>
|
||||
<td colspan='2'><?php echo html::input('scmPath', '', "class='form-control' placeholder='{$lang->build->placeholder->scmPath}'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->build->filePath;?></th>
|
||||
<td colspan='2'><?php echo html::input('filePath', '', "class='form-control'");?></td>
|
||||
<td colspan='2'><?php echo html::input('filePath', '', "class='form-control' placeholder='{$lang->build->placeholder->filePath}'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->build->files;?></th>
|
||||
|
||||
@@ -41,11 +41,11 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->build->scmPath;?></th>
|
||||
<td colspan='2'><?php echo html::input('scmPath', $build->scmPath, "class='form-control'");?></td>
|
||||
<td colspan='2'><?php echo html::input('scmPath', $build->scmPath, "class='form-control' placeholder='{$lang->build->placeholder->scmPath}'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->build->filePath;?></th>
|
||||
<td colspan='2'><?php echo html::input('filePath', $build->filePath, "class='form-control'");?></td>
|
||||
<td colspan='2'><?php echo html::input('filePath', $build->filePath, "class='form-control' placeholder='{$lang->build->placeholder->filePath}'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->build->files;?></th>
|
||||
|
||||
@@ -887,7 +887,6 @@ class projectModel extends model
|
||||
}
|
||||
|
||||
$data->status = $task->consumed > 0 ? 'doing' : 'wait';
|
||||
$data->statusCustom = strpos(TASKMODEL::CUSTOM_STATUS_ORDER, $data->status) + 1;
|
||||
$this->dao->update(TABLE_TASK)->data($data)->where('id')->in($this->post->tasks)->exec();
|
||||
$this->loadModel('action')->create('task', $task->id, 'moved', '', $task->project);
|
||||
}
|
||||
@@ -949,7 +948,6 @@ class projectModel extends model
|
||||
$task->pri = $BugToTasks->pri[$key];
|
||||
$task->consumed = 0;
|
||||
$task->status = 'wait';
|
||||
$task->statusCustom = strpos(taskModel::CUSTOM_STATUS_ORDER, 'wait') + 1;
|
||||
$task->desc = $bugLang->bug->resolve . ':' . '#' . html::a(helper::createLink('bug', 'view', "bugID=$key"), sprintf('%03d', $key));
|
||||
$task->openedDate = $now;
|
||||
$task->openedBy = $this->app->user->account;
|
||||
|
||||
@@ -56,7 +56,6 @@ $lang->task->date = 'Date';
|
||||
$lang->task->deadline = 'Deadline';
|
||||
$lang->task->deadlineAB = 'Deadline';
|
||||
$lang->task->status = 'Status';
|
||||
$lang->task->statusCustom = 'Status Order';
|
||||
$lang->task->desc = 'Desc';
|
||||
$lang->task->assign = 'Assign';
|
||||
$lang->task->assignTo = $lang->task->assign;
|
||||
|
||||
@@ -56,7 +56,6 @@ $lang->task->date = '日期';
|
||||
$lang->task->deadline = '截止日期';
|
||||
$lang->task->deadlineAB = '截止';
|
||||
$lang->task->status = '任务状态';
|
||||
$lang->task->statusCustom = '状态排序';
|
||||
$lang->task->desc = '任务描述';
|
||||
$lang->task->assign = '指派';
|
||||
$lang->task->assignTo = $lang->task->assign;
|
||||
|
||||
@@ -13,8 +13,6 @@
|
||||
<?php
|
||||
class taskModel extends model
|
||||
{
|
||||
const CUSTOM_STATUS_ORDER = 'wait,doing,done,cancel,closed';
|
||||
|
||||
/**
|
||||
* Create a task.
|
||||
*
|
||||
@@ -46,8 +44,6 @@ class taskModel extends model
|
||||
|
||||
if($assignedTo) $task->assignedDate = helper::now();
|
||||
|
||||
$this->setStatus($task);
|
||||
|
||||
$this->dao->insert(TABLE_TASK)->data($task)
|
||||
->autoCheck()
|
||||
->batchCheck($this->config->task->create->requiredFields, 'notempty')
|
||||
@@ -121,7 +117,6 @@ class taskModel extends model
|
||||
$data[$i]->status = 'wait';
|
||||
$data[$i]->openedBy = $this->app->user->account;
|
||||
$data[$i]->openedDate = $now;
|
||||
$data[$i]->statusCustom = strpos(self::CUSTOM_STATUS_ORDER, 'wait') + 1;
|
||||
if($tasks->story[$i] != '') $data[$i]->storyVersion = $this->loadModel('story')->getVersion($data[$i]->story);
|
||||
if($tasks->assignedTo[$i] != '') $data[$i]->assignedDate = $now;
|
||||
|
||||
@@ -184,7 +179,6 @@ class taskModel extends model
|
||||
->remove('comment,files,labels')
|
||||
->join('mailto', ',')
|
||||
->get();
|
||||
$task->statusCustom = strpos(self::CUSTOM_STATUS_ORDER, $task->status) + 1;
|
||||
|
||||
if($task->consumed < $oldTask->consumed)
|
||||
{
|
||||
@@ -268,7 +262,6 @@ class taskModel extends model
|
||||
$task->lastEditedBy = $this->app->user->account;
|
||||
$task->lastEditedDate = $now;
|
||||
$task->consumed = $oldTask->consumed;
|
||||
$this->setStatus($task);
|
||||
if(isset($this->post->assignedTos[$taskID]))
|
||||
{
|
||||
$task->assignedDate = $this->post->assignedTos[$taskID] == $oldTask->assignedTo ? $oldTask->assignedDate : $now;
|
||||
@@ -412,7 +405,6 @@ class taskModel extends model
|
||||
{
|
||||
$task->status = 'doing';
|
||||
}
|
||||
$this->setStatus($task);
|
||||
|
||||
$this->dao->update(TABLE_TASK)->data($task)
|
||||
->autoCheck()
|
||||
@@ -553,8 +545,6 @@ class taskModel extends model
|
||||
$estimate->consumed = $estimate->consumed - $oldTask->consumed;
|
||||
if($estimate->consumed) $this->addTaskEstimate($estimate);
|
||||
|
||||
$this->setStatus($task);
|
||||
|
||||
$this->dao->update(TABLE_TASK)->data($task)
|
||||
->autoCheck()
|
||||
->check('consumed', 'notempty')
|
||||
@@ -585,7 +575,6 @@ class taskModel extends model
|
||||
->setIF($oldTask->status == 'cancel', 'closedReason', 'cancel')
|
||||
->remove('_recPerPage')
|
||||
->remove('comment')->get();
|
||||
$this->setStatus($task);
|
||||
|
||||
$this->dao->update(TABLE_TASK)->data($task)->autoCheck()->where('id')->eq((int)$taskID)->exec();
|
||||
|
||||
@@ -613,7 +602,6 @@ class taskModel extends model
|
||||
->setDefault('canceledBy, lastEditedBy', $this->app->user->account)
|
||||
->setDefault('canceledDate, lastEditedDate', $now)
|
||||
->remove('comment')->get();
|
||||
$this->setStatus($task);
|
||||
|
||||
$this->dao->update(TABLE_TASK)->data($task)->autoCheck()->where('id')->eq((int)$taskID)->exec();
|
||||
|
||||
@@ -639,7 +627,6 @@ class taskModel extends model
|
||||
->setDefault('lastEditedBy', $this->app->user->account)
|
||||
->setDefault('lastEditedDate', helper::now())
|
||||
->remove('comment')->get();
|
||||
$this->setStatus($task);
|
||||
|
||||
$this->dao->update(TABLE_TASK)->data($task)
|
||||
->autoCheck()
|
||||
@@ -705,7 +692,6 @@ class taskModel extends model
|
||||
*/
|
||||
public function getTasksByModule($projectID = 0, $moduleIds = 0, $orderBy = 'id_desc', $pager = null)
|
||||
{
|
||||
$orderBy = str_replace('status', 'statusCustom', $orderBy);
|
||||
$tasks = $this->dao->select('t1.*, t2.id AS storyID, t2.title AS storyTitle, t2.version AS latestStoryVersion, t2.status AS storyStatus, t3.realname AS assignedToRealName')
|
||||
->from(TABLE_TASK)->alias('t1')
|
||||
->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story = t2.id')
|
||||
@@ -735,7 +721,6 @@ class taskModel extends model
|
||||
*/
|
||||
public function getProjectTasks($projectID, $type = 'all', $orderBy = 'status_asc, id_desc', $pager = null)
|
||||
{
|
||||
$orderBy = str_replace('status', 'statusCustom', $orderBy);
|
||||
$type = strtolower($type);
|
||||
$tasks = $this->dao->select('t1.*, t2.id AS storyID, t2.title AS storyTitle, t2.version AS latestStoryVersion, t2.status AS storyStatus, t3.realname AS assignedToRealName')
|
||||
->from(TABLE_TASK)->alias('t1')
|
||||
@@ -1053,18 +1038,6 @@ class taskModel extends model
|
||||
|
||||
return $task;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the status field of a task.
|
||||
*
|
||||
* @param object $task
|
||||
* @access private
|
||||
* @return void
|
||||
*/
|
||||
public function setStatus($task)
|
||||
{
|
||||
$task->statusCustom = strpos(self::CUSTOM_STATUS_ORDER, $task->status) + 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Merge the default chart settings and the settings of current chart.
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user