Merge branch 'master' of github.com:easysoft/zentaopms
This commit is contained in:
@@ -242,7 +242,7 @@ class dao
|
||||
|
||||
/**
|
||||
* The count method, call sql::select() and from().
|
||||
* use as $this->dao->count()->from(TABLE_BUG)->where('')->fetch('count');
|
||||
* use as $this->dao->select()->from(TABLE_BUG)->where()->count();
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
|
||||
@@ -97,11 +97,6 @@ $lang->action->desc->diff1 = 'changed <strong><i>%s</i></strong>, old i
|
||||
$lang->action->desc->diff2 = 'changed <strong><i>%s</i></strong>, the diff is:' . "\n" . "<blockquote>%s</blockquote>" . "\n<div class='hidden'>%s</div>";
|
||||
$lang->action->desc->diff3 = "changed file's name %s to %s.";
|
||||
|
||||
$lang->action->desc->project = new stdclass();
|
||||
$lang->action->desc->project->started = '$date, <strong>$actor</strong> started test task. <strong>$objectID</strong>。' . "\n";
|
||||
$lang->action->desc->project->closed = '$date, <strong>$actor</strong> closed test task. <strong>$objectID</strong>。' . "\n";
|
||||
$lang->action->desc->project->opened = '$date, <strong>$actor</strong> created build. <strong>$objectID</strong>。' . "\n";
|
||||
|
||||
/* The action labels. */
|
||||
$lang->action->label = new stdclass();
|
||||
$lang->action->label->created = 'created';
|
||||
|
||||
@@ -97,11 +97,6 @@ $lang->action->desc->diff1 = '修改了 <strong><i>%s</i></strong>,
|
||||
$lang->action->desc->diff2 = '修改了 <strong><i>%s</i></strong>,区别为:' . "\n" . "<blockquote>%s</blockquote>" . "\n<div class='hidden'>%s</div>";
|
||||
$lang->action->desc->diff3 = '将文件名 %s 改为 %s 。' . "\n";
|
||||
|
||||
$lang->action->desc->project = new stdclass();
|
||||
$lang->action->desc->project->started = '$date, 由 <strong>$actor</strong> 启动测试任务 <strong>$objectID</strong>。' . "\n";
|
||||
$lang->action->desc->project->closed = '$date, 由 <strong>$actor</strong> 完成测试任务 <strong>$objectID</strong>。' . "\n";
|
||||
$lang->action->desc->project->opened = '$date, 由 <strong>$actor</strong> 创建版本 <strong>$objectID</strong>。' . "\n";
|
||||
|
||||
/* 用来显示动态信息。*/
|
||||
$lang->action->label = new stdclass();
|
||||
$lang->action->label->created = '创建';
|
||||
|
||||
+54
-9
@@ -186,10 +186,13 @@ class actionModel extends model
|
||||
{
|
||||
$commiters = $this->loadModel('user')->getCommiters();
|
||||
$actions = $this->dao->select('*')->from(TABLE_ACTION)
|
||||
->beginIF($objectType == 'project')
|
||||
->where("objectType IN('project', 'testtask', 'build')")
|
||||
->andWhere('project')->eq($objectID)
|
||||
->fi()
|
||||
->beginIF($objectType != 'project')
|
||||
->where('objectType')->eq($objectType)
|
||||
->andWhere('objectID')->eq($objectID)
|
||||
->beginIF($objectType == 'project')
|
||||
->orWhere("project = $objectID AND ((objectType = 'testtask' AND action IN('started','closed')) OR (objectType = 'build' AND action = 'opened'))")
|
||||
->fi()
|
||||
->orderBy('date, id')->fetchAll('id');
|
||||
$histories = $this->getHistory(array_keys($actions));
|
||||
@@ -202,9 +205,58 @@ class actionModel extends model
|
||||
$action->comment = $this->file->setImgSize($action->comment, $this->config->action->commonImgSize);
|
||||
$actions[$actionID] = $action;
|
||||
}
|
||||
|
||||
if($objectType == 'project')
|
||||
{
|
||||
$this->app->loadLang('build');
|
||||
$this->app->loadLang('testtask');
|
||||
return $this->processProjectActions($actions);
|
||||
}
|
||||
|
||||
return $actions;
|
||||
}
|
||||
|
||||
/**
|
||||
* process Project Actions change actionStype
|
||||
*
|
||||
* @param array $actions
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function processProjectActions($actions)
|
||||
{
|
||||
$newActions = array();
|
||||
foreach($actions as $action)
|
||||
{
|
||||
if($action->objectType == 'project')
|
||||
{
|
||||
$newActions[] = $action;
|
||||
}
|
||||
elseif($action->objectType == 'testtask')
|
||||
{
|
||||
if($action->action == 'started')
|
||||
{
|
||||
$action->action = 'testtaskstarted';
|
||||
$newActions[] = $action;
|
||||
}
|
||||
elseif($action->action == 'closed')
|
||||
{
|
||||
$action->action = 'testtaskclosed';
|
||||
$newActions[] = $action;
|
||||
}
|
||||
}
|
||||
elseif($action->objectType == 'build')
|
||||
{
|
||||
if($action->action == 'opened')
|
||||
{
|
||||
$action->action = 'buildopened';
|
||||
$newActions[] = $action;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $newActions;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get an action record.
|
||||
*
|
||||
@@ -318,13 +370,6 @@ class actionModel extends model
|
||||
$desc = $action->extra ? $this->lang->action->desc->extra : $this->lang->action->desc->common;
|
||||
}
|
||||
|
||||
/* if module == 'project' and method == 'view' and objectType in 'testtask, build', try to find special lang */
|
||||
if($this->app->getModuleName() == 'project' && $this->app->getMethodName() == 'view')
|
||||
{
|
||||
if(($objectType == 'testtask' || $objectType == 'build') && isset($this->lang->action->desc->project->$actionType))
|
||||
$desc = $this->lang->action->desc->project->$actionType;
|
||||
}
|
||||
|
||||
if($this->app->getViewType() == 'mhtml') $action->date = date('m-d H:i', strtotime($action->date));
|
||||
|
||||
/* Cycle actions, replace vars. */
|
||||
|
||||
@@ -45,3 +45,6 @@ $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';
|
||||
|
||||
$lang->build->action = new stdclass();
|
||||
$lang->build->action->buildopened = '$date, <strong>$actor</strong> created build. <strong>$objectID</strong>。' . "\n";
|
||||
|
||||
@@ -45,3 +45,6 @@ $lang->build->resolvedBugs = '本次共解决Bug%s个';
|
||||
$lang->build->placeholder = new stdclass();
|
||||
$lang->build->placeholder->scmPath = ' 软件源代码库,如Subversion、Git库地址';
|
||||
$lang->build->placeholder->filePath = ' 该版本软件包下载存储地址';
|
||||
|
||||
$lang->build->action = new stdclass();
|
||||
$lang->build->action->buildopened = '$date, 由 <strong>$actor</strong> 创建版本 <strong>$objectID</strong>。' . "\n";
|
||||
|
||||
@@ -984,6 +984,30 @@ class projectModel extends model
|
||||
$this->action->create('bug', $key, 'Totask', '', $taskID);
|
||||
$this->dao->update(TABLE_BUG)->set('toTask')->eq($taskID)->where('id')->eq($key)->exec();
|
||||
|
||||
/* activate bug if bug postponed. */
|
||||
if($bug->status == 'resolved' && $bug->resolution == 'postponed')
|
||||
{
|
||||
$newBug = new stdclass();
|
||||
$newBug->lastEditedBy = $this->app->user->account;
|
||||
$newBug->lastEditedDate = $now;
|
||||
$newBug->assignedDate = $now;
|
||||
$newBug->status = 'active';
|
||||
$newBug->resolvedDate = '0000-00-00';
|
||||
$newBug->resolution = '';
|
||||
$newBug->resolvedBy = '';
|
||||
$newBug->resolvedBuild = '';
|
||||
$newBug->closedBy = '';
|
||||
$newBug->closedDate = '0000-00-00';
|
||||
$newBug->duplicateBug = '0';
|
||||
|
||||
$this->dao->update(TABLE_BUG)->data($newBug)->autoCheck()->where('id')->eq($key)->exec();
|
||||
$this->dao->update(TABLE_BUG)->set('activatedCount = activatedCount + 1')->where('id')->eq($key)->exec();
|
||||
|
||||
$actionID = $this->action->create('bug', $key, 'Activated');
|
||||
$changes = common::createChanges($bug, $newBug);
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
|
||||
if(isset($task->assignedTo) and $task->assignedTo and $task->assignedTo != $bug->assignedTo)
|
||||
{
|
||||
$newBug = new stdClass();
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<form class='form-condensed' method='post' target='hiddenwin'>
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th class='w-90px'><?php echo $lang->project->dateRange;?></th>
|
||||
<th class='w-80px'><?php echo $lang->project->dateRange;?></th>
|
||||
<td class='w-p50'>
|
||||
<div class='input-group'>
|
||||
<?php echo html::input('begin', $project->begin, "class='form-control form-date' onchange='computeWorkDays()' placeholder='" . $lang->project->begin . "'");?>
|
||||
|
||||
@@ -103,3 +103,7 @@ $lang->testtask->mail->create->title = "%s created testtask #%s:%s";
|
||||
$lang->testtask->mail->edit->title = "%s finished testtask #%s:%s";
|
||||
|
||||
$lang->testtask->testScope = 'Test scope';
|
||||
|
||||
$lang->testtask->action = new stdclass();
|
||||
$lang->testtask->action->testtaskstarted = '$date, 由 <strong>$actor</strong> started test task. <strong>$objectID</strong>。' . "\n";
|
||||
$lang->testtask->action->testtaskclosed = '$date, 由 <strong>$actor</strong> finished test task. <strong>$objectID</strong>。' . "\n";
|
||||
|
||||
@@ -103,3 +103,7 @@ $lang->testtask->mail->create->title = "%s创建了测试任务 #%s:%s";
|
||||
$lang->testtask->mail->edit->title = "%s编辑了测试任务 #%s:%s";
|
||||
|
||||
$lang->testtask->testScope = '测试范畴';
|
||||
|
||||
$lang->testtask->action = new stdclass();
|
||||
$lang->testtask->action->testtaskstarted = '$date, 由 <strong>$actor</strong> 启动测试任务 <strong>$objectID</strong>。' . "\n";
|
||||
$lang->testtask->action->testtaskclosed = '$date, 由 <strong>$actor</strong> 完成测试任务 <strong>$objectID</strong>。' . "\n";
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
.table caption {border: none; border-bottom: 1px solid #ddd}
|
||||
@@ -464,7 +464,7 @@ body {font-size: 13px; color:#141414;padding-bottom: 40px;}
|
||||
#titlebar > .heading > strong > i, #titlebar > .heading > strong > small > i {display: none}
|
||||
#titlebar > .heading > small > i {position: relative; top: 1px; display: none}
|
||||
#titlebar > .heading > small {font-size: 14px; color: #333;}
|
||||
#titlebar > .heading > small:before {content: '::'}
|
||||
#titlebar > .heading > small:before {content: '\e6e1'; font-family: ZenIcon; font-weight: normal;}
|
||||
#titlebar .actions {position: absolute; right: 20px; top: 8px;}
|
||||
#titlebar .actions > .btn, #titlebar .actions > .btn-group {margin-left: 8px;}
|
||||
#titlebar .actions > .text {display: inline-block; margin-left: 8px; line-height: 30px}
|
||||
|
||||
Reference in New Issue
Block a user