Merge branch 'master' into zenops_44
This commit is contained in:
@@ -34,7 +34,7 @@ class productIssueEntry extends entry
|
||||
{
|
||||
case 'story':
|
||||
$this->app->loadLang('story');
|
||||
$storyStatus = array('' => '', 'draft' => 'opened', 'active' => 'opened', 'changed' => 'opened', 'closed' => 'closed');
|
||||
$storyStatus = array('' => '', 'draft' => 'opened', 'reviewing' => 'opened', 'active' => 'opened', 'changing' => 'opened', 'closed' => 'closed');
|
||||
|
||||
$story = $this->dao->select('*')->from(TABLE_STORY)->where('id')->eq($id)->fetch();
|
||||
if(!$story) $this->send404();
|
||||
|
||||
@@ -30,7 +30,7 @@ class productIssuesEntry extends entry
|
||||
|
||||
$storyFields = 'id,status';
|
||||
$storyStatus = array('' => '');
|
||||
$storyStatus['opened'] = 'draft,active,changed';
|
||||
$storyStatus['opened'] = 'draft,reviewing,active,changing';
|
||||
$storyStatus['closed'] = 'closed';
|
||||
|
||||
$bugFields = 'id,status';
|
||||
|
||||
@@ -24,7 +24,7 @@ class productsEntry extends entry
|
||||
if(strpos(strtolower(",{$fields},"), ',dropmenu,') !== false) return $this->getDropMenu();
|
||||
|
||||
if(!$programID) $programID = $this->param('program', 0);
|
||||
$projectID = $this->param('project', 0);
|
||||
$projectID = $this->param('project', 0);
|
||||
$mergeChildren = $this->param('mergeChildren', '');
|
||||
|
||||
if($programID)
|
||||
@@ -55,7 +55,7 @@ class productsEntry extends entry
|
||||
else
|
||||
{
|
||||
$control = $this->loadController('product', 'all');
|
||||
$control->all($this->param('status', 'all'), $this->param('order', 'order_asc'), 0, 0, $this->param('limit', '20'), $this->param('page', '1') );
|
||||
$control->all($this->param('status', 'all'), $this->param('order', 'program_asc'), 0, 0, $this->param('limit', 100), $this->param('page', 1));
|
||||
|
||||
/* Response */
|
||||
$data = $this->getData();
|
||||
@@ -174,7 +174,7 @@ class productsEntry extends entry
|
||||
/**
|
||||
* Merge children products.
|
||||
*
|
||||
* @param array $products
|
||||
* @param array $products
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -192,12 +192,11 @@ class productsEntry extends entry
|
||||
}
|
||||
|
||||
$unclosedTotal = 0;
|
||||
foreach($program as $field => $value)
|
||||
foreach($program as $lineID => $value)
|
||||
{
|
||||
if(!isset($programs[$programID]->children)) $programs[$programID]->children = array();
|
||||
if(isset($value->products))
|
||||
{
|
||||
$lineID = $field;
|
||||
if(empty($lineID))
|
||||
{
|
||||
foreach($value->products as $product)
|
||||
|
||||
@@ -273,7 +273,7 @@ class reportsEntry extends entry
|
||||
}
|
||||
|
||||
/* Set story status statistics integrate into product. */
|
||||
$storyStatusList = array('draft' => array(), 'active' => array(), 'changed' => array(), 'closed' => array());
|
||||
$storyStatusList = array('draft' => array(), 'reviewing' => array(), 'active' => array(), 'changing' => array(), 'closed' => array());
|
||||
foreach($processedProducts as $productID => $product)
|
||||
{
|
||||
$product->storyStat = array();
|
||||
|
||||
+19
-4
@@ -64,12 +64,23 @@
|
||||
36189 Bug按照优先级或严重程度排序时,空值放最后
|
||||
36190 用例关联bug和用例页增加分页
|
||||
36522 注册系统管理员的密码规则同系统中中级密码强度
|
||||
14586 创建子任务时自动代入父任务的优先级
|
||||
29216 创建和编辑任务时,所属执行的下拉菜单过滤掉禁止修改的执行
|
||||
34642 地盘待处理中看板项目的任务详情以弹窗形式展示
|
||||
34709 研发需求搜索表单增加评审结果字段
|
||||
35043 补充执行版本详情页面的返回逻辑
|
||||
35604 批量编辑项目时,计划起止日期超出父项目集日期范围时,增加提示信息
|
||||
35795 给任务增加日志时,已有日志列表增加记录人和累积耗时字段
|
||||
35893 创建项目时,修改所属项目集后表单采用局部刷新
|
||||
35975 通过计划创建执行时,项目的下拉菜单过滤掉已关闭的项目
|
||||
35991 创建测试任务时,研发需求的日程规划和指派给字段增加同上选项
|
||||
36128 地盘日程日历中,表头居中显示
|
||||
36259 需求详情中的附件去掉删除操作
|
||||
36263 附件的操作按钮以图标样式进行显示
|
||||
36367 创建和编辑项目时,预算和时间范围的超出提示增加忽略操作
|
||||
企业版:
|
||||
28045 反馈关闭原因为重复时,增加重复反馈输入的选项
|
||||
30523 反馈转Bug时取消选择项目弹窗直接进入提Bug页面
|
||||
30912 地盘日志列表新建日志时可以搜索该用户参与的所有执行
|
||||
31984 反馈增加批量导入功能
|
||||
33940 反馈增加导出模板功能
|
||||
34296 提交反馈默认公开
|
||||
34844 组织日志菜单下增加增加未填写日志成员的选项
|
||||
34998 反馈导出时的时间支持精确到分秒
|
||||
@@ -77,11 +88,13 @@
|
||||
35083 执行甘特图支持在图上用连接的方式维护任务关系
|
||||
35861 甘特图全屏样式优化
|
||||
36185 执行甘特图查看任务关系维护按钮、设置按钮、甘特图按钮优化
|
||||
36581 任务工时明细表的横向滚动条置顶显示
|
||||
36618 有编辑他人反馈权限,可以批量编辑他人反馈
|
||||
旗舰版:
|
||||
30432 瀑布项目设计功能类型支持自定义功能
|
||||
34682 资产库可以排序
|
||||
禅道客户端:
|
||||
35639 客户端设置增加“初始化会议状态”的设置项,并自动初始化会议状态
|
||||
35658 去掉客户端设置中消息记录独立窗口的设置项,默认以独立窗口打开
|
||||
修复的Bug
|
||||
26232 执行软件需求列表简单表格下横向滚动条显示遮挡
|
||||
26272 地盘待处理/贡献研发需求列表中,子需求的名称和所属产品未显示title
|
||||
@@ -118,6 +131,8 @@
|
||||
26371 导出的需求,用户名的显示不一致
|
||||
26424 导入用例页面无影响,提示PHPExcel原因
|
||||
26657 不能批量编辑他人反馈
|
||||
25834 删除所有消息和群组后登录喧喧显示“服务器操作失败”
|
||||
25833 删除所有聊天消息和群组系统群仍然有消息
|
||||
|
||||
2022-08-11 17.5
|
||||
完成的需求
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
<?php if(count($teams) > 3):?>
|
||||
<?php $lastMember = end($teams);?>
|
||||
<div title="<?php echo $lastMember->realname;?>">
|
||||
<?php echo html::smallAvatar(array('avatar' => $usersAvatar[$lastMember->account], 'account' => $lastMember->account, 'name' => $lastMember->realname), 'avatar-circle avatar-' . key($lastMember)); ?>
|
||||
<?php echo html::smallAvatar(array('avatar' => $usersAvatar[$lastMember->account], 'account' => $lastMember->account, 'name' => $lastMember->realname), 'avatar-circle avatar-' . key((array)$lastMember)); ?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
|
||||
@@ -1463,7 +1463,7 @@ class baseRouter
|
||||
|
||||
/* Check file is encode by ioncube. */
|
||||
$isEncrypted = false;
|
||||
if($isExt)
|
||||
if(strpos($file2Included, 'extension' . DS . $this->config->edition . DS) !== false)
|
||||
{
|
||||
$fp = fopen($file2Included, 'r');
|
||||
$line1 = fgets($fp);
|
||||
|
||||
+1092
-1097
File diff suppressed because it is too large
Load Diff
@@ -142,7 +142,7 @@ class POP3 {
|
||||
* @param string $username
|
||||
* @param string $password
|
||||
*/
|
||||
public function Authorise ($host, $port = false, $tval = false, $username, $password, $debug_level = 0) {
|
||||
public function Authorise ($host, $port = false, $tval = false, $username = '', $password = '', $debug_level = 0) {
|
||||
$this->host = $host;
|
||||
|
||||
// If no port value is passed, retrieve it
|
||||
@@ -404,4 +404,4 @@ class POP3 {
|
||||
|
||||
// End of class
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -29,6 +29,7 @@ class HTMLPurifier_PropertyListIterator extends FilterIterator
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function accept()
|
||||
{
|
||||
$key = $this->getInnerIterator()->key();
|
||||
|
||||
@@ -20,6 +20,7 @@ class HTMLPurifier_StringHash extends ArrayObject
|
||||
* @param mixed $index
|
||||
* @return mixed
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($index)
|
||||
{
|
||||
$this->accessed[$index] = true;
|
||||
|
||||
@@ -37,6 +37,7 @@ class Requests_Utility_FilteredIterator extends ArrayIterator {
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function current() {
|
||||
$value = parent::current();
|
||||
|
||||
@@ -50,6 +51,7 @@ class Requests_Utility_FilteredIterator extends ArrayIterator {
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function unserialize($serialized) {}
|
||||
|
||||
/**
|
||||
@@ -57,6 +59,7 @@ class Requests_Utility_FilteredIterator extends ArrayIterator {
|
||||
*
|
||||
* @phpcs:disable PHPCompatibility.FunctionNameRestrictions.NewMagicMethods.__unserializeFound
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __unserialize($serialized) {}
|
||||
|
||||
public function __wakeup() {
|
||||
|
||||
@@ -79,7 +79,7 @@ $lang->admin->safe->reasonList['birthday'] = 'Giống ngày sinh';
|
||||
$lang->admin->safe->modifyPasswordList[1] = 'Có';
|
||||
$lang->admin->safe->modifyPasswordList[0] = 'Không';
|
||||
|
||||
$lang->admin->safe->loginCaptchaList[1] = 'Yes'
|
||||
$lang->admin->safe->loginCaptchaList[1] = 'Yes';
|
||||
$lang->admin->safe->loginCaptchaList[0] = 'No';
|
||||
|
||||
$lang->admin->safe->noticeMode = 'Mật khẩu sẽ được kiểm tra khi người dùng đăng nhập hoặc người dùng thêm hoặc sửa.';
|
||||
|
||||
@@ -191,6 +191,7 @@ class blockModel extends model
|
||||
->leftJoin(TABLE_PRODUCT)->alias('t2')->on("t1.product = t2.id")
|
||||
->where('t1.assignedTo')->eq($this->app->user->account)
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
->andWhere('t1.status')->ne('closed')
|
||||
->andWhere('t2.deleted')->eq(0)
|
||||
->fetch('count');
|
||||
$data['stories'] = (int)$this->dao->select('count(*) AS count')->from(TABLE_STORY)->alias('t1')
|
||||
|
||||
@@ -9,3 +9,4 @@
|
||||
.browserContent {margin-left: -4px;}
|
||||
.resolution {white-space: nowrap; overflow: hidden;}
|
||||
.link-commit {overflow: hidden; white-space: nowrap; margin-right: 5px;}
|
||||
.main-actions .btn-toolbar{display: inline-flex; flex-wrap: wrap;}
|
||||
|
||||
@@ -78,9 +78,15 @@ $(function()
|
||||
hiddenRequireFields();
|
||||
});
|
||||
|
||||
var maxAutoDropWidth = document.body.scrollWidth + (document.getElementById('resolutions1').offsetWidth / 2) - document.getElementById('resolutions1').getBoundingClientRect().right;
|
||||
$('select[id^="duplicateBugs"]').picker(
|
||||
{
|
||||
disableEmptySearch : true,
|
||||
dropWidth : 'auto'
|
||||
dropWidth : 'auto',
|
||||
maxAutoDropWidth : maxAutoDropWidth,
|
||||
onReady: function(event)
|
||||
{
|
||||
$(event.picker.$container).addClass('required');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -23,7 +23,8 @@ $(function()
|
||||
$('#duplicateBug').picker(
|
||||
{
|
||||
disableEmptySearch : true,
|
||||
dropWidth : 'auto'
|
||||
dropWidth : 'auto',
|
||||
maxAutoDropWidth : document.body.scrollWidth + document.getElementById('resolution').offsetWidth - document.getElementById('resolution').getBoundingClientRect().right
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -923,7 +923,7 @@ class bugModel extends model
|
||||
}
|
||||
else
|
||||
{
|
||||
return print(js::error('bug#' . $bugID . dao::getError(true)));
|
||||
return helper::end(js::error('bug#' . $bugID . dao::getError(true)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ js::set('page', 'confirmbug');
|
||||
<?php $this->printExtendFields($bug, 'table');?>
|
||||
<tr>
|
||||
<th><?php echo $lang->bug->mailto;?></th>
|
||||
<td colspan='2'><?php echo html::select('mailto[]', $users, str_replace(' ' , '', $bug->mailto), 'class="form-control picker-select" multiple');?></td>
|
||||
<td colspan='2'><?php echo html::select('mailto[]', $users, $bug->mailto, 'class="form-control picker-select" multiple');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->comment;?></th>
|
||||
|
||||
@@ -191,7 +191,7 @@ if($this->app->tab == 'project') js::set('objectID', $bug->project);
|
||||
<th><?php echo $lang->bug->mailto;?></th>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<?php echo html::select('mailto[]', $users, str_replace(' ', '', $bug->mailto), 'class="form-control picker-select" multiple');?>
|
||||
<?php echo html::select('mailto[]', $users, $bug->mailto, 'class="form-control picker-select" multiple');?>
|
||||
<?php echo $this->fetch('my', 'buildContactLists');?>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@@ -42,7 +42,7 @@ js::set('productID' , $bug->product);
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->bug->resolvedBuild;?></th>
|
||||
<td id='newBuildExecutionBox' class='hidden'>
|
||||
<td id='newBuildExecutionBox' class='hidden required'>
|
||||
<div class='input-group'>
|
||||
<span class='input-group-addon'><?php echo (!empty($execution) and $execution->type == 'kanban') ? $lang->bug->kanban : $lang->build->execution;?></span>
|
||||
<?php echo html::select('buildExecution', $executions, $bug->execution, "class='form-control chosen'");?>
|
||||
@@ -50,7 +50,7 @@ js::set('productID' , $bug->product);
|
||||
</td>
|
||||
<td>
|
||||
<div id='resolvedBuildBox'><?php echo html::select('resolvedBuild', $builds, '', "class='form-control chosen'");?></div>
|
||||
<div id='newBuildBox' class='hidden'><?php echo html::input('buildName', '', "class='form-control' placeholder='{$lang->bug->placeholder->newBuildName}'");?></div>
|
||||
<div id='newBuildBox' class='hidden required'><?php echo html::input('buildName', '', "class='form-control' placeholder='{$lang->bug->placeholder->newBuildName}'");?></div>
|
||||
</td>
|
||||
<td>
|
||||
<?php if(common::hasPriv('build', 'create')):?>
|
||||
|
||||
@@ -264,7 +264,7 @@
|
||||
<th><?php echo $lang->bug->mailto;?></th>
|
||||
<td>
|
||||
<?php
|
||||
if(empty($bug->mailto))
|
||||
if(!empty($bug->mailto))
|
||||
{
|
||||
foreach(explode(',', str_replace(' ', '', $bug->mailto)) as $account) echo ' ' . zget($users, $account);
|
||||
}
|
||||
|
||||
Vendored
+1
@@ -1 +1,2 @@
|
||||
.table table td,.outer .table table tbody > tr:last-child td {padding: 2px 0 2px 5px !important; border: none !important;}
|
||||
.c-pri {width: 100px};
|
||||
|
||||
@@ -1,32 +1,10 @@
|
||||
<?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
|
||||
<?php
|
||||
$requiredFields = $datas->requiredFields;
|
||||
$allCount = $datas->allCount;
|
||||
$allPager = $datas->allPager;
|
||||
$pagerID = $datas->pagerID;
|
||||
$isEndPage = $datas->isEndPage;
|
||||
$maxImport = $datas->maxImport;
|
||||
$dataInsert = $datas->dataInsert;
|
||||
$fields = $datas->fields;
|
||||
$suhosinInfo = $datas->suhosinInfo;
|
||||
$model = $datas->model;
|
||||
$datas = $datas->datas;
|
||||
?>
|
||||
<style>
|
||||
form{overflow-x: scroll}
|
||||
thead > tr > th{width:150px;}
|
||||
.c-estimate {width:150px;}
|
||||
.c-story{width:150px;}
|
||||
.c-step{width:400px;}
|
||||
.c-pri,.c-stage{width:150px}
|
||||
.c-precondition{width:200px;}
|
||||
</style>
|
||||
<?php if(!empty($suhosinInfo)):?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php if(isset($suhosinInfo)):?>
|
||||
<div class='alert alert-info'><?php echo $suhosinInfo?></div>
|
||||
<?php elseif(empty($maxImport) and $allCount > $this->config->file->maxImport):?>
|
||||
<div id="mainContent" class="main-content">
|
||||
<div class="main-header">
|
||||
<h2><?php echo $lang->port->import;?></h2>
|
||||
<h2><?php echo $lang->caselib->import;?></h2>
|
||||
</div>
|
||||
<p><?php echo sprintf($lang->file->importSummary, $allCount, html::input('maxImport', $config->file->maxImport, "style='width:50px'"), ceil($allCount / $config->file->maxImport));?></p>
|
||||
<p><?php echo html::commonButton($lang->import, "id='import'", 'btn btn-primary');?></p>
|
||||
@@ -38,197 +16,114 @@ $(function()
|
||||
{
|
||||
if(parseInt($('#maxImport').val())) $('#times').html(Math.ceil(parseInt($('#allCount').html()) / parseInt($('#maxImport').val())));
|
||||
});
|
||||
$('#import').click(function()
|
||||
{
|
||||
$.cookie('maxImport', $('#maxImport').val());
|
||||
location.href = createLink('caselib', 'showImport', "libID=<?php echo $libID;?>&pageID=1&maxImport=" + $('#maxImport').val())
|
||||
});
|
||||
$('#import').click(function(){location.href = createLink('caselib', 'showImport', "libID=<?php echo $libID;?>&pageID=1&maxImport=" + $('#maxImport').val())})
|
||||
});
|
||||
</script>
|
||||
<?php else:?>
|
||||
<?php js::set('requiredFields', $requiredFields);?>
|
||||
<div id="mainContent" class="main-content">
|
||||
<div class="main-header clearfix">
|
||||
<h2><?php echo $lang->port->import;?></h2>
|
||||
<h2><?php echo $lang->caselib->import;?></h2>
|
||||
</div>
|
||||
<form class='main-form' target='hiddenwin' method='post'>
|
||||
<form target='hiddenwin' method='post'>
|
||||
<table class='table table-form' id='showData'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='w-70px'> <?php echo $lang->port->id?></th>
|
||||
|
||||
<?php foreach($fields as $key => $value):?>
|
||||
|
||||
<?php if($key == 'stepDesc' or $key == 'stepExpect'):?>
|
||||
<?php if($key == 'stepExpect') continue;?>
|
||||
<th class='c-step'>
|
||||
<th class='c-number'><?php echo $lang->testcase->id?></th>
|
||||
<th class='c-title' id='title'> <?php echo $lang->testcase->title?></th>
|
||||
<th class='c-module' id='module'> <?php echo $lang->testcase->module?></th>
|
||||
<th class='c-pri' id='pri'> <?php echo $lang->testcase->pri?></th>
|
||||
<th class='c-type' id='type'> <?php echo $lang->testcase->type?></th>
|
||||
<th class='c-stage' id='stage'> <?php echo $lang->testcase->stage?></th>
|
||||
<th class='c-text' id='keywords'> <?php echo $lang->testcase->keywords?></th>
|
||||
<th class='c-precondition' id='precondition'><?php echo $lang->testcase->precondition?></th>
|
||||
<th class='c-case-step col-content'>
|
||||
<table class='w-p100 table-borderless'>
|
||||
<tr>
|
||||
<th class="no-padding"><?php echo $fields['stepDesc']['title']?></th>
|
||||
<th class="no-padding"><?php echo $fields['stepExpect']['title']?></th>
|
||||
<th><?php echo $lang->testcase->stepDesc?></th>
|
||||
<th><?php echo $lang->testcase->stepExpect?></th>
|
||||
</tr>
|
||||
</table>
|
||||
</th>
|
||||
|
||||
<?php elseif($value['control'] != 'hidden'):?>
|
||||
<th class='c-<?php echo $key?>' id='<?php echo $key;?>'> <?php echo $value['title'];?></th>
|
||||
|
||||
<?php endif;?>
|
||||
<?php endforeach;?>
|
||||
<?php
|
||||
if(!empty($appendFields))
|
||||
{
|
||||
foreach($appendFields as $field)
|
||||
{
|
||||
if(!$field->show) continue;
|
||||
|
||||
$width = ($field->width && $field->width != 'auto' ? $field->width . 'px' : 'auto');
|
||||
$required = strpos(",$field->rules,", ",$notEmptyRule->id,") !== false ? 'required' : '';
|
||||
echo "<th class='$required' style='width: $width'>$field->name</th>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$insert = true;
|
||||
$addID = 1;
|
||||
$hasMultiple = false;
|
||||
?>
|
||||
<?php foreach($datas as $key => $object):?>
|
||||
<tr class='text-top'>
|
||||
<td>
|
||||
<?php
|
||||
if(!empty($object->id))
|
||||
{
|
||||
echo $object->id . html::hidden("id[$key]", $object->id);
|
||||
$insert = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$sub = (strpos($object->title, '>') === 0) ? " <sub style='vertical-align:sub;color:red'>{$lang->port->children}</sub>" : " <sub style='vertical-align:sub;color:gray'>{$lang->port->new}</sub>";
|
||||
echo $addID++ . $sub;
|
||||
}
|
||||
echo html::hidden("lib[$key]", $libID);
|
||||
?>
|
||||
</td>
|
||||
<?php foreach($fields as $field => $value):?>
|
||||
|
||||
<?php if($value['control'] == 'select'):?>
|
||||
<td><?php echo html::select("{$field}[$key]", $value['values'], !empty($object->$field) ? $object->$field : '', "class='form-control chosen'")?></td>
|
||||
|
||||
<?php elseif($value['control'] == 'multiple'):?>
|
||||
<?php if(!isset($value['values'][''])) $value['values'][''] = '';?>
|
||||
<td><?php echo html::select("{$field}[$key][]", $value['values'], !empty($object->$field) ? $object->$field : '', "multiple class='form-control chosen'")?></td>
|
||||
|
||||
<?php elseif($value['control'] == 'date'):?>
|
||||
<?php $dateMatch = $this->config->port->dateMatch;?>
|
||||
<?php if(!preg_match($dateMatch, $object->$field)) $object->$field = ''; ?>
|
||||
<td><?php echo html::input("{$field}[$key]", !empty($object->$field) ? $object->$field : '', "class='form-control form-date autocomplete='off'")?></td>
|
||||
|
||||
<?php elseif($value['control'] == 'datetime'):?>
|
||||
<td><?php echo html::input("{$field}[$key]", !empty($object->$field) ? $object->$field : '', "class='form-control form-datetime autocomplete='off'")?></td>
|
||||
|
||||
<?php elseif($value['control'] == 'hidden'):?>
|
||||
<?php echo html::hidden("{$field}[$key]", $object->$field)?>
|
||||
|
||||
<?php elseif($value['control'] == 'textarea'):?>
|
||||
<td><?php echo html::textarea("{$field}[$key]", $object->$field, "class='form-control' cols='50' rows='1'")?></td>
|
||||
|
||||
<?php elseif($field == 'stepDesc' or $field == 'stepExpect'):?>
|
||||
<?php if($field == 'stepExpect') continue;?>
|
||||
<td>
|
||||
<?php if(isset($stepData[$key]['desc'])):?>
|
||||
<table class='w-p100 bd-0'>
|
||||
<?php $hasStep = false;?>
|
||||
<?php foreach($stepData[$key]['desc'] as $id => $desc):?>
|
||||
<?php if(empty($desc['content'])) continue;?>
|
||||
<tr class='step'>
|
||||
<?php $hasStep = true;?>
|
||||
<td><?php echo $id . html::hidden("stepType[$key][$id]", $desc['type'])?></td>
|
||||
<td><?php echo html::textarea("desc[$key][$id]", htmlSpecialString($desc['content']), "class='form-control'")?></td>
|
||||
<td><?php if($desc['type'] != 'group') echo html::textarea("expect[$key][$id]", isset($stepData[$key]['expect'][$id]['content']) ? htmlSpecialString($stepData[$key]['expect'][$id]['content']) : '', "class='form-control'")?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
<?php if(!$hasStep):?>
|
||||
<tr class='step'>
|
||||
<td><?php echo '1' . html::hidden("stepType[$key][1]", 'step')?></td>
|
||||
<td><?php echo html::textarea("desc[$key][1]", '', "class='form-control'")?></td>
|
||||
<td><?php echo html::textarea("expect[$key][1]", '', "class='form-control'")?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
</table>
|
||||
<?php else:?>
|
||||
<table class='w-p100 bd-0'>
|
||||
<tr class='step'>
|
||||
<td><?php echo '1' . html::hidden("stepType[$key][1]", 'step')?></td>
|
||||
<td><?php echo html::textarea("desc[$key][1]", '', "class='form-control'")?></td>
|
||||
<td><?php echo html::textarea("expect[$key][1]", '', "class='form-control'")?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php endif;?>
|
||||
</td>
|
||||
|
||||
<?php else:?>
|
||||
<td><?php echo html::input("{$field}[$key]", !empty($object->$field) ? $object->$field : '', "class='form-control autocomplete='off'")?></td>
|
||||
<?php endif;?>
|
||||
|
||||
<?php endforeach;?>
|
||||
<?php
|
||||
$insert = true;
|
||||
$hideContentCol = true;
|
||||
?>
|
||||
<?php foreach($caseData as $key => $case):?>
|
||||
<?php if(empty($case->title)) continue;?>
|
||||
<?php if(!empty($case->id) and !isset($cases[$case->id])) $case->id = 0;?>
|
||||
<tr class='text-left' valign='top'>
|
||||
<td>
|
||||
<?php
|
||||
if(!empty($appendFields))
|
||||
if(!empty($case->id))
|
||||
{
|
||||
$this->loadModel('flow');
|
||||
foreach($appendFields as $field)
|
||||
{
|
||||
if(!$field->show) continue;
|
||||
$value = $field->defaultValue ? $field->defaultValue : zget($datas, $field->field, '');
|
||||
echo '<td>' . $this->flow->buildControl($field, $value, "$field->field[$key]", true) . '</td>';
|
||||
}
|
||||
echo $case->id . html::hidden("id[$key]", $case->id);
|
||||
$insert = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo $key . " <sup class='text-green small'>{$lang->testcase->new}</sup>";
|
||||
}
|
||||
echo html::hidden("lib[$key]", $libID);
|
||||
?>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</td>
|
||||
<td><?php echo html::input("title[$key]", $case->title, "class='form-control' style='margin-top:2px'")?></td>
|
||||
<td style='overflow:visible'><?php echo html::select("module[$key]", $modules, isset($case->module) ? $case->module : (!empty($case->id) ? $cases[$case->id]->module : ''), "class='form-control chosen'")?></td>
|
||||
<td><?php echo html::select("pri[$key]", $lang->testcase->priList, isset($case->pri) ? $case->pri : (!empty($case->id) ? $cases[$case->id]->pri : ''), "class='form-control chosen'")?></td>
|
||||
<td><?php echo html::select("type[$key]", $lang->testcase->typeList, isset($case->type) ? $case->type : (!empty($case->id) ? $cases[$case->id]->type : ''), "class='form-control chosen'")?></td>
|
||||
<td style='overflow:visible'><?php echo html::select("stage[$key][]", $lang->testcase->stageList, !empty($case->stage) ? $case->stage : (!empty($case->id) ? $cases[$case->id]->stage : ''), "multiple='multiple' class='form-control chosen'")?></td>
|
||||
<td><?php echo html::input("keywords[$key]", isset($case->keywords) ? $case->keywords : "", "class='form-control'")?></td>
|
||||
<td><?php echo html::textarea("precondition[$key]", isset($case->precondition) ? htmlSpecialString($case->precondition) : "", "class='form-control'")?></td>
|
||||
<td class='col-content'>
|
||||
<?php if(isset($stepData[$key]['desc'])):?>
|
||||
<table class='w-p100 bd-0'>
|
||||
<?php foreach($stepData[$key]['desc'] as $id => $desc):?>
|
||||
<?php
|
||||
if(empty($desc['content'])) continue;
|
||||
$hideContentCol = false;
|
||||
?>
|
||||
<tr class='step'>
|
||||
<td><?php echo $id . html::hidden("stepType[$key][$id]", $desc['type'])?></td>
|
||||
<td><?php echo html::textarea("desc[$key][$id]", htmlSpecialString($desc['content']), "class='form-control'")?></td>
|
||||
<td><?php if($desc['type'] != 'group') echo html::textarea("expect[$key][$id]", isset($stepData[$key]['expect'][$id]['content']) ? htmlSpecialString($stepData[$key]['expect'][$id]['content']) : '', "class='form-control'")?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</table>
|
||||
<?php endif;?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan='10' class='text-center form-actions'>
|
||||
<td colspan='9' class='text-center form-actions'>
|
||||
<?php
|
||||
$submitText = $isEndPage ? $this->lang->save : $this->lang->file->saveAndNext;
|
||||
$isStartPage = $pagerID == 1 ? true : false;
|
||||
$submitText = $isEndPage ? $this->lang->save : $this->lang->file->saveAndNext;
|
||||
if(!$insert and $dataInsert === '')
|
||||
{
|
||||
echo "<button type='button' data-toggle='modal' data-target='#importNoticeModal' class='btn btn-primary btn-wide'>{$submitText}</button>";
|
||||
echo "<button type='button' data-toggle='modal' data-target='#importNoticeModal' class='btn btn-primary btn-wide'>{$submitText}</button>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo html::submitButton($submitText);
|
||||
if($dataInsert !== '') echo html::hidden('insert', $dataInsert);
|
||||
echo html::submitButton($submitText);
|
||||
if($dataInsert !== '') echo html::hidden('insert', $dataInsert);
|
||||
}
|
||||
echo html::hidden('isEndPage', $isEndPage ? 1 : 0);
|
||||
echo html::hidden('pagerID', $pagerID);
|
||||
echo ' ' . html::a("javascript:history.back(-1)", $lang->goback, '', "class='btn btn-back btn-wide'");
|
||||
echo ' ' . html::a($this->createLink('caselib', 'browse', "libID=$libID"), $lang->goback, '', 'class="btn btn-wide"');
|
||||
echo ' ' . sprintf($lang->file->importPager, $allCount, $pagerID, $allPager);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<?php if(!$insert and $dataInsert === '') include $app->getModuleRoot() . 'common/view/noticeimport.html.php';?>
|
||||
<?php if(!$insert and $dataInsert === '') include '../../common/view/noticeimport.html.php';?>
|
||||
</form>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
$.fixedTableHead('#showData');
|
||||
<?php if($hasMultiple):?>
|
||||
$('th.estimate').addClass('text-center w-250px');
|
||||
<?php endif;?>
|
||||
$("#showData th").each(function()
|
||||
{
|
||||
if(requiredFields.indexOf(this.id) !== -1) $("#" + this.id).addClass('required');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>
|
||||
<?php if(isset($hideContentCol) and $hideContentCol):?>
|
||||
<style>#mainContent .col-content{display: none;}</style>
|
||||
<?php endif;?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -36,6 +36,8 @@ $(function()
|
||||
|
||||
var $newRow = $(rowTpl.replace(/%s/g, lastIndex + 1));
|
||||
$newRow.find('.chosen').chosen();
|
||||
$newRow.find('.picker').remove()
|
||||
$newRow.find('.picker-select').picker();
|
||||
$newRow.find('.iframe').modalTrigger({iframe:true});
|
||||
$newRow.find('[data-provide="colorpicker-later"]').colorPicker();
|
||||
$newRow.datepickerAll();
|
||||
|
||||
@@ -42,7 +42,10 @@
|
||||
<div class='cell'><?php include '../../common/view/action.html.php';?></div>
|
||||
<div class='main-actions'>
|
||||
<div class="btn-toolbar">
|
||||
<?php common::printBack($this->session->designList);?>
|
||||
<?php
|
||||
$backLink = $this->createLink('design', 'browse', "projectID=$design->project");
|
||||
common::printBack($app->session->designList != false ? $app->session->designList : $backLink);
|
||||
?>
|
||||
<?php if(!isonlybody()) echo "<div class='divider'></div>";?>
|
||||
<?php if(!$design->deleted):?>
|
||||
<?php
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
$(function()
|
||||
{
|
||||
loadDocLibs('product');
|
||||
loadDocLibs(defaultType);
|
||||
})
|
||||
|
||||
/**
|
||||
|
||||
@@ -960,7 +960,7 @@ class docModel extends model
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->config->doc->search['module'] = $queryName;
|
||||
if(isset($queryName)) $this->config->doc->search['module'] = $queryName;
|
||||
$products = $this->product->getPairs('nocode', $this->session->project);
|
||||
$this->config->doc->search['params']['execution']['values'] = array('' => '') + $this->loadModel('execution')->getPairs($this->session->project, 'all', 'noclosed') + array('all' => $this->lang->doc->allExecutions);
|
||||
$this->config->doc->search['params']['lib']['values'] = array('' => '', $libID => ($libID ? $libs[$libID] : 0), 'all' => $this->lang->doclib->all);
|
||||
|
||||
@@ -41,4 +41,5 @@
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php js::set('defaultType', $defaultType);?>
|
||||
<?php include '../../common/view/footer.lite.html.php';?>
|
||||
|
||||
@@ -175,7 +175,7 @@ $config->execution->gantt->linkType['end']['end'] = 2;
|
||||
$config->execution->gantt->linkType['begin']['end'] = 3;
|
||||
|
||||
$config->execution->datatable = new stdclass();
|
||||
if(!isset($config->setCode) or $config->setCode == 1)
|
||||
if((!isset($config->setCode) or $config->setCode == 1) and $config->systemMode == 'new')
|
||||
{
|
||||
$config->execution->datatable->defaultField = array('id', 'name', 'code', 'project', 'PM', 'status', 'progress', 'begin', 'end', 'estimate', 'consumed', 'left', 'burn');
|
||||
}
|
||||
|
||||
@@ -315,7 +315,7 @@ $lang->execution->linkAllStoryTip = "({$lang->SRCommon} has never been linke
|
||||
/* Interactive prompts. */
|
||||
$lang->execution->confirmDelete = "Bạn có muốn xóa {$lang->executionCommon}[%s] này?";
|
||||
$lang->execution->confirmUnlinkMember = "Bạn có muốn hủy liên kết người dùng này từ {$lang->executionCommon}?";
|
||||
$lang->execution->confirmUnlinkStory = "After {$lang->SRCommon} is removed, cased linked to {$lang->SRCommon} will be reomoved and tasks linked to {$lang->SRCommon} will be cancelled. Do you want to continue?;"
|
||||
$lang->execution->confirmUnlinkStory = "After {$lang->SRCommon} is removed, cased linked to {$lang->SRCommon} will be reomoved and tasks linked to {$lang->SRCommon} will be cancelled. Do you want to continue?";
|
||||
$lang->execution->confirmUnlinkExecutionStory = "Do you want to unlink this Story from the project?";
|
||||
$lang->execution->notAllowedUnlinkStory = "This {$lang->SRCommon} is linked to the {$lang->executionCommon} of the project. Remove it from the {$lang->executionCommon}, then try again.";
|
||||
$lang->execution->notAllowRemoveProducts = "The story of this product is linked with the {$lang->executionCommon}. Unlink it before doing any action.";
|
||||
|
||||
@@ -1151,7 +1151,7 @@ class executionModel extends model
|
||||
}
|
||||
|
||||
/* The total workload of the first stage should not exceed 100%. */
|
||||
if($type == 'create' or $oldExecution->grade == 1)
|
||||
if($type == 'create' or (empty($oldExecution) and $oldExecution->grade == 1))
|
||||
{
|
||||
$oldPercentTotal = $this->dao->select('SUM(t2.percent) as total')->from(TABLE_PROJECTPRODUCT)->alias('t1')
|
||||
->leftJoin(TABLE_EXECUTION)->alias('t2')->on('t1.project=t2.id')
|
||||
@@ -1198,6 +1198,7 @@ class executionModel extends model
|
||||
public function checkBeginAndEndDate($projectID, $begin, $end)
|
||||
{
|
||||
$project = $this->loadModel('project')->getByID($projectID);
|
||||
if(empty($project)) return;
|
||||
|
||||
if($begin < $project->begin) dao::$errors['begin'] = sprintf($this->lang->execution->errorCommonBegin, $project->begin);
|
||||
if($end > $project->end) dao::$errors['end'] = sprintf($this->lang->execution->errorCommonEnd, $project->end);
|
||||
|
||||
@@ -103,6 +103,7 @@ $lang->misc->feature->themeDesc = '<p>ZenTao 15.0+ a new "Youth Blue" theme
|
||||
$lang->misc->feature->visionsDesc = "<p>The concept of interface has been added since 16.5. Users can deal with R & D affairs in <span style='color: #0c60e1'>[R&D]</span> and daily office affairs in <span style='color: #0c60e1'>[Lite]</span>.</p><p>You can view the current interface on the avatar, and click the name of the interface to view and switch other interfaces.</p>";
|
||||
$lang->misc->feature->visionsImage = 'theme/default/images/main/visions_en.png';
|
||||
|
||||
$lang->misc->releaseDate['17.6'] = '2022-08-26';
|
||||
$lang->misc->releaseDate['17.5'] = '2022-08-11';
|
||||
$lang->misc->releaseDate['17.4'] = '2022-07-27';
|
||||
$lang->misc->releaseDate['17.3'] = '2022-07-13';
|
||||
@@ -187,6 +188,7 @@ $lang->misc->releaseDate['7.2.stable'] = '2015-05-22';
|
||||
$lang->misc->releaseDate['7.1.stable'] = '2015-03-07';
|
||||
$lang->misc->releaseDate['6.3.stable'] = '2014-11-07';
|
||||
|
||||
$lang->misc->feature->all['17.6'][] = array('title' => "The processing logic of requirements is optimized, and the permissions of user requirements and soft requirements are split. Gantt chart supports manual drag and drop to manage task relationship. Fix bugs.", 'desc' => '');
|
||||
$lang->misc->feature->all['17.5'][] = array('title' => "Provide efficient visual statistical tools. Optimize ZenTao performance, the database engine is adjusted from MyISAM to InnoDB. Gantt chart is optimized and upgraded, and the Copy items of the Max version can replicate more information. Fix bugs.", 'desc' => '');
|
||||
$lang->misc->feature->all['17.4'][] = array('title' => "Optimization of details Page visualization and jumping page logic. Improvement of Kanban function. Optimization of document creating and editing pages. Fix bugs.", 'desc' => '');
|
||||
$lang->misc->feature->all['17.3'][] = array('title' => "UI optimization of the modules such as statistics and background, the use case library will synchronize the function optimization information. Fix bugs.", 'desc' => '');
|
||||
|
||||
@@ -103,6 +103,7 @@ $lang->misc->feature->themeDesc = '<p>ZenTao 15.0+ a new "Youth Blue" theme
|
||||
$lang->misc->feature->visionsDesc = "<p>The concept of interface has been added since 16.5. Users can deal with R & D affairs in <span style='color: #0c60e1'>[R&D]</span> and daily office affairs in <span style='color: #0c60e1'>[Lite]</span>.</p><p>You can view the current interface on the avatar, and click the name of the interface to view and switch other interfaces.</p>";
|
||||
$lang->misc->feature->visionsImage = 'theme/default/images/main/visions_en.png';
|
||||
|
||||
$lang->misc->releaseDate['17.6'] = '2022-08-26';
|
||||
$lang->misc->releaseDate['17.5'] = '2022-08-11';
|
||||
$lang->misc->releaseDate['17.4'] = '2022-07-27';
|
||||
$lang->misc->releaseDate['17.3'] = '2022-07-13';
|
||||
@@ -187,6 +188,7 @@ $lang->misc->releaseDate['7.2.stable'] = '2015-05-22';
|
||||
$lang->misc->releaseDate['7.1.stable'] = '2015-03-07';
|
||||
$lang->misc->releaseDate['6.3.stable'] = '2014-11-07';
|
||||
|
||||
$lang->misc->feature->all['17.6'][] = array('title' => "The processing logic of requirements is optimized, and the permissions of user requirements and soft requirements are split. Gantt chart supports manual drag and drop to manage task relationship. Fix bugs.", 'desc' => '');
|
||||
$lang->misc->feature->all['17.5'][] = array('title' => "Provide efficient visual statistical tools. Optimize ZenTao performance, the database engine is adjusted from MyISAM to InnoDB. Gantt chart is optimized and upgraded, and the Copy items of the Max version can replicate more information. Fix bugs.", 'desc' => '');
|
||||
$lang->misc->feature->all['17.4'][] = array('title' => "Optimization of details Page visualization and jumping page logic. Improvement of Kanban function. Optimization of document creating and editing pages. Fix bugs.", 'desc' => '');
|
||||
$lang->misc->feature->all['17.3'][] = array('title' => "UI optimization of the modules such as statistics and background, the use case library will synchronize the function optimization information. Fix bugs.", 'desc' => '');
|
||||
|
||||
@@ -103,6 +103,7 @@ $lang->misc->feature->themeDesc = '<p>ZenTao 15.0+ a new "Youth Blue" theme
|
||||
$lang->misc->feature->visionsDesc = "<p>The concept of interface has been added since 16.5. Users can deal with R & D affairs in <span style='color: #0c60e1'>[R&D]</span> and daily office affairs in <span style='color: #0c60e1'>[Lite]</span>.</p><p>You can view the current interface on the avatar, and click the name of the interface to view and switch other interfaces.</p>";
|
||||
$lang->misc->feature->visionsImage = 'theme/default/images/main/visions_en.png';
|
||||
|
||||
$lang->misc->releaseDate['17.6'] = '2022-08-26';
|
||||
$lang->misc->releaseDate['17.5'] = '2022-08-11';
|
||||
$lang->misc->releaseDate['17.4'] = '2022-07-27';
|
||||
$lang->misc->releaseDate['17.3'] = '2022-07-13';
|
||||
@@ -187,6 +188,7 @@ $lang->misc->releaseDate['7.2.stable'] = '2015-05-22';
|
||||
$lang->misc->releaseDate['7.1.stable'] = '2015-03-07';
|
||||
$lang->misc->releaseDate['6.3.stable'] = '2014-11-07';
|
||||
|
||||
$lang->misc->feature->all['17.6'][] = array('title' => "The processing logic of requirements is optimized, and the permissions of user requirements and soft requirements are split. Gantt chart supports manual drag and drop to manage task relationship. Fix bugs.", 'desc' => '');
|
||||
$lang->misc->feature->all['17.5'][] = array('title' => "Provide efficient visual statistical tools. Optimize ZenTao performance, the database engine is adjusted from MyISAM to InnoDB. Gantt chart is optimized and upgraded, and the Copy items of the Max version can replicate more information. Fix bugs.", 'desc' => '');
|
||||
$lang->misc->feature->all['17.4'][] = array('title' => "Optimization of details Page visualization and jumping page logic. Improvement of Kanban function. Optimization of document creating and editing pages. Fix bugs.", 'desc' => '');
|
||||
$lang->misc->feature->all['17.3'][] = array('title' => "UI optimization of the modules such as statistics and background, the use case library will synchronize the function optimization information. Fix bugs.", 'desc' => '');
|
||||
|
||||
@@ -103,6 +103,7 @@ $lang->misc->feature->themeDesc = "<p>禅道15系列上线了全新的“
|
||||
$lang->misc->feature->visionsDesc = "<p>从16.5开始增加了界面概念,用户可以在<span style='color:#0c60e1'>[研发综合界面]</span>中处理研发事务、在<span style='color:#0c60e1'>[迅捷界面]</span>处理日常办公事务。</p><p>在头像右侧即可查看当前所处界面,点击当前界面名称可查看和切换其他的界面。</p>";
|
||||
$lang->misc->feature->visionsImage = 'theme/default/images/main/visions.png';
|
||||
|
||||
$lang->misc->releaseDate['17.6'] = '2022-08-26';
|
||||
$lang->misc->releaseDate['17.5'] = '2022-08-11';
|
||||
$lang->misc->releaseDate['17.4'] = '2022-07-27';
|
||||
$lang->misc->releaseDate['17.3'] = '2022-07-13';
|
||||
@@ -187,6 +188,7 @@ $lang->misc->releaseDate['7.2.stable'] = '2015-05-22';
|
||||
$lang->misc->releaseDate['7.1.stable'] = '2015-03-07';
|
||||
$lang->misc->releaseDate['6.3.stable'] = '2014-11-07';
|
||||
|
||||
$lang->misc->feature->all['17.6'][] = array('title' => '优化了需求的处理逻辑,拆分了用需和软需的权限。甘特图支持手动拖拽维护任务关系。修复Bug。', 'desc' => '');
|
||||
$lang->misc->feature->all['17.5'][] = array('title' => '提供高效的可视化统计工具。优化禅道性能,数据库引擎从MyISAM调整为InnoDB。甘特图优化升级,旗舰版的复制项目可以复制任务等更多信息。修复Bug。', 'desc' => '');
|
||||
$lang->misc->feature->all['17.4'][] = array('title' => '详情页面的视觉优化和部分页面跳转逻辑优化。看板功能完善。文档创建和编辑页面优化。修复Bug。', 'desc' => '');
|
||||
$lang->misc->feature->all['17.3'][] = array('title' => '统计、后台等模块的UI优化,用例库同步用例信息功能优化。修复Bug。', 'desc' => '');
|
||||
|
||||
@@ -1246,7 +1246,7 @@ EOF;
|
||||
$this->user->updatePassword($this->app->user->id);
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
if(isonlybody()) return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true));
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess,locate => $this->createLink('my', 'index')));
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('my', 'index')));
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->my->common . $this->lang->colon . $this->lang->my->changePassword;
|
||||
|
||||
@@ -8,3 +8,5 @@
|
||||
#switchButton {background: #fff !important;}
|
||||
.panel-actions {position: relative; padding: 0;}
|
||||
.panel-actions .btn-icon {padding-left: 7px;}
|
||||
[lang^=de] .c-pri {width: 69px;}
|
||||
[lang^=fr] .c-pri {width: 82px;}
|
||||
|
||||
@@ -1199,7 +1199,8 @@ class productModel extends model
|
||||
->where('t1.product')->eq($productID)
|
||||
->beginIF($this->config->systemMode == 'new')->andWhere('t2.type')->eq('project')->fi()
|
||||
->beginIF($this->config->systemMode == 'classic')->andWhere('t2.type')->eq('sprint')->fi()
|
||||
->beginIF($browseType != 'all')->andWhere('t2.status')->eq($browseType)->fi()
|
||||
->beginIF($browseType == 'undone')->andWhere('t2.status')->in('wait,doing')->fi()
|
||||
->beginIF(strpos(",all,undone,", ",$browseType,") === false)->andWhere('t2.status')->eq($browseType)->fi()
|
||||
->beginIF(!$this->app->user->admin and $this->config->systemMode == 'new')->andWhere('t2.id')->in($this->app->user->view->projects)->fi()
|
||||
->beginIF(!$this->app->user->admin and $this->config->systemMode == 'classic')->andWhere('t2.id')->in($this->app->user->view->sprints)->fi()
|
||||
->beginIF($this->cookie->involved or $involved)
|
||||
|
||||
@@ -458,7 +458,7 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : '';
|
||||
if($withSearch) echo "<div class='menu-search'><div class='input-group input-group-sm'><input type='text' class='form-control' placeholder=''><span class='input-group-addon'><i class='icon-search'></i></span></div></div>";
|
||||
echo '</div></li>';
|
||||
}
|
||||
else
|
||||
elseif($this->session->currentProductType and $this->session->currentProductType != 'normal' and $productID)
|
||||
{
|
||||
$class= "class='disabled'";
|
||||
echo "<li $class>" . html::a('javascript:;', $lang->product->branchName[$this->session->currentProductType], '', $class) . '</li>';
|
||||
|
||||
@@ -574,8 +574,8 @@ class programModel extends model
|
||||
->beginIF($browseType == 'bysearch')->andWhere($query)->fi()
|
||||
->beginIF($this->config->systemMode == 'new')->andWhere('t1.type')->eq('project')->fi()
|
||||
->beginIF($this->config->systemMode == 'new' and ($this->cookie->involved or $involved))->andWhere('t2.type')->eq('project')->fi()
|
||||
->beginIF(!in_array($browseType, array('all', 'undone', 'bysearch', 'review'), true))->andWhere('t1.status')->eq($browseType)->fi()
|
||||
->beginIF($browseType == 'undone')->andWhere('t1.status')->in('wait,doing')->fi()
|
||||
->beginIF(!in_array($browseType, array('all', 'undone', 'bysearch', 'review', 'unclosed'), true))->andWhere('t1.status')->eq($browseType)->fi()
|
||||
->beginIF($browseType == 'undone' or $browseType == 'unclosed')->andWhere('t1.status')->in('wait,doing')->fi()
|
||||
->beginIF($browseType == 'review')
|
||||
->andWhere("FIND_IN_SET('{$this->app->user->account}', t1.reviewers)")
|
||||
->andWhere('t1.reviewStatus')->eq('doing')
|
||||
|
||||
+26
-32
@@ -234,7 +234,6 @@ class project extends control
|
||||
{
|
||||
$selectedProgram = $this->loadModel('program')->getByID($selectedProgramID);
|
||||
if($selectedProgram->budget) $availableBudget = $this->program->getBudgetLeft($selectedProgram);
|
||||
if(isset($selectedProgram)) $allProducts = $this->program->getProductPairs($selectedProgram->id, 'assign', 'noclosed');
|
||||
}
|
||||
|
||||
if(!empty($objectID))
|
||||
@@ -253,17 +252,16 @@ class project extends control
|
||||
$data = array();
|
||||
if(isset($selectedProgram))
|
||||
{
|
||||
$data['selectedProgramBegin'] = $selectedProgram->begin;
|
||||
$data['selectedProgramEnd'] = $selectedProgram->end;
|
||||
$data['budgetUnit'] = $selectedProgram->budgetUnit;
|
||||
$allProducts = array(0 => '') + $allProducts;
|
||||
/* Finish task #64882.Get the path of the currently selected program. */
|
||||
$data['selectedProgramPath'] = explode(',', $selectedProgram->path);
|
||||
/* Get the products that can be linked with the currently selected program. */
|
||||
$data['allProducts'] = html::select("products[0]", $allProducts, '', "class='form-control chosen' onchange='loadBranches(this)'");
|
||||
$data['plans'] = html::select('plans[][][]', '', '', 'class=\'form-control chosen\' multiple');
|
||||
$data['selectedProgramBegin'] = $selectedProgram->begin;
|
||||
$data['selectedProgramEnd'] = $selectedProgram->end;
|
||||
$data['budgetUnit'] = $selectedProgram->budgetUnit;
|
||||
$data['selectedProgramPath'] = explode(',', $selectedProgram->path);
|
||||
}
|
||||
|
||||
$allProducts = array(0 => '') + $this->program->getProductPairs($selectedProgramID, 'assign', 'noclosed');
|
||||
$data['allProducts'] = html::select("products[0]", $allProducts, '', "class='form-control chosen' onchange='loadBranches(this)'");
|
||||
$data['plans'] = html::select('plans[][][]', '', '', 'class=\'form-control chosen\' multiple');
|
||||
|
||||
/* Finish task #64882.Get the path of the last selected program. */
|
||||
if(!empty($objectID)) $data['objectPath'] = explode(',', $object->path);
|
||||
if(isset($availableBudget)) $data['availableBudget'] = $availableBudget;
|
||||
@@ -363,28 +361,24 @@ class project extends control
|
||||
$programTitle = $this->loadModel('setting')->getItem('owner=' . $this->app->user->account . '&module=project&key=programTitle');
|
||||
$projectStats = $this->loadModel('program')->getProjectStats($programID, $browseType, $queryID, $orderBy, $pager, $programTitle);
|
||||
|
||||
$allProjectsNum = $this->loadModel('program')->getProjectStats($programID, 'all');
|
||||
$this->view->allProjectsNum = $allProjectsNum;
|
||||
|
||||
$this->view->title = $this->lang->project->browse;
|
||||
$this->view->position[] = $this->lang->project->browse;
|
||||
|
||||
$this->view->projectStats = $projectStats;
|
||||
$this->view->pager = $pager;
|
||||
$this->view->programID = $programID;
|
||||
$this->view->program = $this->program->getByID($programID);
|
||||
$this->view->programTree = $this->project->getTreeMenu(0, array('projectmodel', 'createManageLink'), 0, 'list');
|
||||
$this->view->programs = array('0' => '') + $this->program->getParentPairs();
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter|pofirst|nodeleted');
|
||||
$this->view->userIdPairs = $this->loadModel('user')->getPairs('nodeleted|showid');
|
||||
$this->view->usersAvatar = $this->user->getAvatarPairs();
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->projectType = $projectType;
|
||||
$this->view->param = $param;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->recTotal = $recTotal;
|
||||
$this->view->recPerPage = $recPerPage;
|
||||
$this->view->pageID = $pageID;
|
||||
$this->view->title = $this->lang->project->browse;
|
||||
$this->view->projectStats = $projectStats;
|
||||
$this->view->pager = $pager;
|
||||
$this->view->programID = $programID;
|
||||
$this->view->program = $this->program->getByID($programID);
|
||||
$this->view->programTree = $this->project->getTreeMenu(0, array('projectmodel', 'createManageLink'), 0, 'list');
|
||||
$this->view->programs = array('0' => '') + $this->program->getParentPairs();
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter|pofirst|nodeleted');
|
||||
$this->view->userIdPairs = $this->loadModel('user')->getPairs('nodeleted|showid');
|
||||
$this->view->usersAvatar = $this->user->getAvatarPairs();
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->projectType = $projectType;
|
||||
$this->view->param = $param;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->recTotal = $recTotal;
|
||||
$this->view->recPerPage = $recPerPage;
|
||||
$this->view->pageID = $pageID;
|
||||
$this->view->allProjectsNum = $this->loadModel('program')->getProjectStats($programID, 'all');
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -875,6 +875,10 @@ class projectModel extends model
|
||||
$this->config->project->search['queryID'] = $queryID;
|
||||
$this->config->project->search['actionURL'] = $actionURL;
|
||||
|
||||
$statusList = $this->lang->project->statusList;
|
||||
unset($statusList['delay']);
|
||||
$this->config->project->search['params']['status']['values'] = $statusList;
|
||||
|
||||
$programPairs = array(0 => '');
|
||||
$programPairs += $this->loadModel('program')->getPairs();
|
||||
$this->config->project->search['params']['parent']['values'] = $programPairs;
|
||||
|
||||
@@ -674,7 +674,7 @@ class reportModel extends model
|
||||
->beginIF($accounts)->andWhere('account')->in($accounts)->fi()
|
||||
->fetch();
|
||||
|
||||
$effort->consumed = round($effort->consumed, 2);
|
||||
$effort->consumed = !empty($effort->consumed) ? round($effort->consumed, 2) : 0;
|
||||
return $effort;
|
||||
}
|
||||
|
||||
|
||||
@@ -329,7 +329,7 @@ class story extends control
|
||||
$keywords = $oldBug->keywords;
|
||||
$spec = $oldBug->steps;
|
||||
$pri = !empty($oldBug->pri) ? $oldBug->pri : '3';
|
||||
if(strpos($oldBug->mailto, $oldBug->openedBy) === false)
|
||||
if($oldBug->mailto and strpos($oldBug->mailto, $oldBug->openedBy) === false)
|
||||
{
|
||||
$mailto = $oldBug->mailto . $oldBug->openedBy . ',';
|
||||
}
|
||||
@@ -1484,7 +1484,7 @@ class story extends control
|
||||
$this->view->product = $product;
|
||||
$this->view->story = $story;
|
||||
$this->view->actions = $this->action->getList('story', $storyID);
|
||||
$this->view->users = $this->loadModel('user')->getPairs('nodeleted|noletter', "$story->lastEditedBy,$story->openedBy");
|
||||
$this->view->users = $this->loadModel('user')->getPairs('nodeleted|noclosed', "$story->lastEditedBy,$story->openedBy");
|
||||
$this->view->reviewers = $reviewers;
|
||||
$this->view->isLastOne = count(array_diff(array_keys($reviewers), explode(',', $story->reviewedBy))) == 1 ? true : false;
|
||||
|
||||
@@ -1720,6 +1720,8 @@ class story extends control
|
||||
$storyIdList = $this->post->storyIdList;
|
||||
$storyIdList = array_unique($storyIdList);
|
||||
|
||||
$this->story->replaceURLang($storyType);
|
||||
|
||||
/* Get edited stories. */
|
||||
$stories = $this->story->getByList($storyIdList);
|
||||
$productStoryList = array();
|
||||
@@ -1880,7 +1882,7 @@ class story extends control
|
||||
$storyGroup = array();
|
||||
foreach($stories as $story)
|
||||
{
|
||||
if(strpos('draft,closed', $story->status) !== false) continue;
|
||||
if(strpos('draft,reviewing,changing,closed', $story->status) !== false) continue;
|
||||
if(isset($storyGroup[$story->module])) continue;
|
||||
$storyGroup[$story->module] = $this->story->getExecutionStoryPairs($executionID, 0, 'all', $story->module, 'short', 'active');
|
||||
}
|
||||
|
||||
@@ -83,6 +83,7 @@ $(function()
|
||||
$('#duplicateStory').picker(
|
||||
{
|
||||
disableEmptySearch : true,
|
||||
dropWidth : 'auto'
|
||||
dropWidth : 'auto',
|
||||
maxAutoDropWidth : document.body.scrollWidth + document.getElementById('duplicateStory').offsetWidth - document.getElementById('duplicateStoryBox').getBoundingClientRect().right
|
||||
});
|
||||
})
|
||||
|
||||
@@ -445,24 +445,19 @@ $lang->story->categoryList['experience'] = 'Experience';
|
||||
$lang->story->categoryList['improve'] = 'Improve';
|
||||
$lang->story->categoryList['other'] = 'Other';
|
||||
|
||||
$lang->story->changeTip = 'This Story is under review and cannot be changed.';
|
||||
$lang->story->changeTip = 'Only active can be changed.';
|
||||
|
||||
$lang->story->reviewTip = array();
|
||||
$lang->story->reviewTip['active'] = 'The Story is already active,no review requirements.';
|
||||
$lang->story->reviewTip['notReviewer'] = 'You are not the reviewer of this Story and cannot perform review operations.';
|
||||
$lang->story->reviewTip['reviewed'] = 'Reviewed';
|
||||
$lang->story->reviewTip['recalled'] = 'This Story has been withdrawn from review and cannot be reviewed.';
|
||||
|
||||
$lang->story->recallTip = array();
|
||||
$lang->story->recallTip['actived'] = 'The Story has not initiated a review process and no undo action is required.';
|
||||
$lang->story->recallTip['recalled'] = 'This Story has been withdrawn from review and cannot be cancelled.';
|
||||
$lang->story->recallTip['reviewed'] = 'The review process has been started and cannot be cancelled.';
|
||||
$lang->story->recallTip['notOpenedBy'] = 'You are not the Story creator and cannot cancel the operation.';
|
||||
$lang->story->recallTip['actived'] = 'The Story has not initiated a review process and no undo action is required.';
|
||||
|
||||
$lang->story->subDivideTip = array();
|
||||
$lang->story->subDivideTip['subStory'] = 'The Sub-stories cannot be subdivided.';
|
||||
$lang->story->subDivideTip['planned'] = 'The Story has been planned and cannot be subdivided.';
|
||||
$lang->story->subDivideTip['projected'] = 'The Story has been initiated and cannot be subdivided.';
|
||||
$lang->story->subDivideTip['notWait'] = 'The Story has been %s and cannot be subdivided.';
|
||||
$lang->story->subDivideTip['notActive'] = 'The Story is not active and cannot be subdivided.';
|
||||
|
||||
$lang->story->featureBar['browse']['all'] = $lang->all;
|
||||
|
||||
@@ -445,24 +445,19 @@ $lang->story->categoryList['experience'] = 'Experience';
|
||||
$lang->story->categoryList['improve'] = 'Improve';
|
||||
$lang->story->categoryList['other'] = 'Other';
|
||||
|
||||
$lang->story->changeTip = 'This Story is under review and cannot be changed.';
|
||||
$lang->story->changeTip = 'Only active can be changed.';
|
||||
|
||||
$lang->story->reviewTip = array();
|
||||
$lang->story->reviewTip['active'] = 'The Story is already active,no review requirements.';
|
||||
$lang->story->reviewTip['notReviewer'] = 'You are not the reviewer of this Story and cannot perform review operations.';
|
||||
$lang->story->reviewTip['reviewed'] = 'Reviewed';
|
||||
$lang->story->reviewTip['recalled'] = 'This Story has been withdrawn from review and cannot be reviewed.';
|
||||
|
||||
$lang->story->recallTip = array();
|
||||
$lang->story->recallTip['actived'] = 'The Story has not initiated a review process and no undo action is required.';
|
||||
$lang->story->recallTip['recalled'] = 'This Story has been withdrawn from review and cannot be cancelled.';
|
||||
$lang->story->recallTip['reviewed'] = 'The review process has been started and cannot be cancelled.';
|
||||
$lang->story->recallTip['notOpenedBy'] = 'You are not the Story creator and cannot cancel the operation.';
|
||||
$lang->story->recallTip['actived'] = 'The Story has not initiated a review process and no undo action is required.';
|
||||
|
||||
$lang->story->subDivideTip = array();
|
||||
$lang->story->subDivideTip['subStory'] = 'The Sub-stories cannot be subdivided.';
|
||||
$lang->story->subDivideTip['planned'] = 'The Story has been planned and cannot be subdivided.';
|
||||
$lang->story->subDivideTip['projected'] = 'The Story has been initiated and cannot be subdivided.';
|
||||
$lang->story->subDivideTip['notWait'] = 'The Story has been %s and cannot be subdivided.';
|
||||
$lang->story->subDivideTip['notActive'] = 'The Story is not active and cannot be subdivided.';
|
||||
|
||||
$lang->story->featureBar['browse']['all'] = $lang->all;
|
||||
|
||||
@@ -445,24 +445,19 @@ $lang->story->categoryList['experience'] = 'Experience';
|
||||
$lang->story->categoryList['improve'] = 'Improve';
|
||||
$lang->story->categoryList['other'] = 'Other';
|
||||
|
||||
$lang->story->changeTip = 'Cette Story est en cours de vérification et ne peut pas être modifiée.';
|
||||
$lang->story->changeTip = "Seules les exigences de l'état actif peuvent être modifiées.";
|
||||
|
||||
$lang->story->reviewTip = array();
|
||||
$lang->story->reviewTip['active'] = "Cette Story est déjà active, il n'y a pas de demande de révision.";
|
||||
$lang->story->reviewTip['notReviewer'] = "Vous n'êtes pas l'évaluateur de cette Story et ne pouvez pas effectuer d'opérations d'évaluation.";
|
||||
$lang->story->reviewTip['reviewed'] = "Révisé";
|
||||
$lang->story->reviewTip['recalled'] = "Cette Story a été retirée pour vérification, et l'opération de révision ne peut pas être effectuée.";
|
||||
|
||||
$lang->story->recallTip = array();
|
||||
$lang->story->recallTip['actived'] = "Aucun processus de révision n'a été lancé pour cette Story, et il n'est pas nécessaire de révoquer l'opération.";
|
||||
$lang->story->recallTip['recalled'] = "Cette Story a été retirée pour vérification, et l'opération ne peut pas être annulée.";
|
||||
$lang->story->recallTip['reviewed'] = "Il est entré dans le processus de révision, et l'opération ne peut pas être annulée.";
|
||||
$lang->story->recallTip['notOpenedBy'] = "Vous n'êtes pas l'initiateur de la révision et vous ne pouvez pas annuler l'opération.";
|
||||
$lang->story->recallTip['actived'] = "Aucun processus de révision n'a été lancé pour cette Story, et il n'est pas nécessaire de révoquer l'opération.";
|
||||
|
||||
$lang->story->subDivideTip = array();
|
||||
$lang->story->subDivideTip['subStory'] = 'Les sous-stories ne peuvent pas être décomposées.';
|
||||
$lang->story->subDivideTip['planned'] = 'Cette Story est planifiée et ne peut être subdivisée.';
|
||||
$lang->story->subDivideTip['projected'] = 'Cette Story a été créée et ne peut être subdivisée.';
|
||||
$lang->story->subDivideTip['notWait'] = "L'exigence %s ne peut pas être subdivisée.";
|
||||
$lang->story->subDivideTip['notActive'] = "Cette Story n'est pas active et ne peut être subdivisée.";
|
||||
|
||||
$lang->story->featureBar['browse']['all'] = $lang->all;
|
||||
|
||||
@@ -437,24 +437,19 @@ $lang->story->categoryList['experience'] = 'Experience';
|
||||
$lang->story->categoryList['improve'] = 'Improve';
|
||||
$lang->story->categoryList['other'] = 'Other';
|
||||
|
||||
$lang->story->changeTip = 'This Story is under review and cannot be changed.';
|
||||
$lang->story->changeTip = 'Only active can be changed.';
|
||||
|
||||
$lang->story->reviewTip = array();
|
||||
$lang->story->reviewTip['active'] = 'The Story is already active,no review requirements.';
|
||||
$lang->story->reviewTip['notReviewer'] = 'You are not the reviewer of this Story and cannot perform review operations.';
|
||||
$lang->story->reviewTip['reviewed'] = 'Reviewed';
|
||||
$lang->story->reviewTip['recalled'] = 'This Story has been withdrawn from review and cannot be reviewed.';
|
||||
|
||||
$lang->story->recallTip = array();
|
||||
$lang->story->recallTip['actived'] = 'The Story has not initiated a review process and no undo action is required.';
|
||||
$lang->story->recallTip['recalled'] = 'This Story has been withdrawn from review and cannot be cancelled.';
|
||||
$lang->story->recallTip['reviewed'] = 'The review process has been started and cannot be cancelled.';
|
||||
$lang->story->recallTip['notOpenedBy'] = 'You are not the Story creator and cannot cancel the operation.';
|
||||
$lang->story->recallTip['actived'] = 'The Story has not initiated a review process and no undo action is required.';
|
||||
|
||||
$lang->story->subDivideTip = array();
|
||||
$lang->story->subDivideTip['subStory'] = 'The Sub-stories cannot be subdivided.';
|
||||
$lang->story->subDivideTip['planned'] = 'The Story has been planned and cannot be subdivided.';
|
||||
$lang->story->subDivideTip['projected'] = 'The Story has been initiated and cannot be subdivided.';
|
||||
$lang->story->subDivideTip['notWait'] = 'The Story has been %s and cannot be subdivided.';
|
||||
$lang->story->subDivideTip['notActive'] = 'The Story is not active and cannot be subdivided.';
|
||||
|
||||
$lang->story->featureBar['browse']['all'] = $lang->all;
|
||||
|
||||
@@ -445,24 +445,19 @@ $lang->story->categoryList['experience'] = '体验';
|
||||
$lang->story->categoryList['improve'] = '改进';
|
||||
$lang->story->categoryList['other'] = '其他';
|
||||
|
||||
$lang->story->changeTip = '该需求正在评审中,无法进行变更';
|
||||
$lang->story->changeTip = '只有激活状态的需求,才能进行变更';
|
||||
|
||||
$lang->story->reviewTip = array();
|
||||
$lang->story->reviewTip['active'] = '该需求已是激活状态,无需评审';
|
||||
$lang->story->reviewTip['notReviewer'] = '您不是该需求的评审人员,无法进行评审操作';
|
||||
$lang->story->reviewTip['reviewed'] = '您已评审';
|
||||
$lang->story->reviewTip['recalled'] = '该需求已撤销评审,无法进行评审操作';
|
||||
|
||||
$lang->story->recallTip = array();
|
||||
$lang->story->recallTip['actived'] = '该需求未发起评审流程,无需撤销操作';
|
||||
$lang->story->recallTip['recalled'] = '该需求已经撤销评审,无法进行撤销操作';
|
||||
$lang->story->recallTip['reviewed'] = '已进入评审流程,无法进行撤销操作';
|
||||
$lang->story->recallTip['notOpenedBy'] = '您不是需求创建者,无法进行撤销操作';
|
||||
$lang->story->recallTip['actived'] = '该需求未发起评审流程,无需撤销操作';
|
||||
|
||||
$lang->story->subDivideTip = array();
|
||||
$lang->story->subDivideTip['subStory'] = '子需求无法细分';
|
||||
$lang->story->subDivideTip['planned'] = '该需求已计划,无法进行细分操作';
|
||||
$lang->story->subDivideTip['projected'] = '该需求已立项,无法进行细分操作';
|
||||
$lang->story->subDivideTip['notWait'] = '该需求%s,无法进行细分操作';
|
||||
$lang->story->subDivideTip['notActive'] = '需求不是激活状态,无法进行细分操作';
|
||||
|
||||
$lang->story->featureBar['browse']['all'] = $lang->all;
|
||||
|
||||
+11
-23
@@ -786,7 +786,7 @@ class storyModel extends model
|
||||
|
||||
if(strpos('draft,changing', $oldStory->status) !== false and $this->checkForceReview() and empty($_POST['reviewer']))
|
||||
{
|
||||
dao::$errors[] = $this->lang->story->errorEmptyReviewedBy;
|
||||
dao::$errors[] = $this->lang->story->notice->reviewerNotEmpty;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -3010,7 +3010,7 @@ class storyModel extends model
|
||||
if($excludeStories) $storyQuery = $storyQuery . ' AND `id` NOT ' . helper::dbIN($excludeStories);
|
||||
if($this->app->moduleName == 'productplan') $storyQuery .= " AND `status` NOT IN ('closed') AND `parent` >= 0 ";
|
||||
$allBranch = "`branch` = 'all'";
|
||||
if($executionID != '')
|
||||
if(!empty($executionID))
|
||||
{
|
||||
$normalProducts = array();
|
||||
$branchProducts = array();
|
||||
@@ -4210,7 +4210,7 @@ class storyModel extends model
|
||||
if($story->URChanged) return $this->buildMenu('story', 'processStoryChange', $params, $story, $type, 'ok', '', 'iframe', true, '', $this->lang->confirm);
|
||||
|
||||
$isClick = $this->isClickable($story, 'change');
|
||||
$title = (!$isClick and $story->status != 'closed' and $story->status != 'draft') ? $this->lang->story->changeTip : '';
|
||||
$title = $isClick ? '' : $this->lang->story->changeTip;
|
||||
$menu .= $this->buildMenu('story', 'change', $params . "&from=$story->from&storyType=$story->type", $story, $type, 'alter', '', 'showinonlybody', false, '', $title);
|
||||
|
||||
if(strpos('draft,changing', $story->status) !== false)
|
||||
@@ -4235,30 +4235,19 @@ class storyModel extends model
|
||||
{
|
||||
$title = $this->lang->story->reviewTip['notReviewer'];
|
||||
}
|
||||
elseif(empty($storyReviewer))
|
||||
{
|
||||
$title = $this->lang->story->reviewTip['recalled'];
|
||||
}
|
||||
}
|
||||
$menu .= $this->buildMenu('story', 'review', $params . "&from=$story->from&storyType=$story->type", $story, $type, 'search', '', 'showinonlybody', false, '', $title);
|
||||
}
|
||||
|
||||
$isClick = $this->isClickable($story, 'recall');
|
||||
$title = $story->status == 'changing' ? $this->lang->story->recallChange : $this->lang->story->recall;
|
||||
if(!$isClick and $story->status != 'closed')
|
||||
{
|
||||
if($story->status == 'draft' and empty($storyReviewer)) $title = $this->lang->story->recallTip['recalled'];
|
||||
if($story->status == 'draft' and !empty($storyReviewer)) $title = $this->lang->story->recallTip['reviewed'];
|
||||
if(empty($story->reviewedBy) and strpos('draft,changing', $story->status) !== false and !empty($story->reviewer) and $this->app->user->account != $story->openedBy) $title = $this->lang->story->recallTip['notOpenedBy'];
|
||||
if($story->status == 'active' and empty($story->reviewer)) $title = $this->lang->story->recallTip['actived'];
|
||||
}
|
||||
|
||||
$menu .= $this->buildMenu('story', 'recall', $params . "&from=list&confirm=no&storyType=$story->type", $story, $type, 'undo', 'hiddenwin', 'showinonlybody', false, '', $title);
|
||||
$title = $isClick ? $title : $this->lang->story->recallTip['actived'];
|
||||
$menu .= $this->buildMenu('story', 'recall', $params . "&from=list&confirm=no&storyType=$story->type", $story, $type, 'undo', 'hiddenwin', 'showinonlybody', false, '', $title);
|
||||
|
||||
$menu .= $this->buildMenu('story', 'close', $params . "&from=&storyType=$story->type", $story, $type, '', '', 'iframe', true);
|
||||
$menu .= $this->buildMenu('story', 'edit', $params . "&kanbanGroup=default&storyType=$story->type", $story, $type, '', '', 'showinonlybody');
|
||||
|
||||
$tab = $this->app->tab == 'project' ? 'project' : 'qa';
|
||||
$tab = $this->app->tab == 'project' ? 'project' : 'qa';
|
||||
if($story->type != 'requirement' and $this->config->vision != 'lite') $menu .= $this->buildMenu('story', 'createCase', "productID=$story->product&branch=$story->branch&module=0&from=¶m=0&$params", $story, $type, 'sitemap', '', 'showinonlybody', false, "data-app='$tab'");
|
||||
|
||||
if($this->app->rawModule != 'projectstory' OR $this->config->vision == 'lite')
|
||||
@@ -4274,8 +4263,7 @@ class storyModel extends model
|
||||
else
|
||||
{
|
||||
if($story->status != 'active') $title = $this->lang->story->subDivideTip['notActive'];
|
||||
if(!empty($story->plan)) $title = $this->lang->story->subDivideTip['planned'];
|
||||
if($story->stage == 'projected') $title = $this->lang->story->subDivideTip['projected'];
|
||||
if($story->status == 'active' and $story->stage != 'wait') $title = sprintf($this->lang->story->subDivideTip['notWait'], zget($this->lang->story->stageList, $story->stage));
|
||||
}
|
||||
}
|
||||
$menu .= $this->buildMenu('story', 'batchCreate', "productID=$story->product&branch=$story->branch&module=$story->module&$params&executionID=0&plan=0&storyType=story", $story, $type, 'split', '', 'showinonlybody', '', '', $title);
|
||||
@@ -4320,20 +4308,20 @@ class storyModel extends model
|
||||
|
||||
if(common::hasPriv('testcase', 'create', $story))
|
||||
{
|
||||
$link = helper::createLink('testcase', 'create', "productID=$story->product&branch=$story->branch&moduleID=0&from=¶m=0&$params", '', true);
|
||||
$link = helper::createLink('testcase', 'create', "productID=$story->product&branch=$story->branch&moduleID=0&from=¶m=0&$params", '', true);
|
||||
$menu .= "<li>" . html::a($link, $this->lang->testcase->create, '', $misc) . "</li>";
|
||||
}
|
||||
|
||||
if(common::hasPriv('testcase', 'batchCreate'))
|
||||
{
|
||||
$link = helper::createLink('testcase', 'batchCreate', "productID=$story->product&branch=$story->branch&moduleID=0&$params", '', true);
|
||||
$link = helper::createLink('testcase', 'batchCreate', "productID=$story->product&branch=$story->branch&moduleID=0&$params", '', true);
|
||||
$menu .= "<li>" . html::a($link, $this->lang->testcase->batchCreate, '', $misc) . "</li>";
|
||||
}
|
||||
|
||||
$menu .= "</ul></div>";
|
||||
}
|
||||
|
||||
if($this->app->tab == 'execution' and strpos('draft,closed', $story->status) === false) $menu .= $this->buildMenu('task', 'create', "execution={$this->session->execution}&{$params}&moduleID=$story->module", $story, $type, 'plus', '', 'showinonly body');
|
||||
if($this->app->tab == 'execution' and $story->status == 'active') $menu .= $this->buildMenu('task', 'create', "execution={$this->session->execution}&{$params}&moduleID=$story->module", $story, $type, 'plus', '', 'showinonlybody');
|
||||
|
||||
$menu .= "<div class='divider'></div>";
|
||||
$menu .= $this->buildFlowMenu('story', $story, $type, 'direct');
|
||||
@@ -4378,7 +4366,7 @@ class storyModel extends model
|
||||
}
|
||||
|
||||
$this->lang->task->create = $this->lang->execution->wbs;
|
||||
$toTaskDisabled = strpos('draft,closed', $story->status) !== false ? 'disabled' : '';
|
||||
$toTaskDisabled = $story->status == 'active' ? '' : 'disabled';
|
||||
if(commonModel::isTutorialMode())
|
||||
{
|
||||
$wizardParams = helper::safe64Encode($param);
|
||||
|
||||
@@ -1345,7 +1345,6 @@ class task extends control
|
||||
$members = $task->team ? $this->task->getMemberPairs($task) : $this->loadModel('user')->getTeamMemberPairs($task->execution, 'execution', 'nodeleted');
|
||||
$task->nextBy = $task->openedBy;
|
||||
|
||||
$this->view->users = $members;
|
||||
if(!empty($task->team))
|
||||
{
|
||||
$teams = array_keys($task->team);
|
||||
@@ -1368,6 +1367,7 @@ class task extends control
|
||||
$this->view->title = $this->view->execution->name . $this->lang->colon .$this->lang->task->finish;
|
||||
$this->view->position[] = $this->lang->task->finish;
|
||||
$this->view->members = $members;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@ foreach(explode(',', $config->task->edit->requiredFields) as $field)
|
||||
<th><?php echo $lang->task->mailto;?></th>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<?php echo html::select('mailto[]', $users, str_replace(' ' , '', $task->mailto), 'class="form-control picker-select" multiple data-drop-direction="bottom"');?>
|
||||
<?php echo html::select('mailto[]', $users, $task->mailto, 'class="form-control picker-select" multiple data-drop-direction="bottom"');?>
|
||||
<?php echo $this->fetch('my', 'buildContactLists');?>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@@ -299,14 +299,13 @@
|
||||
<th><?php echo $lang->task->mailto;?></th>
|
||||
<td>
|
||||
<?php
|
||||
$mailto = explode(',', str_replace(' ', '', $task->mailto));
|
||||
if(empty($mailto))
|
||||
if(empty($task->mailto))
|
||||
{
|
||||
echo $lang->noData;
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach($mailto as $account) echo ' ' . zget($users, $account, $account);
|
||||
foreach(explode(',', str_replace(' ', '', $task->mailto)) as $account) echo ' ' . zget($users, $account, $account);
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
|
||||
@@ -203,7 +203,7 @@ $config->testcase->datatable->fieldList['story']['fixed'] = 'no';
|
||||
$config->testcase->datatable->fieldList['story']['width'] = '90';
|
||||
$config->testcase->datatable->fieldList['story']['required'] = 'no';
|
||||
$config->testcase->datatable->fieldList['story']['control'] = 'select';
|
||||
$config->testcase->datatable->fieldList['story']['dataSource'] = array('module' => 'port', 'method' => 'getRelatedObjects', 'params' => 'testcase&story&id,title');
|
||||
$config->testcase->datatable->fieldList['story']['dataSource'] = array('module' => 'story', 'method' => 'getProductStoryPairs', 'params' => '$productID&$branch');
|
||||
|
||||
$config->testcase->datatable->fieldList['bugs']['title'] = 'B';
|
||||
$config->testcase->datatable->fieldList['bugs']['fixed'] = 'no';
|
||||
|
||||
@@ -332,7 +332,7 @@ class testreportModel extends model
|
||||
$this->loadModel('tree');
|
||||
$modules = array();
|
||||
$data = array();
|
||||
if(is_string($productIdList)) $productIdList = explode(',', $productIdList);
|
||||
if(!is_array($productIdList)) $productIdList = explode(',', $productIdList);
|
||||
foreach($productIdList as $productID) $modules += $this->tree->getOptionMenu($productID, $viewType = 'bug');
|
||||
foreach($moduleGroups as $moduleID => $count)
|
||||
{
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
<td title="<?php echo zget($lang->issue->typeList, $issue->type);?>"><?php echo zget($lang->issue->typeList, $issue->type);?></td>
|
||||
<td class="text-ellipsis" title="<?php echo $issue->title;?>"><?php echo html::a($this->createLink('issue', 'view', "id=$issue->id", '', '', $issue->project), $issue->title, '', "data-group='project'");?></td>
|
||||
<td title="<?php echo zget($lang->issue->severityList, $issue->severity);?>"><?php echo zget($lang->issue->severityList, $issue->severity);?></td>
|
||||
<td title="<?php echo $issue->pri;?>"><?php echo $issue->pri;?></td>
|
||||
<td title="<?php echo $issue->pri;?>" class="c-pri text-center"><span class="label-pri <?php echo 'label-pri-' . $issue->pri;?>"><?php echo $issue->pri;?></span></td>
|
||||
<td title="<?php echo zget($users, $issue->owner);?>"><?php echo zget($users, $issue->owner);?></td>
|
||||
<td title="<?php echo zget($lang->issue->statusList, $issue->status);?>"><?php echo zget($lang->issue->statusList, $issue->status);?></td>
|
||||
<?php $issue->createdDate = substr($issue->createdDate, 0, 10)?>
|
||||
|
||||
@@ -495,6 +495,8 @@ class weeklyModel extends model
|
||||
->fetch('consumed');
|
||||
}
|
||||
|
||||
if(is_null($AC)) $AC = 0;
|
||||
|
||||
return round($AC, 2);
|
||||
}
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ r($admin->create($wrongProductBug)) && c(400) && p('error') && e('product does n
|
||||
/* Test get. */
|
||||
$bug = $admin->create($normalBug);
|
||||
r($admin->get($bug->id)) && c(200) && p($fields) && e('Bug2');
|
||||
r($admin->get(9999999) && c(400) && p('error') && e('');
|
||||
r($admin->get(9999999)) && c(400) && p('error') && e('');
|
||||
r($noProduct1User->get($bug->id)) && c(403) && p('error') && e('');
|
||||
|
||||
r($admin->getList(1)) && c(200) && p('0:title') && e('Bug1');
|
||||
@@ -129,4 +129,4 @@ r($admin->put($modifyBug2)) && c(200) && p($fields) && e('Bug3');
|
||||
|
||||
/* Test delete*/
|
||||
r($admin->delete($bug->id)) && c(201) && p() && e('');
|
||||
r($admin->get($bug->id)) && c(200) && p('bug:deleted') && e('true');
|
||||
r($admin->get($bug->id)) && c(200) && p('bug:deleted') && e('true');
|
||||
|
||||
@@ -292,11 +292,11 @@ class buildTest
|
||||
*
|
||||
* @param int $buildID
|
||||
* @param array $stories
|
||||
* @param innt $storyID
|
||||
* @param int $storyID
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function unlinkStoryTest($buildID, $stories = array(), $storyID)
|
||||
public function unlinkStoryTest($buildID, $stories = array(), $storyID = 0)
|
||||
{
|
||||
global $tester;
|
||||
|
||||
|
||||
@@ -302,7 +302,7 @@ class customTest
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function updateURAndSRTest($key = 0, $SRName)
|
||||
public function updateURAndSRTest($key = 0, $SRName = '')
|
||||
{
|
||||
global $app, $tester;
|
||||
|
||||
|
||||
@@ -296,7 +296,7 @@ class deptTest
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getUsersTest($browseType = 'inside', $deptID = 0, $count, $orderBy = 'id', $pager = null)
|
||||
public function getUsersTest($browseType = 'inside', $deptID = 0, $count = 0, $orderBy = 'id', $pager = null)
|
||||
{
|
||||
$objects = $this->objectModel->getUsers($browseType, $deptID, $pager, $orderBy);
|
||||
|
||||
@@ -317,7 +317,7 @@ class deptTest
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getDeptUserPairsTest($deptID = 0, $count, $key = 'account', $type = 'inside', $params = '')
|
||||
public function getDeptUserPairsTest($deptID = 0, $count = 0, $key = 'account', $type = 'inside', $params = '')
|
||||
{
|
||||
$objects = $this->objectModel->getDeptUserPairs($deptID, $key, $type, $params);
|
||||
|
||||
|
||||
@@ -13,6 +13,18 @@ class executionTest
|
||||
$this->objectModel = $tester->loadModel('execution');
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the privilege.
|
||||
*
|
||||
* @param mixed $executionID
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function checkPrivTest($executionID)
|
||||
{
|
||||
return $this->objectModel->checkPriv($executionID);
|
||||
}
|
||||
|
||||
/**
|
||||
* get todate
|
||||
*
|
||||
@@ -46,7 +58,7 @@ class executionTest
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function createObject($param = array(), $project, $dayNum, $days)
|
||||
public function createObject($param = array(), $project = '', $dayNum = '', $days = '')
|
||||
{
|
||||
$products = array('');
|
||||
$plans = array('');
|
||||
@@ -351,6 +363,76 @@ class executionTest
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the workload format and total.
|
||||
*
|
||||
* @param int $executionID
|
||||
* @param string $type
|
||||
* @param int $percent
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function checkWorkloadTest($executionID = 0, $type = '', $percent = 0)
|
||||
{
|
||||
global $tester;
|
||||
$tester->app->loadLang('programplan');
|
||||
$_POST['products'] = array(1, 81, 91);
|
||||
$_POST['percent'] = $percent;
|
||||
$_POST['parent'] = 0;
|
||||
|
||||
$oldExecution = $executionID ? $this->objectModel->getByID($executionID) : '';
|
||||
if(!empty($oldExecution->parent)) $_POST['parent'] = $oldExecution->parent;
|
||||
|
||||
$result = $this->objectModel->checkWorkload($type, $percent, $oldExecution);
|
||||
if(dao::isError()) return dao::getError(true);
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check begin and end date.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @param string $checkType empty|normal|gt|lt|eq
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function checkBeginAndEndDateTest($projectID, $checkType)
|
||||
{
|
||||
if($projectID) $project = $this->objectModel->getByID($projectID);
|
||||
switch($checkType)
|
||||
{
|
||||
case 'empty':
|
||||
$_POST['begin'] = '';
|
||||
$_POST['end'] = '';
|
||||
break;
|
||||
case 'normal':
|
||||
$_POST['begin'] = empty($project->begin) ? '' : date("Y-m-d",strtotime("+1 days",strtotime($project->begin)));
|
||||
$_POST['end'] = empty($project->end) ? '' : date("Y-m-d",strtotime("-1 days",strtotime($project->end)));
|
||||
break;
|
||||
case 'lt':
|
||||
$_POST['begin'] = empty($project->begin) ? '' : date("Y-m-d",strtotime("-1 days",strtotime($project->begin)));
|
||||
$_POST['end'] = empty($project->end) ? '' : date("Y-m-d",strtotime("-1 days",strtotime($project->end)));
|
||||
break;
|
||||
case 'gt':
|
||||
$_POST['begin'] = empty($project->begin) ? '' : date("Y-m-d",strtotime("+1 days",strtotime($project->begin)));
|
||||
$_POST['end'] = empty($project->end) ? '' : date("Y-m-d",strtotime("+1 days",strtotime($project->end)));
|
||||
break;
|
||||
case 'eq':
|
||||
$_POST['begin'] = empty($project->begin) ? '' : $project->begin;
|
||||
$_POST['end'] = empty($project->end) ? '' : $project->end;
|
||||
break;
|
||||
}
|
||||
|
||||
$begin = $_POST['begin'];
|
||||
$end = $_POST['end'];
|
||||
|
||||
$this->objectModel->checkBeginAndEndDate($projectID, $begin, $end);
|
||||
if(dao::isError()) return dao::getError(true);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* function getPairs test by execution
|
||||
*
|
||||
@@ -523,7 +605,6 @@ class executionTest
|
||||
{
|
||||
$object = $this->objectModel->getIdList($projectID);
|
||||
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
$error = dao::getError();
|
||||
@@ -539,6 +620,26 @@ class executionTest
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get execution stat data.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @param string $browseType
|
||||
* @param int $productID
|
||||
* @param int $branch
|
||||
* @param bool $withTasks
|
||||
* @param string $param
|
||||
* @param string $orderBy
|
||||
* @param object $pager
|
||||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
public function getStatDataTest($projectID = 0, $browseType = 'undone', $productID = 0, $branch = 0, $withTasks = false, $param = '', $orderBy = 'id_asc', $pager = null)
|
||||
{
|
||||
$objects = $this->objectModel->getStatData($projectID);
|
||||
return count($objects);
|
||||
}
|
||||
|
||||
/**
|
||||
* function getBranches test execution
|
||||
*
|
||||
@@ -647,6 +748,18 @@ class executionTest
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the privilege.
|
||||
*
|
||||
* @access public
|
||||
* @return string|bool
|
||||
*/
|
||||
public function getLimitedExecutionTest()
|
||||
{
|
||||
$this->objectModel->getProductGroupList();
|
||||
return isset($_SESSION['limitedExecutions']) ? $_SESSION['limitedExecutions'] : true;
|
||||
}
|
||||
|
||||
/**
|
||||
* function getProductGroupList test execution
|
||||
*
|
||||
@@ -711,6 +824,19 @@ class executionTest
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the task data group by execution id list.
|
||||
*
|
||||
* @param array $executionIdList
|
||||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
public function getTaskGroupByExecutionTest($executionIdList = array())
|
||||
{
|
||||
$objects = $this->objectModel->getTaskGroupByExecution($executionIdList);
|
||||
return count($objects);
|
||||
}
|
||||
|
||||
/**
|
||||
* function getDefaultManagers test by execution
|
||||
*
|
||||
@@ -1385,7 +1511,7 @@ class executionTest
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getCanCopyObjectsTest($projectID = 0, $count)
|
||||
public function getCanCopyObjectsTest($projectID = 0, $count = 0)
|
||||
{
|
||||
$object = $this->objectModel->getCanCopyObjects($projectID);
|
||||
|
||||
@@ -1475,7 +1601,7 @@ class executionTest
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function addProjectMembersTest($projectID = 0, $executionID, $count)
|
||||
public function addProjectMembersTest($projectID = 0, $executionID = 0, $count = 0)
|
||||
{
|
||||
global $tester;
|
||||
$tester->dbh->query("delete from zt_team where root = $projectID");
|
||||
@@ -2081,4 +2207,298 @@ class executionTest
|
||||
return $object;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get execution burn data.
|
||||
*
|
||||
* @param array $executionIDList
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getBurnDataTest($executionIDList)
|
||||
{
|
||||
global $tester;
|
||||
|
||||
$executions = $this->objectModel->getByIdList($executionIDList);
|
||||
$objects = $this->objectModel->getBurnData($executions);
|
||||
|
||||
$returns = array();
|
||||
foreach($objects as $executionID => $burnData)
|
||||
{
|
||||
$returns[$executionID] = '';
|
||||
foreach($burnData as $data) $returns[$executionID] .= ",$data->value";
|
||||
$returns[$executionID] = trim($returns[$executionID], ',');
|
||||
}
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
$error = dao::getError();
|
||||
return $error;
|
||||
}
|
||||
else
|
||||
{
|
||||
return $returns;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get begin and end for CFD.
|
||||
*
|
||||
* @param int $executionID
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getBeginEnd4CFDTest($executionID)
|
||||
{
|
||||
global $tester;
|
||||
|
||||
$execution = $this->objectModel->getByID($executionID);
|
||||
$object = $this->objectModel->getBeginEnd4CFD($execution);
|
||||
|
||||
$object[0] = $object[0] == date('Y-m-d', strtotime('-13 days', time())) ? 1 : 0;
|
||||
$object[1] = $object[1] == helper::today() ? 1 : 0;
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
$error = dao::getError();
|
||||
return $error;
|
||||
}
|
||||
else
|
||||
{
|
||||
return $object;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get taskes by search.
|
||||
*
|
||||
* @param string $condition
|
||||
* @param int $recPerPage
|
||||
* @param string $orderBy
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getSearchTasksTest($condition, $recPerPage, $orderBy)
|
||||
{
|
||||
global $tester;
|
||||
|
||||
/* Load pager. */
|
||||
$tester->app->loadClass('pager', $static = true);
|
||||
$pager = new pager(0, $recPerPage, 1);
|
||||
|
||||
$objects = $this->objectModel->getSearchTasks($condition, $pager, $orderBy);
|
||||
|
||||
$returns = '';
|
||||
foreach($objects as $object)
|
||||
{
|
||||
$returns .= "$object->id:name:$object->name";
|
||||
if(!empty($object->team))
|
||||
{
|
||||
$returns .= ',team:[';
|
||||
foreach($object->team as $team) $returns .= "$team->id,";
|
||||
$returns = trim($returns, ',');
|
||||
$returns .= ']';
|
||||
}
|
||||
$returns .= ';';
|
||||
}
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
$error = dao::getError();
|
||||
return $error;
|
||||
}
|
||||
else
|
||||
{
|
||||
return $returns;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test Get bugs by search in execution.
|
||||
*
|
||||
* @param array $products
|
||||
* @param int $executionID
|
||||
* @param string $sql
|
||||
* @param object $pager
|
||||
* @param string $orderBy
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function getSearchBugsTest($products, $executionID, $sql, $pager = null, $orderBy = 'id_desc')
|
||||
{
|
||||
$object = $this->objectModel->getSearchBugs($products, $executionID, $sql, $pager, $orderBy);
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
$error = dao::getError();
|
||||
return $error;
|
||||
}
|
||||
else
|
||||
{
|
||||
return $object;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test Get kanban group data.
|
||||
*
|
||||
* @param array $stories
|
||||
* @param array $tasks
|
||||
* @param array $bugs
|
||||
* @param string $type
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function getKanbanGroupDataTest($stories, $tasks, $bugs, $type = 'story')
|
||||
{
|
||||
$object = $this->objectModel->getKanbanGroupData($stories, $tasks, $bugs, $type);
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
$error = dao::getError();
|
||||
return $error;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(count((array)$object['closed']) == 0 and count((array)$object['nokey']) == 0) return 'empty';
|
||||
return $object;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test Get Prev Kanban.
|
||||
*
|
||||
* @param int $executionID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function getPrevKanbanTest($executionID)
|
||||
{
|
||||
$result = $this->objectModel->getPrevKanban($executionID);
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
$error = dao::getError();
|
||||
return $error;
|
||||
}
|
||||
else
|
||||
{
|
||||
return !$result ? 'empty' : $result;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test save Kanban Data.
|
||||
*
|
||||
* @param int $executionID
|
||||
* @param array $kanbanDatas
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function saveKanbanDataTest($executionID, $kanbanDatas = '')
|
||||
{
|
||||
if($kanbanDatas === '')
|
||||
{
|
||||
global $tester;
|
||||
$contents = array('story', 'wait', 'doing', 'done', 'cancel');
|
||||
$stories = $tester->loadModel('story')->getExecutionStories($executionID, 0, 0, 'id_asc');
|
||||
$kanbanTasks = $this->objectModel->getKanbanTasks($executionID, "id");
|
||||
$kanbanBugs = $tester->loadModel('bug')->getExecutionBugs($executionID);
|
||||
$users = array();
|
||||
$taskAndBugs = array();
|
||||
foreach($kanbanTasks as $task)
|
||||
{
|
||||
$storyID = $task->storyID;
|
||||
$status = $task->status;
|
||||
$users[] = $task->assignedTo;
|
||||
|
||||
$taskAndBugs[$status]["task{$task->id}"] = $task;
|
||||
}
|
||||
foreach($kanbanBugs as $bug)
|
||||
{
|
||||
$storyID = $bug->story;
|
||||
$status = $bug->status;
|
||||
$status = $status == 'active' ? 'wait' : ($status == 'resolved' ? ($bug->resolution == 'postponed' ? 'cancel' : 'done') : $status);
|
||||
$users[] = $bug->assignedTo;
|
||||
|
||||
$taskAndBugs[$status]["bug{$bug->id}"] = $bug;
|
||||
}
|
||||
|
||||
$datas = array();
|
||||
foreach($contents as $content)
|
||||
{
|
||||
if($content != 'story' and !isset($taskAndBugs[$content])) continue;
|
||||
$datas[$content] = $content == 'story' ? $stories : $taskAndBugs[$content];
|
||||
}
|
||||
$kanbanDatas = $datas;
|
||||
}
|
||||
|
||||
$object = $this->objectModel->saveKanbanData($executionID, $kanbanDatas);
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
$error = dao::getError();
|
||||
return $error;
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = $this->objectModel->getPrevKanban($executionID);
|
||||
return !$result ? 'empty' : $result;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test Get lifetime by id list.
|
||||
*
|
||||
* @param array $idList
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function getLifetimeByIdListTest($idList = '')
|
||||
{
|
||||
$result = $this->objectModel->getLifetimeByIdList($idList);
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
$error = dao::getError();
|
||||
return $error;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!$result) return 'empty';
|
||||
|
||||
foreach($result as $id => $lifetime)
|
||||
{
|
||||
if(!$lifetime) $result[$id] = 'emptyLifetime';
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test Update user view of execution and it's product.
|
||||
*
|
||||
* @param int $executionID
|
||||
* @param string $objectType
|
||||
* @param array $users
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function updateUserViewTest($executionID, $objectType = 'sprint', $users = array())
|
||||
{
|
||||
$this->objectModel->updateUserView($executionID, $objectType, $users);
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
$error = dao::getError();
|
||||
return $error;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(count($users) > 0) su($users[0]);
|
||||
|
||||
global $tester;
|
||||
return $tester->app->user->view->sprints;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,10 +104,7 @@ class myTest
|
||||
$tester->app->loadClass('pager', $static = true);
|
||||
$pager = new pager($recTotal, $recPerPage, $pageID);
|
||||
|
||||
$actionID = $tester->loadModel('action')->create('task', 6, 'assigned', '', '', 'admin', '');
|
||||
$actionID = $tester->loadModel('action')->create('bug', 6, 'assigned', '', '', 'admin', '');
|
||||
$actionID = $tester->loadModel('action')->create('story', 5, 'assigned', '', '', 'admin', '');
|
||||
$objects = $this->objectModel->getAssignedByMe($account, $limit, $pager, $orderBy, $projectID, $objectType);
|
||||
$objects = $this->objectModel->getAssignedByMe($account, $limit, $pager, $orderBy, $objectType);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
|
||||
@@ -280,7 +280,7 @@ class personnelTest
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function addWhitelistTest($objectType = '', $objectID = 0, $user)
|
||||
public function addWhitelistTest($objectType = '', $objectID = 0, $user = '')
|
||||
{
|
||||
$users = array('accounts' => $user);
|
||||
foreach($users as $key => $value) $_POST[$key] = $value;
|
||||
|
||||
@@ -95,7 +95,7 @@ class releaseTest
|
||||
$files = array();
|
||||
$mailto = array();
|
||||
|
||||
$createFields = array('name' => '','marker' => '1', 'build' => '', 'date' => $date, 'desc' => '', 'mailto' => $mailto , 'labels' => $labels, 'files' => $files);
|
||||
$createFields = array('name' => '','marker' => '1', 'build' => '', 'date' => $date, 'desc' => '', 'mailto' => $mailto , 'labels' => $labels, 'files' => $files);
|
||||
|
||||
foreach($createFields as $field => $defaultValue) $_POST[$field] = $defaultValue;
|
||||
foreach($param as $key => $value) $_POST[$key] = $value;
|
||||
@@ -230,11 +230,12 @@ class releaseTest
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @param string $type
|
||||
* @param string $bugs
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
|
||||
public function linkBugTest($releaseID, $type = 'bug', $bugs)
|
||||
public function linkBugTest($releaseID, $type = 'bug', $bugs = '')
|
||||
{
|
||||
$_POST['bugs'] = $bugs;
|
||||
$this->objectModel->linkBug($releaseID, $type);
|
||||
@@ -275,10 +276,11 @@ class releaseTest
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @param string $type
|
||||
* @param string $bugs
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function batchUnlinkBugTest($releaseID, $type = 'bug', $bugs)
|
||||
public function batchUnlinkBugTest($releaseID, $type = 'bug', $bugs = '')
|
||||
{
|
||||
$_POST['bugs'] = $bugs;
|
||||
$this->objectModel->linkBug($releaseID);
|
||||
|
||||
@@ -115,10 +115,11 @@ class storyTest
|
||||
* @param int $bugID
|
||||
* @param string $from
|
||||
* @param string $extra
|
||||
* @param string $params
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function createTest($executionID = 0, $bugID = 0, $from = '', $extra = '', $params)
|
||||
public function createTest($executionID = 0, $bugID = 0, $from = '', $extra = '', $params = '')
|
||||
{
|
||||
$_POST = $params;
|
||||
$result = $this->objectModel->create($executionID, $bugID, $from, $extra);
|
||||
@@ -159,7 +160,7 @@ class storyTest
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function batchCreateTest($productID = 0, $branch = 0, $type = 'story', $params)
|
||||
public function batchCreateTest($productID = 0, $branch = 0, $type = 'story', $params = '')
|
||||
{
|
||||
$_POST = $params;
|
||||
$results = $this->objectModel->batchCreate($productID, $branch, $type);
|
||||
@@ -451,7 +452,7 @@ class storyTest
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function batchToTaskTest($executionID, $projectID = 0, $params)
|
||||
public function batchToTaskTest($executionID, $projectID = 0, $params = '')
|
||||
{
|
||||
$_POST = $params;
|
||||
$taskIdList = $this->objectModel->batchToTask($executionID, $projectID);
|
||||
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/execution.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 executionModel->checkBeginAndEndDate();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
测试传入空值 >> 1
|
||||
测试检查正常的日期 >> 1
|
||||
测试检查小于开始的日期 >> 迭代开始日期应大于等于项目的开始日期:2022-05-26。\n
|
||||
测试检查大于开始的日期 >> 迭代截止日期应小于等于项目的截止日期:2022-09-30。\n
|
||||
测试检查等于开始跟结束的日期 >> 1
|
||||
|
||||
*/
|
||||
|
||||
$projectIdList = array(0, 11);
|
||||
$checkType = array('empty', 'normal', 'lt', 'gt', 'eq');
|
||||
|
||||
$execution = new executionTest();
|
||||
|
||||
r($execution->checkBeginAndEndDateTest($projectIdList[0], $checkType[0])) && p() && e('1'); // 测试传入空值
|
||||
r($execution->checkBeginAndEndDateTest($projectIdList[1], $checkType[1])) && p() && e('1'); // 测试检查正常的日期
|
||||
r($execution->checkBeginAndEndDateTest($projectIdList[1], $checkType[2])) && p() && e('迭代开始日期应大于等于项目的开始日期:2022-05-26。\n'); // 测试检查小于开始的日期
|
||||
r($execution->checkBeginAndEndDateTest($projectIdList[1], $checkType[3])) && p() && e('迭代截止日期应小于等于项目的截止日期:2022-09-30。\n'); // 测试检查大于开始的日期
|
||||
r($execution->checkBeginAndEndDateTest($projectIdList[1], $checkType[4])) && p() && e('1'); // 测试检查等于开始跟结束的日期
|
||||
Executable
+31
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/execution.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 executionModel->checkPriv();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
测试传入空值 >> 0
|
||||
测试传入0 >> 0
|
||||
测试传入正确的项目ID的权限判断 >> 1
|
||||
测试传入迭代ID的权限判断 >> 1
|
||||
测试传入阶段ID的权限判断 >> 1
|
||||
测试传入看板ID的权限判断 >> 1
|
||||
|
||||
*/
|
||||
|
||||
$executionIdList = array('', 0, 1, 101, 131, 161);
|
||||
|
||||
$execution = new executionTest();
|
||||
|
||||
r($execution->checkPrivTest($executionIdList[0])) && p() && e('0'); // 测试传入空值
|
||||
r($execution->checkPrivTest($executionIdList[1])) && p() && e('0'); // 测试传入0
|
||||
r($execution->checkPrivTest($executionIdList[2])) && p() && e('1'); // 测试传入正确的项目ID的权限判断
|
||||
r($execution->checkPrivTest($executionIdList[3])) && p() && e('1'); // 测试传入迭代ID的权限判断
|
||||
r($execution->checkPrivTest($executionIdList[4])) && p() && e('1'); // 测试传入阶段ID的权限判断
|
||||
r($execution->checkPrivTest($executionIdList[5])) && p() && e('1'); // 测试传入看板ID的权限判断
|
||||
Executable
+71
@@ -0,0 +1,71 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/execution.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 executionModel->checkWorkload();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
测试传入空数据 >> 0
|
||||
测试创建迭代的工作量 >> 0
|
||||
测试创建迭代的工作量 >> 工作量占比累计不应当超过100, 当前产品下的工作量之和为%\n
|
||||
测试创建迭代的工作量 >> "工作量比例"必须为数字\n
|
||||
测试创建迭代的工作量 >> 0
|
||||
测试更新迭代的工作量 >> 0
|
||||
测试更新迭代的工作量 >> 工作量占比累计不应当超过100, 当前产品下的工作量之和为%\n
|
||||
测试更新迭代的工作量 >> "工作量比例"必须为数字\n
|
||||
测试更新迭代的工作量 >> 0
|
||||
测试创建阶段的工作量 >> 0
|
||||
测试创建阶段的工作量 >> 工作量占比累计不应当超过100, 当前产品下的工作量之和为%\n
|
||||
测试创建阶段的工作量 >> "工作量比例"必须为数字\n
|
||||
测试创建阶段的工作量 >> 0
|
||||
测试更新阶段的工作量 >> 0
|
||||
测试更新阶段的工作量 >> 工作量占比累计不应当超过100, 当前产品下的工作量之和为%\n
|
||||
测试更新阶段的工作量 >> "工作量比例"必须为数字\n
|
||||
测试更新阶段的工作量 >> 0
|
||||
测试创建看板的工作量 >> 0
|
||||
测试创建看板的工作量 >> 工作量占比累计不应当超过100, 当前产品下的工作量之和为%\n
|
||||
测试创建看板的工作量 >> "工作量比例"必须为数字\n
|
||||
测试创建看板的工作量 >> 0
|
||||
测试更新看板的工作量 >> 0
|
||||
测试更新看板的工作量 >> 工作量占比累计不应当超过100, 当前产品下的工作量之和为%\n
|
||||
测试更新看板的工作量 >> "工作量比例"必须为数字\n
|
||||
测试更新看板的工作量 >> 0
|
||||
|
||||
*/
|
||||
|
||||
$executionIdList = array(0, 101, 131, 161);
|
||||
$typeList = array('', 'create', 'update');
|
||||
$percentList = array('0', '123', 'all', '10');
|
||||
|
||||
$execution = new executionTest();
|
||||
|
||||
r($execution->checkWorkloadTest($executionIdList[0], $typeList[0], $percentList[0])) && p() && e('0'); // 测试传入空数据
|
||||
r($execution->checkWorkloadTest($executionIdList[1], $typeList[1], $percentList[0])) && p() && e('0'); // 测试创建迭代的工作量
|
||||
r($execution->checkWorkloadTest($executionIdList[1], $typeList[1], $percentList[1])) && p() && e('工作量占比累计不应当超过100, 当前产品下的工作量之和为%\n'); // 测试创建迭代的工作量
|
||||
r($execution->checkWorkloadTest($executionIdList[1], $typeList[1], $percentList[2])) && p() && e('"工作量比例"必须为数字\n'); // 测试创建迭代的工作量
|
||||
r($execution->checkWorkloadTest($executionIdList[1], $typeList[1], $percentList[3])) && p() && e('0'); // 测试创建迭代的工作量
|
||||
r($execution->checkWorkloadTest($executionIdList[1], $typeList[2], $percentList[0])) && p() && e('0'); // 测试更新迭代的工作量
|
||||
r($execution->checkWorkloadTest($executionIdList[1], $typeList[2], $percentList[1])) && p() && e('工作量占比累计不应当超过100, 当前产品下的工作量之和为%\n'); // 测试更新迭代的工作量
|
||||
r($execution->checkWorkloadTest($executionIdList[1], $typeList[2], $percentList[2])) && p() && e('"工作量比例"必须为数字\n'); // 测试更新迭代的工作量
|
||||
r($execution->checkWorkloadTest($executionIdList[1], $typeList[2], $percentList[3])) && p() && e('0'); // 测试更新迭代的工作量
|
||||
r($execution->checkWorkloadTest($executionIdList[2], $typeList[1], $percentList[0])) && p() && e('0'); // 测试创建阶段的工作量
|
||||
r($execution->checkWorkloadTest($executionIdList[2], $typeList[1], $percentList[1])) && p() && e('工作量占比累计不应当超过100, 当前产品下的工作量之和为%\n'); // 测试创建阶段的工作量
|
||||
r($execution->checkWorkloadTest($executionIdList[2], $typeList[1], $percentList[2])) && p() && e('"工作量比例"必须为数字\n'); // 测试创建阶段的工作量
|
||||
r($execution->checkWorkloadTest($executionIdList[2], $typeList[1], $percentList[3])) && p() && e('0'); // 测试创建阶段的工作量
|
||||
r($execution->checkWorkloadTest($executionIdList[2], $typeList[2], $percentList[0])) && p() && e('0'); // 测试更新阶段的工作量
|
||||
r($execution->checkWorkloadTest($executionIdList[2], $typeList[2], $percentList[1])) && p() && e('工作量占比累计不应当超过100, 当前产品下的工作量之和为%\n'); // 测试更新阶段的工作量
|
||||
r($execution->checkWorkloadTest($executionIdList[2], $typeList[2], $percentList[2])) && p() && e('"工作量比例"必须为数字\n'); // 测试更新阶段的工作量
|
||||
r($execution->checkWorkloadTest($executionIdList[2], $typeList[2], $percentList[3])) && p() && e('0'); // 测试更新阶段的工作量
|
||||
r($execution->checkWorkloadTest($executionIdList[3], $typeList[1], $percentList[0])) && p() && e('0'); // 测试创建看板的工作量
|
||||
r($execution->checkWorkloadTest($executionIdList[3], $typeList[1], $percentList[1])) && p() && e('工作量占比累计不应当超过100, 当前产品下的工作量之和为%\n'); // 测试创建看板的工作量
|
||||
r($execution->checkWorkloadTest($executionIdList[3], $typeList[1], $percentList[2])) && p() && e('"工作量比例"必须为数字\n'); // 测试创建看板的工作量
|
||||
r($execution->checkWorkloadTest($executionIdList[3], $typeList[1], $percentList[3])) && p() && e('0'); // 测试创建看板的工作量
|
||||
r($execution->checkWorkloadTest($executionIdList[3], $typeList[2], $percentList[0])) && p() && e('0'); // 测试更新看板的工作量
|
||||
r($execution->checkWorkloadTest($executionIdList[3], $typeList[2], $percentList[1])) && p() && e('工作量占比累计不应当超过100, 当前产品下的工作量之和为%\n'); // 测试更新看板的工作量
|
||||
r($execution->checkWorkloadTest($executionIdList[3], $typeList[2], $percentList[2])) && p() && e('"工作量比例"必须为数字\n'); // 测试更新看板的工作量
|
||||
r($execution->checkWorkloadTest($executionIdList[3], $typeList[2], $percentList[3])) && p() && e('0'); // 测试更新看板的工作量
|
||||
Executable
+30
@@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/execution.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=executionModel->getBeginEnd4CFD();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
ID 161 的专业研发看板累计流图默认开始和结束时间 是不是14天前和今天 >> 1,1
|
||||
ID 162 的专业研发看板累计流图默认开始和结束时间 是不是14天前和今天 >> 1,1
|
||||
ID 163 的专业研发看板累计流图默认开始和结束时间 是不是14天前和今天 >> 1,1
|
||||
ID 171 的专业研发看板累计流图默认开始和结束时间 是不是14天前和今天 >> 1,1
|
||||
ID 181 的专业研发看板累计流图默认开始和结束时间 是不是14天前和今天 >> 1,1
|
||||
ID 191 的专业研发看板累计流图默认开始和结束时间 是不是14天前和今天 >> 1,1
|
||||
|
||||
*/
|
||||
|
||||
$executionIDList = array(161, 162, 163, 171, 181, 191);
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->getBeginEnd4CFDTest($executionIDList[0])) && p('0,1') && e('1,1'); // ID 161 的专业研发看板累计流图默认开始和结束时间 是不是14天前和今天
|
||||
r($execution->getBeginEnd4CFDTest($executionIDList[1])) && p('0,1') && e('1,1'); // ID 162 的专业研发看板累计流图默认开始和结束时间 是不是14天前和今天
|
||||
r($execution->getBeginEnd4CFDTest($executionIDList[2])) && p('0,1') && e('1,1'); // ID 163 的专业研发看板累计流图默认开始和结束时间 是不是14天前和今天
|
||||
r($execution->getBeginEnd4CFDTest($executionIDList[3])) && p('0,1') && e('1,1'); // ID 171 的专业研发看板累计流图默认开始和结束时间 是不是14天前和今天
|
||||
r($execution->getBeginEnd4CFDTest($executionIDList[4])) && p('0,1') && e('1,1'); // ID 181 的专业研发看板累计流图默认开始和结束时间 是不是14天前和今天
|
||||
r($execution->getBeginEnd4CFDTest($executionIDList[5])) && p('0,1') && e('1,1'); // ID 191 的专业研发看板累计流图默认开始和结束时间 是不是14天前和今天
|
||||
Executable
+26
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/execution.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=executionModel->getBurnData();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
测试获取 执行ID 101 102 的燃尽图 >> 21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,36,36,36,36,36,36,36,36,36,36,null;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,null
|
||||
测试获取 执行ID 101 103 111 的燃尽图 >> 21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,36,36,36,36,36,36,36,36,36,36,null;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,23,23,23,23,23,23,23,23,23,23,null;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,27,27,27,27,27,27,27,27,27,27,null
|
||||
测试获取 执行ID 111 121 131 的燃尽图 >> 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,27,27,27,27,27,27,27,27,27,27,null;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,27,27,27,27,27,27,27,27,27,27,null;17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,null
|
||||
测试获取 执行ID 101 102 103 111 121 131 的燃尽图 >> 21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,36,36,36,36,36,36,36,36,36,36,null;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,null;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,23,23,23,23,23,23,23,23,23,23,null;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,27,27,27,27,27,27,27,27,27,27,null;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,27,27,27,27,27,27,27,27,27,27,null;17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,null
|
||||
|
||||
*/
|
||||
|
||||
$executionIDList = array(array(101, 102), array(101, 103, 111), array(111, 121, 131), array(101, 102, 103, 111, 121, 131));
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->getBurnDataTest($executionIDList[0])) && p('101;102') && e('21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,36,36,36,36,36,36,36,36,36,36,null;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,null'); // 测试获取 执行ID 101 102 的燃尽图
|
||||
r($execution->getBurnDataTest($executionIDList[1])) && p('101;103;111') && e('21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,36,36,36,36,36,36,36,36,36,36,null;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,23,23,23,23,23,23,23,23,23,23,null;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,27,27,27,27,27,27,27,27,27,27,null'); // 测试获取 执行ID 101 103 111 的燃尽图
|
||||
r($execution->getBurnDataTest($executionIDList[2])) && p('111;121;131') && e('0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,27,27,27,27,27,27,27,27,27,27,null;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,27,27,27,27,27,27,27,27,27,27,null;17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,null'); // 测试获取 执行ID 111 121 131 的燃尽图
|
||||
r($execution->getBurnDataTest($executionIDList[3])) && p('101;102;103;111;121;131') && e('21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,36,36,36,36,36,36,36,36,36,36,null;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,null;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,23,23,23,23,23,23,23,23,23,23,null;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,27,27,27,27,27,27,27,27,27,27,null;0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,27,27,27,27,27,27,27,27,27,27,null;17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,null'); // 测试获取 执行ID 101 102 103 111 121 131 的燃尽图
|
||||
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/execution.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试executionModel->getKanbanGroupData();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
空数据查询 >> empty
|
||||
查询执行162需求 >> 软件需求246
|
||||
|
||||
*/
|
||||
|
||||
$execution = new executionTest();
|
||||
|
||||
$executionID = 162;
|
||||
$stories = $tester->loadModel('story')->getExecutionStories($executionID);
|
||||
$tasks = $execution->getKanbanTasksTest($executionID, false);
|
||||
$bugs = $tester->loadModel('bug')->getExecutionBugs($executionID);
|
||||
|
||||
r($execution->getKanbanGroupDataTest(array(), array(), array(), 'story')) && p('') && e('empty'); //空数据查询
|
||||
r($execution->getKanbanGroupDataTest($stories, $tasks, $bugs, 'story')) && p('246:title') && e('软件需求246'); // 查询执行162需求
|
||||
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/execution.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试executionModel->getLifetimeByIdList();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
查询执行103和161 lifetime >> emptyLifetime
|
||||
查询空执行 lifetime >> empty
|
||||
|
||||
*/
|
||||
|
||||
$executionIDList = array('103', '161');
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->getLifetimeByIdListTest($executionIDList)) && p('103') && e('emptyLifetime'); // 查询执行103和161 lifetime
|
||||
r($execution->getLifetimeByIdListTest(array('0'))) && p('') && e('empty'); // 查询空执行 lifetime
|
||||
Executable
+19
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/execution.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 executionModel->getLimitedExecution();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
获取所有受限制的执行ID >> 1
|
||||
|
||||
*/
|
||||
|
||||
$execution = new executionTest();
|
||||
|
||||
r($execution->getLimitedExecutionTest()) && p() && e('1'); // 获取所有受限制的执行ID
|
||||
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/execution.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试executionModel->getPrevKanban();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
查询执行162数据 >> empty
|
||||
保存数据后查询执行162数据 >> 246
|
||||
|
||||
*/
|
||||
|
||||
$execution = new executionTest();
|
||||
|
||||
$emptyExecutionID = 163;
|
||||
$executionID = 162;
|
||||
|
||||
r($execution->getPrevKanbanTest($emptyExecutionID)) && p('') && e('empty'); //查询执行162数据
|
||||
$execution->saveKanbanDataTest($executionID);
|
||||
r($execution->getPrevKanbanTest($executionID)) && p('story:0') && e('246'); //保存数据后查询执行162数据
|
||||
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/execution.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试executionModel->getSearchBugs();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
查询产品1bug >> 测试单转Bug1
|
||||
查询项目13bug优先级 >> 3
|
||||
|
||||
*/
|
||||
|
||||
$productIDList = array(1 => '正常产品1');
|
||||
$executionIDList = array('103');
|
||||
$sql = '1=1';
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->getSearchBugsTest($productIDList, 0, $sql)) && p('301:title') && e('测试单转Bug1'); // 查询产品1bug
|
||||
r($execution->getSearchBugsTest(array(), $executionIDList[0], $sql)) && p('303:pri') && e(3); // 查询项目13bug优先级
|
||||
Executable
+58
@@ -0,0 +1,58 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/execution.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=executionModel->getSearchTasks();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
测试通过sql语句获取3个任务 id 倒序 execution = '101' and deleted = '0' and parent >= 0 >> 910:name:子任务10;909:name:子任务9,team:[930,920];908:name:子任务8,team:[919,929];
|
||||
测试通过sql语句获取3个任务 id 正序 execution = '101' and deleted = '0' and parent >= 0 >> 1:name:开发任务11,team:[911,921];901:name:子任务1,team:[922,912];902:name:子任务2,team:[923,913];
|
||||
测试通过sql语句获取5个任务 id 倒序 execution = '101' and deleted = '0' and parent >= 0 >> 910:name:子任务10;909:name:子任务9,team:[930,920];908:name:子任务8,team:[919,929];907:name:子任务7,team:[918,928];906:name:子任务6,team:[927,917];
|
||||
测试通过sql语句获取5个任务 id 正序 execution = '101' and deleted = '0' and parent >= 0 >> 1:name:开发任务11,team:[911,921];901:name:子任务1,team:[922,912];902:name:子任务2,team:[923,913];903:name:子任务3,team:[914,924];904:name:子任务4,team:[915,925];
|
||||
测试通过sql语句获取3个任务 id 倒序 type = 'devel' and fromBug != '0' and parent >= 0 >> 0
|
||||
测试通过sql语句获取3个任务 id 正序 type = 'devel' and fromBug != '0' and parent >= 0 >> 0
|
||||
测试通过sql语句获取5个任务 id 倒序 type = 'devel' and fromBug != '0' and parent >= 0 >> 0
|
||||
测试通过sql语句获取5个任务 id 正序 type = 'devel' and fromBug != '0' and parent >= 0 >> 0
|
||||
测试通过sql语句获取3个任务 id 倒序 execution = '101' and story != '0' and parent >= 0 >> 1:name:开发任务11,team:[911,921];
|
||||
测试通过sql语句获取3个任务 id 正序 execution = '101' and story != '0' and parent >= 0 >> 1:name:开发任务11,team:[911,921];
|
||||
测试通过sql语句获取5个任务 id 倒序 execution = '101' and story != '0' and parent >= 0 >> 1:name:开发任务11,team:[911,921];
|
||||
测试通过sql语句获取5个任务 id 正序 execution = '101' and story != '0' and parent >= 0 >> 1:name:开发任务11,team:[911,921];
|
||||
测试通过sql语句获取3个任务 id 倒序 module like '%2%' and type = 'design' and parent >= 0 >> 909:name:子任务9,team:[930,920];901:name:子任务1,team:[922,912];801:name:更多任务201;
|
||||
测试通过sql语句获取3个任务 id 正序 module like '%2%' and type = 'design' and parent >= 0 >> 1:name:开发任务11,team:[911,921];65:name:开发任务75;73:name:开发任务83;
|
||||
测试通过sql语句获取5个任务 id 倒序 module like '%2%' and type = 'design' and parent >= 0 >> 909:name:子任务9,team:[930,920];901:name:子任务1,team:[922,912];801:name:更多任务201;769:name:更多任务169;737:name:更多任务137;
|
||||
测试通过sql语句获取5个任务 id 正序 module like '%2%' and type = 'design' and parent >= 0 >> 1:name:开发任务11,team:[911,921];65:name:开发任务75;73:name:开发任务83;81:name:开发任务91;89:name:开发任务99;
|
||||
|
||||
*/
|
||||
|
||||
$condition = array();
|
||||
$condition[] = "execution = '101' and deleted = '0' and parent >= 0";
|
||||
$condition[] = "type = 'devel' and fromBug != '0' and parent >= 0";
|
||||
$condition[] = "execution = '101' and story != '0' and parent >= 0";
|
||||
$condition[] = "module like '%2%' and type = 'design' and parent >= 0";
|
||||
|
||||
$recPerPage = array('3', '5');
|
||||
$orderBy = array('id_desc', 'id_asc');
|
||||
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->getSearchTasksTest($condition[0], $recPerPage[0], $orderBy[0])) && p() && e('910:name:子任务10;909:name:子任务9,team:[930,920];908:name:子任务8,team:[919,929];'); // 测试通过sql语句获取3个任务 id 倒序 execution = '101' and deleted = '0' and parent >= 0
|
||||
r($execution->getSearchTasksTest($condition[0], $recPerPage[0], $orderBy[1])) && p() && e('1:name:开发任务11,team:[911,921];901:name:子任务1,team:[922,912];902:name:子任务2,team:[923,913];'); // 测试通过sql语句获取3个任务 id 正序 execution = '101' and deleted = '0' and parent >= 0
|
||||
r($execution->getSearchTasksTest($condition[0], $recPerPage[1], $orderBy[0])) && p() && e('910:name:子任务10;909:name:子任务9,team:[930,920];908:name:子任务8,team:[919,929];907:name:子任务7,team:[918,928];906:name:子任务6,team:[927,917];'); // 测试通过sql语句获取5个任务 id 倒序 execution = '101' and deleted = '0' and parent >= 0
|
||||
r($execution->getSearchTasksTest($condition[0], $recPerPage[1], $orderBy[1])) && p() && e('1:name:开发任务11,team:[911,921];901:name:子任务1,team:[922,912];902:name:子任务2,team:[923,913];903:name:子任务3,team:[914,924];904:name:子任务4,team:[915,925];'); // 测试通过sql语句获取5个任务 id 正序 execution = '101' and deleted = '0' and parent >= 0
|
||||
r($execution->getSearchTasksTest($condition[1], $recPerPage[0], $orderBy[0])) && p() && e('0'); // 测试通过sql语句获取3个任务 id 倒序 type = 'devel' and fromBug != '0' and parent >= 0
|
||||
r($execution->getSearchTasksTest($condition[1], $recPerPage[0], $orderBy[1])) && p() && e('0'); // 测试通过sql语句获取3个任务 id 正序 type = 'devel' and fromBug != '0' and parent >= 0
|
||||
r($execution->getSearchTasksTest($condition[1], $recPerPage[1], $orderBy[0])) && p() && e('0'); // 测试通过sql语句获取5个任务 id 倒序 type = 'devel' and fromBug != '0' and parent >= 0
|
||||
r($execution->getSearchTasksTest($condition[1], $recPerPage[1], $orderBy[1])) && p() && e('0'); // 测试通过sql语句获取5个任务 id 正序 type = 'devel' and fromBug != '0' and parent >= 0
|
||||
r($execution->getSearchTasksTest($condition[2], $recPerPage[0], $orderBy[0])) && p() && e('1:name:开发任务11,team:[911,921];'); // 测试通过sql语句获取3个任务 id 倒序 execution = '101' and story != '0' and parent >= 0
|
||||
r($execution->getSearchTasksTest($condition[2], $recPerPage[0], $orderBy[1])) && p() && e('1:name:开发任务11,team:[911,921];'); // 测试通过sql语句获取3个任务 id 正序 execution = '101' and story != '0' and parent >= 0
|
||||
r($execution->getSearchTasksTest($condition[2], $recPerPage[1], $orderBy[0])) && p() && e('1:name:开发任务11,team:[911,921];'); // 测试通过sql语句获取5个任务 id 倒序 execution = '101' and story != '0' and parent >= 0
|
||||
r($execution->getSearchTasksTest($condition[2], $recPerPage[1], $orderBy[1])) && p() && e('1:name:开发任务11,team:[911,921];'); // 测试通过sql语句获取5个任务 id 正序 execution = '101' and story != '0' and parent >= 0
|
||||
r($execution->getSearchTasksTest($condition[3], $recPerPage[0], $orderBy[0])) && p() && e('909:name:子任务9,team:[930,920];901:name:子任务1,team:[922,912];801:name:更多任务201;'); // 测试通过sql语句获取3个任务 id 倒序 module like '%2%' and type = 'design' and parent >= 0
|
||||
r($execution->getSearchTasksTest($condition[3], $recPerPage[0], $orderBy[1])) && p() && e('1:name:开发任务11,team:[911,921];65:name:开发任务75;73:name:开发任务83;'); // 测试通过sql语句获取3个任务 id 正序 module like '%2%' and type = 'design' and parent >= 0
|
||||
r($execution->getSearchTasksTest($condition[3], $recPerPage[1], $orderBy[0])) && p() && e('909:name:子任务9,team:[930,920];901:name:子任务1,team:[922,912];801:name:更多任务201;769:name:更多任务169;737:name:更多任务137;'); // 测试通过sql语句获取5个任务 id 倒序 module like '%2%' and type = 'design' and parent >= 0
|
||||
r($execution->getSearchTasksTest($condition[3], $recPerPage[1], $orderBy[1])) && p() && e('1:name:开发任务11,team:[911,921];65:name:开发任务75;73:name:开发任务83;81:name:开发任务91;89:name:开发任务99;'); // 测试通过sql语句获取5个任务 id 正序 module like '%2%' and type = 'design' and parent >= 0
|
||||
Executable
+76
@@ -0,0 +1,76 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/execution.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 executionModel->getStatData();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
测试默认值 >> 0
|
||||
测试传入空值 >> 0
|
||||
测试projectID为1的所有未关闭执行 >> 0
|
||||
测试projectID为1的所有执行 >> 0
|
||||
测试projectID为1的未开始执行 >> 0
|
||||
测试projectID为1的进行中执行 >> 0
|
||||
测试projectID为1的已挂起执行 >> 0
|
||||
测试projectID为1的已关闭执行 >> 0
|
||||
测试projectID为1的我参与执行 >> 0
|
||||
测试projectID为1的搜索出来的执行 >> 0
|
||||
测试projectID为1的评审执行 >> 0
|
||||
测试projectID为1, productID为1, branchID为0的所有执行 >> 0
|
||||
测试projectID为1, productID为1, branchID为0的所有执行和任务 >> 0
|
||||
测试projectID为1, productID为1, branchID为0的非父阶段 >> 0
|
||||
测试projectID为11的所有未关闭执行 >> 7
|
||||
测试projectID为11的所有执行 >> 7
|
||||
测试projectID为11的未开始执行 >> 7
|
||||
测试projectID为11的进行中执行 >> 7
|
||||
测试projectID为11的已挂起执行 >> 7
|
||||
测试projectID为11的已关闭执行 >> 7
|
||||
测试projectID为11的我参与执行 >> 7
|
||||
测试projectID为11的搜索出来的执行 >> 7
|
||||
测试projectID为11的评审执行 >> 7
|
||||
测试projectID为11, productID为1, branchID为0的所有执行 >> 7
|
||||
测试projectID为11, productID为1, branchID为0的所有执行和任务 >> 7
|
||||
测试projectID为11, productID为1, branchID为0的非父阶段 >> 7
|
||||
|
||||
*/
|
||||
|
||||
$projectIdList = array(0, 1, 11);
|
||||
$browseTypeList = array('all', 'wait', 'doing', 'suspended', 'closed', 'involved', 'bySearch', 'review');
|
||||
$productID = 1;
|
||||
$branchID = 0;
|
||||
$withTasksList = array(false, true);
|
||||
$param = 'skipParent';
|
||||
|
||||
$execution = new executionTest();
|
||||
|
||||
r($execution->getStatDataTest()) && p() && e('0'); // 测试默认值
|
||||
r($execution->getStatDataTest($projectIdList[0])) && p() && e('0'); // 测试传入空值
|
||||
r($execution->getStatDataTest($projectIdList[1])) && p() && e('0'); // 测试projectID为1的所有未关闭执行
|
||||
r($execution->getStatDataTest($projectIdList[1], $browseTypeList[0])) && p() && e('0'); // 测试projectID为1的所有执行
|
||||
r($execution->getStatDataTest($projectIdList[1], $browseTypeList[1])) && p() && e('0'); // 测试projectID为1的未开始执行
|
||||
r($execution->getStatDataTest($projectIdList[1], $browseTypeList[2])) && p() && e('0'); // 测试projectID为1的进行中执行
|
||||
r($execution->getStatDataTest($projectIdList[1], $browseTypeList[3])) && p() && e('0'); // 测试projectID为1的已挂起执行
|
||||
r($execution->getStatDataTest($projectIdList[1], $browseTypeList[4])) && p() && e('0'); // 测试projectID为1的已关闭执行
|
||||
r($execution->getStatDataTest($projectIdList[1], $browseTypeList[5])) && p() && e('0'); // 测试projectID为1的我参与执行
|
||||
r($execution->getStatDataTest($projectIdList[1], $browseTypeList[6])) && p() && e('0'); // 测试projectID为1的搜索出来的执行
|
||||
r($execution->getStatDataTest($projectIdList[1], $browseTypeList[7])) && p() && e('0'); // 测试projectID为1的评审执行
|
||||
r($execution->getStatDataTest($projectIdList[1], $browseTypeList[0], $productID, $branchID)) && p() && e('0'); // 测试projectID为1, productID为1, branchID为0的所有执行
|
||||
r($execution->getStatDataTest($projectIdList[1], $browseTypeList[0], $productID, $branchID), $withTasksList[1]) && p() && e('0'); // 测试projectID为1, productID为1, branchID为0的所有执行和任务
|
||||
r($execution->getStatDataTest($projectIdList[1], $browseTypeList[0], $productID, $branchID), $withTasksList[0], $param) && p() && e('0'); // 测试projectID为1, productID为1, branchID为0的非父阶段
|
||||
r($execution->getStatDataTest($projectIdList[2])) && p() && e('7'); // 测试projectID为11的所有未关闭执行
|
||||
r($execution->getStatDataTest($projectIdList[2], $browseTypeList[0])) && p() && e('7'); // 测试projectID为11的所有执行
|
||||
r($execution->getStatDataTest($projectIdList[2], $browseTypeList[1])) && p() && e('7'); // 测试projectID为11的未开始执行
|
||||
r($execution->getStatDataTest($projectIdList[2], $browseTypeList[2])) && p() && e('7'); // 测试projectID为11的进行中执行
|
||||
r($execution->getStatDataTest($projectIdList[2], $browseTypeList[3])) && p() && e('7'); // 测试projectID为11的已挂起执行
|
||||
r($execution->getStatDataTest($projectIdList[2], $browseTypeList[4])) && p() && e('7'); // 测试projectID为11的已关闭执行
|
||||
r($execution->getStatDataTest($projectIdList[2], $browseTypeList[5])) && p() && e('7'); // 测试projectID为11的我参与执行
|
||||
r($execution->getStatDataTest($projectIdList[2], $browseTypeList[6])) && p() && e('7'); // 测试projectID为11的搜索出来的执行
|
||||
r($execution->getStatDataTest($projectIdList[2], $browseTypeList[7])) && p() && e('7'); // 测试projectID为11的评审执行
|
||||
r($execution->getStatDataTest($projectIdList[2], $browseTypeList[0], $productID, $branchID)) && p() && e('7'); // 测试projectID为11, productID为1, branchID为0的所有执行
|
||||
r($execution->getStatDataTest($projectIdList[2], $browseTypeList[0], $productID, $branchID), $withTasksList[1]) && p() && e('7'); // 测试projectID为11, productID为1, branchID为0的所有执行和任务
|
||||
r($execution->getStatDataTest($projectIdList[2], $browseTypeList[0], $productID, $branchID), $withTasksList[0], $param) && p() && e('7'); // 测试projectID为11, productID为1, branchID为0的非父阶段
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/execution.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 executionModel->getTaskGroupByExecution();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
获取所有受限制的执行ID >> 1
|
||||
|
||||
*/
|
||||
|
||||
|
||||
$executionIdList = array(0, 1, 101, 131, 161);
|
||||
|
||||
$execution = new executionTest();
|
||||
|
||||
r($execution->getTaskGroupByExecutionTest()) && p() && e('0'); // 测试空数据
|
||||
r($execution->getTaskGroupByExecutionTest($executionIdList)) && p() && e('3'); // 测试获取执行的任务
|
||||
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/execution.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试executionModel->saveKanbanData();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
保存执行162看板数据 >> 246
|
||||
保存执行162看板空数据 >> empty
|
||||
|
||||
*/
|
||||
|
||||
$execution = new executionTest();
|
||||
|
||||
$executionID = 162;
|
||||
$emptyData = array();
|
||||
|
||||
r($execution->saveKanbanDataTest($executionID)) && p('story:0') && e('246'); //保存执行162看板数据
|
||||
r($execution->saveKanbanDataTest($executionID, $emptyData)) && p('') && e('empty'); //保存执行162看板空数据
|
||||
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/execution.class.php';
|
||||
$db->switchDB();
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试executionModel->updateUserView();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
默认情况下的用户是否有201权限 >> 400
|
||||
删除执行201后dev1用户是否有201权限 >> 0
|
||||
|
||||
*/
|
||||
|
||||
$executionID = 201;
|
||||
|
||||
$execution = new executionTest();
|
||||
r(strpos($execution->updateUserViewTest($executionID), '201,')) && p() && e('400'); // 默认情况下的用户是否有201权限
|
||||
$tester->dao->update(TABLE_EXECUTION)->set('deleted')->eq(1)->where('id')->eq($executionID)->exec();
|
||||
r(strpos($execution->updateUserViewTest($executionID, 'sprint', array('dev1')), '201,')) && p() && e('0'); // 删除执行201后dev1用户是否有201权限
|
||||
$db->restoreDB();
|
||||
@@ -10,12 +10,12 @@ title=测试 myModel->getActions();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
正常查询action >> 32,,32,,这是一个系统日志测试备注32
|
||||
正常查询action统计 >> 5
|
||||
正常查询action >> 0
|
||||
正常查询action统计 >> 0
|
||||
|
||||
*/
|
||||
|
||||
$my = new myTest();
|
||||
|
||||
r($my->getActionsTest()) && p('0:id,product,comment') && e('32,,32,,这是一个系统日志测试备注32');// 正常查询action
|
||||
r(count($my->getActionsTest())) && p() && e('5'); // 正常查询action统计
|
||||
r($my->getActionsTest()) && p() && e('0'); // 正常查询action
|
||||
r(count($my->getActionsTest())) && p() && e('0'); // 正常查询action统计
|
||||
@@ -13,7 +13,7 @@ pid=1
|
||||
|
||||
当插入一条action为admin指派了task的动态时,查询结果为1条数据 >> 1
|
||||
当插入一条action为admin指派了bug的动态时,查询结果为1条数据 >> 1
|
||||
当插入一条action为admin指派了需求的动态时,查询结果为1条数据 >> 1
|
||||
当插入一条action为admin指派了需求的动态时,查询结果为0条数据 >> 0
|
||||
|
||||
*/
|
||||
|
||||
@@ -24,6 +24,6 @@ $story = array('admin', 0, '', 'id_desc', 0, 'story');
|
||||
|
||||
r($my->getAssignedByMeTest($task[0], $task[1], $task[2], $task[3], $task[4], $task[5])) && p() && e('1'); // 当插入一条action为admin指派了task的动态时,查询结果为1条数据
|
||||
r($my->getAssignedByMeTest($bug[0], $bug[1], $bug[2], $bug[3], $bug[4], $bug[5])) && p() && e('1'); // 当插入一条action为admin指派了bug的动态时,查询结果为1条数据
|
||||
r($my->getAssignedByMeTest($story[0], $story[1], $story[2], $story[3], $story[4], $story[5])) && p() && e('1'); // 当插入一条action为admin指派了需求的动态时,查询结果为1条数据
|
||||
r($my->getAssignedByMeTest($story[0], $story[1], $story[2], $story[3], $story[4], $story[5])) && p() && e('0'); // 当插入一条action为admin指派了需求的动态时,查询结果为0条数据
|
||||
|
||||
$db->restoreDB();
|
||||
@@ -18,6 +18,6 @@ $my = new myTest();
|
||||
$account = 'admin';
|
||||
$limit = 1;
|
||||
|
||||
$task = $my->getTasksBySearchTest($account[0], $limit);
|
||||
$task = $my->getTasksBySearchTest($account, $limit);
|
||||
|
||||
r($task) && p('913:name,status') && e('批量任务三,wait');//获取task状态的项目
|
||||
@@ -27,4 +27,4 @@ $cases2 = $my->getTestcasesBySearchTest(0, $type[1], $order);
|
||||
r($cases1) && p('560:title,status') && e('com.ngtesting.autotest.test.TestLogin账号过期,normal');//获取testcase状态的项目
|
||||
r(count($cases1)) && p() && e('20'); //获取testcase的统计
|
||||
r($cases2) && p('439:title,status') && e('com.ngtesting.autotest.test.TestLogin密码错误,normal');//获取testcase状态的项目
|
||||
r(count($cases2)) && p() && e('18'); //获取testcase的统计
|
||||
r(count($cases2)) && p() && e('18'); //获取testcase的统计
|
||||
@@ -20,7 +20,7 @@ $user = new userTest();
|
||||
$normalUser = array();
|
||||
$normalUser['account'] = array(1 => 'newtestuser1', 2 => 'newtestuser2', 3 => 'newtestuser3');
|
||||
$normalUser['realname'] = array(1 => '新测试用户1', 2 => '新测试用户2', 3 => '新测试用户3');
|
||||
$normalUser['visions'] = array(1 => 'rnd', 2 => 'rnd,lite', 3 => 'lite');
|
||||
$normalUser['visions'] = array(1 => array('rnd'), 2 => array('rnd','lite'), 3 => array('lite'));
|
||||
$normalUser['role'] = array(1 => 'qa', 2 => 'dev', 3 => 'pm');
|
||||
$normalUser['email'] = array(1 => 'testasd@163.com', 2 => '', 3 => '11773@qq.com');
|
||||
$normalUser['password'] = array(1 => 'e10adc3949ba59abbe56e057f20f883e', 2 => 'e10adc3949ba59abbe56e057f20f883e', 3 => 'e10adc3949ba59abbe56e057f20f883e');
|
||||
|
||||
Regular → Executable
+10
-10
@@ -10,11 +10,11 @@ title=测试 weeklyModel->getAC();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
测试project值为0,date值为2022-05-01 >> 4191
|
||||
测试project值为0,date值为空 >> 4191
|
||||
测试project值为11,date值为2022-05-01 >> 21
|
||||
测试project值为11,date值为空 >> 21
|
||||
测试project值为41,date值为2022-05-01 >> 42
|
||||
测试project值为0,date值为2022-05-01 >> 0
|
||||
测试project值为0,date值为空 >> 4209
|
||||
测试project值为11,date值为2022-05-01 >> 0
|
||||
测试project值为11,date值为空 >> 39
|
||||
测试project值为41,date值为2022-05-01 >> 0
|
||||
测试project值为41,date值为空 >> 42
|
||||
|
||||
*/
|
||||
@@ -23,9 +23,9 @@ $dateList = array('2022-05-01', '');
|
||||
|
||||
$weekly = new weeklyTest();
|
||||
|
||||
r($weekly->getACTest($projectList[0], $dateList[0])) && p() && e('4191'); //测试project值为0,date值为2022-05-01
|
||||
r($weekly->getACTest($projectList[0], $dateList[1])) && p() && e('4191'); //测试project值为0,date值为空
|
||||
r($weekly->getACTest($projectList[1], $dateList[0])) && p() && e('21'); //测试project值为11,date值为2022-05-01
|
||||
r($weekly->getACTest($projectList[1], $dateList[1])) && p() && e('21'); //测试project值为11,date值为空
|
||||
r($weekly->getACTest($projectList[2], $dateList[0])) && p() && e('42'); //测试project值为41,date值为2022-05-01
|
||||
r($weekly->getACTest($projectList[0], $dateList[0])) && p() && e('0'); //测试project值为0,date值为2022-05-01
|
||||
r($weekly->getACTest($projectList[0], $dateList[1])) && p() && e('4209'); //测试project值为0,date值为空
|
||||
r($weekly->getACTest($projectList[1], $dateList[0])) && p() && e('0'); //测试project值为11,date值为2022-05-01
|
||||
r($weekly->getACTest($projectList[1], $dateList[1])) && p() && e('39'); //测试project值为11,date值为空
|
||||
r($weekly->getACTest($projectList[2], $dateList[0])) && p() && e('0'); //测试project值为41,date值为2022-05-01
|
||||
r($weekly->getACTest($projectList[2], $dateList[1])) && p() && e('42'); //测试project值为41,date值为空
|
||||
@@ -10,10 +10,10 @@ title=测试 weeklyModel->getEV();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
测试projectID值为0,date值为2022-05-01 >> 771.55
|
||||
测试projectID值为0,date值为空 >> 2342.78
|
||||
测试projectID值为11,date值为2022-05-01 >> 15.3
|
||||
测试projectID值为11,date值为空 >> 54.18
|
||||
测试projectID值为0,date值为2022-05-01 >> 768.75
|
||||
测试projectID值为0,date值为空 >> 2347.38
|
||||
测试projectID值为11,date值为2022-05-01 >> 12.5
|
||||
测试projectID值为11,date值为空 >> 53.63
|
||||
测试projectID值为41,date值为2022-05-01 >> 6.91
|
||||
测试projectID值为41,date值为空 >> 19.87
|
||||
|
||||
@@ -23,9 +23,9 @@ $dateList = array('2022-05-01', '');
|
||||
|
||||
$weekly = new weeklyTest();
|
||||
|
||||
r($weekly->getEVTest($projectIDList[0], $dateList[0])) && p() && e('771.55'); //测试projectID值为0,date值为2022-05-01
|
||||
r($weekly->getEVTest($projectIDList[0], $dateList[1])) && p() && e('2342.78'); //测试projectID值为0,date值为空
|
||||
r($weekly->getEVTest($projectIDList[1], $dateList[0])) && p() && e('15.3'); //测试projectID值为11,date值为2022-05-01
|
||||
r($weekly->getEVTest($projectIDList[1], $dateList[1])) && p() && e('54.18'); //测试projectID值为11,date值为空
|
||||
r($weekly->getEVTest($projectIDList[0], $dateList[0])) && p() && e('768.75'); //测试projectID值为0,date值为2022-05-01
|
||||
r($weekly->getEVTest($projectIDList[0], $dateList[1])) && p() && e('2347.38'); //测试projectID值为0,date值为空
|
||||
r($weekly->getEVTest($projectIDList[1], $dateList[0])) && p() && e('12.5'); //测试projectID值为11,date值为2022-05-01
|
||||
r($weekly->getEVTest($projectIDList[1], $dateList[1])) && p() && e('53.63'); //测试projectID值为11,date值为空
|
||||
r($weekly->getEVTest($projectIDList[2], $dateList[0])) && p() && e('6.91'); //测试projectID值为41,date值为2022-05-01
|
||||
r($weekly->getEVTest($projectIDList[2], $dateList[1])) && p() && e('19.87'); //测试projectID值为41,date值为空
|
||||
@@ -10,16 +10,15 @@ title=测试 weeklyModel->getLastDay();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
查询日期为星期日 >> 2022-05-07
|
||||
查询日期为其他 >> 2022-05-01
|
||||
查询日期为空 >> 2022-05-10
|
||||
查询日期为星期日 >> 2022-05-06
|
||||
查询日期为其他 >> 2022-04-29
|
||||
查询日期为空 >> 2022-08-29
|
||||
|
||||
*/
|
||||
|
||||
$date = array('2022-05-08', '2022-04-29', '');
|
||||
|
||||
$weekly = new weeklyTest();
|
||||
|
||||
r($weekly->getLastDayTest($date[0])) && p() && e('2022-05-07'); //查询日期为星期日
|
||||
r($weekly->getLastDayTest($date[1])) && p() && e('2022-05-01'); //查询日期为其他
|
||||
r($weekly->getLastDayTest($date[2])) && p() && e('2022-05-10'); //查询日期为空
|
||||
r($weekly->getLastDayTest($date[0])) && p() && e('2022-05-06'); //查询日期为星期日
|
||||
r($weekly->getLastDayTest($date[1])) && p() && e('2022-04-29'); //查询日期为其他
|
||||
r($weekly->getLastDayTest($date[2])) && p() && e('2022-08-29'); //查询日期为空
|
||||
@@ -1,4 +1,4 @@
|
||||
usr/bin/env php
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/weekly.class.php';
|
||||
@@ -24,8 +24,8 @@ $productID = array('19', '13', '17', '18');
|
||||
$date = array('2022-05-07', '');
|
||||
|
||||
$weekly = new weeklyTest();
|
||||
r($weekly->getPageNavTest($productID[0], $date[0])) && p() && e('周报-项目9'); //查询项目为未开始,日期为当天的数据
|
||||
r($weekly->getPageNavTest($productID[0], $date[1])) && p() && e('周报-项目9'); //查询项目为未开始,日期为一周前的数据
|
||||
r($weekly->getPageNavTest($productID[0], $date[0])) && p() && e('周报-项目9'); //查询项目为未开始,日期为当天的数据
|
||||
r($weekly->getPageNavTest($productID[0], $date[1])) && p() && e('周报-项目9'); //查询项目为未开始,日期为一周前的数据
|
||||
r($weekly->getPageNavTest($productID[1], $date[0])) && p() && e('周报-项目3'); //查询项目为进行中,日期为当天的数据
|
||||
r($weekly->getPageNavTest($productID[1], $date[1])) && p() && e('周报-项目3'); //查询项目为进行中,日期为一周前的数据
|
||||
r($weekly->getPageNavTest($productID[2], $date[0])) && p() && e('周报-项目7'); //查询项目为已挂起,日期为当天的数据
|
||||
|
||||
@@ -11,11 +11,11 @@ cid=1
|
||||
pid=1
|
||||
|
||||
测试project值为0,date值为2022-05-01 >> 子任务5
|
||||
测试project值为0,date值为空 >> 开发任务610
|
||||
测试project值为0,date值为空 >> 0
|
||||
测试project值为1,date值为2022-05-01 >> 0
|
||||
测试project值为1,date值为空 >> 0
|
||||
测试project值为11,date值为2022-05-01 >> 开发任务11
|
||||
测试project值为11,date值为空 >> 开发任务11
|
||||
测试project值为11,date值为空 >> 0
|
||||
|
||||
*/
|
||||
$projectList = array(0, 1, 11);
|
||||
@@ -24,8 +24,8 @@ $dateList = array('2022-05-01', '');
|
||||
$weekly = new weeklyTest();
|
||||
|
||||
r($weekly->getPlanedTaskByWeekTest($projectList[0], $dateList[0])) && p('905:name') && e('子任务5'); //测试project值为0,date值为2022-05-01
|
||||
r($weekly->getPlanedTaskByWeekTest($projectList[0], $dateList[1])) && p('600:name') && e('开发任务610'); //测试project值为0,date值为空
|
||||
r($weekly->getPlanedTaskByWeekTest($projectList[1], $dateList[0])) && p() && e('0'); //测试project值为1,date值为2022-05-01
|
||||
r($weekly->getPlanedTaskByWeekTest($projectList[1], $dateList[1])) && p() && e('0'); //测试project值为1,date值为空
|
||||
r($weekly->getPlanedTaskByWeekTest($projectList[0], $dateList[1])) && p('600:name') && e('0'); //测试project值为0,date值为空
|
||||
r($weekly->getPlanedTaskByWeekTest($projectList[1], $dateList[0])) && p() && e('0'); //测试project值为1,date值为2022-05-01
|
||||
r($weekly->getPlanedTaskByWeekTest($projectList[1], $dateList[1])) && p() && e('0'); //测试project值为1,date值为空
|
||||
r($weekly->getPlanedTaskByWeekTest($projectList[2], $dateList[0])) && p('1:name') && e('开发任务11'); //测试project值为11,date值为2022-05-01
|
||||
r($weekly->getPlanedTaskByWeekTest($projectList[2], $dateList[1])) && p('1:name') && e('开发任务11'); //测试project值为11,date值为空
|
||||
r($weekly->getPlanedTaskByWeekTest($projectList[2], $dateList[1])) && p('1:name') && e('0'); //测试project值为11,date值为空
|
||||
@@ -10,22 +10,22 @@ title=测试 weeklyModel->getPostponed();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
测试project值为0,date值为2022-05-01 >> 子任务4
|
||||
测试project值为0,date值为空 >> 开发任务608
|
||||
测试project值为1,date值为2022-05-01 >> 0
|
||||
测试project值为0,date值为2022-07-30 >> 更多任务202
|
||||
测试project值为0,date值为空 >> 0
|
||||
测试project值为1,date值为2022-07-30 >> 0
|
||||
测试project值为1,date值为空 >> 0
|
||||
测试project值为11,date值为2022-05-01 >> 开发任务101
|
||||
测试project值为11,date值为空 >> 开发任务461
|
||||
测试project值为11,date值为2022-07-30 >> 更多任务272
|
||||
测试project值为11,date值为空 >> 0
|
||||
|
||||
*/
|
||||
$projectList = array(0, 1, 11);
|
||||
$dateList = array('2022-05-01', '');
|
||||
$dateList = array('2022-07-30', '');
|
||||
|
||||
$weekly = new weeklyTest();
|
||||
|
||||
r($weekly->getPostponedTest($projectList[0], $dateList[0])) && p('92:name') && e('子任务4'); //测试project值为0,date值为2022-05-01
|
||||
r($weekly->getPostponedTest($projectList[0], $dateList[1])) && p('56:name') && e('开发任务608'); //测试project值为0,date值为空
|
||||
r($weekly->getPostponedTest($projectList[1], $dateList[0])) && p() && e('0'); //测试project值为1,date值为2022-05-01
|
||||
r($weekly->getPostponedTest($projectList[0], $dateList[0])) && p('92:name') && e('更多任务202'); //测试project值为0,date值为2022-07-30
|
||||
r($weekly->getPostponedTest($projectList[0], $dateList[1])) && p('56:name') && e('0'); //测试project值为0,date值为空
|
||||
r($weekly->getPostponedTest($projectList[1], $dateList[0])) && p() && e('0'); //测试project值为1,date值为2022-07-30
|
||||
r($weekly->getPostponedTest($projectList[1], $dateList[1])) && p() && e('0'); //测试project值为1,date值为空
|
||||
r($weekly->getPostponedTest($projectList[2], $dateList[0])) && p('5:name') && e('开发任务101'); //测试project值为11,date值为2022-05-01
|
||||
r($weekly->getPostponedTest($projectList[2], $dateList[1])) && p('1:name') && e('开发任务461'); //测试project值为11,date值为空
|
||||
r($weekly->getPostponedTest($projectList[2], $dateList[0])) && p('2:name') && e('更多任务272'); //测试project值为11,date值为2022-07-30
|
||||
r($weekly->getPostponedTest($projectList[2], $dateList[1])) && p('1:name') && e('0'); //测试project值为11,date值为空
|
||||
@@ -10,23 +10,22 @@ title=测试 weeklyModel->getTasksOfNextWeek();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
测试project值为0,date值为2022-05-01 >> 子任务10
|
||||
测试project值为0,date值为空 >> 开发任务606
|
||||
测试project值为1,date值为2022-05-01 >> 0
|
||||
测试project值为0,date值为2022-07-30 >> 子任务6
|
||||
测试project值为0,date值为空 >> 0
|
||||
测试project值为1,date值为2022-07-30 >> 0
|
||||
测试project值为1,date值为空 >> 0
|
||||
测试project值为11,date值为2022-05-01 >> 开发任务551
|
||||
测试project值为11,date值为空 >> 开发任务11
|
||||
测试project值为11,date值为2022-07-30 >> 开发任务371
|
||||
测试project值为11,date值为空 >> 0
|
||||
|
||||
*/
|
||||
|
||||
$projectList = array(0, 1, 11);
|
||||
$dateList = array('2022-05-01', '');
|
||||
$dateList = array('2022-07-30', '');
|
||||
|
||||
$weekly = new weeklyTest();
|
||||
|
||||
r($weekly->getTasksOfNextWeekTest($projectList[0], $dateList[0])) && p('910:name') && e('子任务10'); //测试project值为0,date值为2022-05-01
|
||||
r($weekly->getTasksOfNextWeekTest($projectList[0], $dateList[1])) && p('596:name') && e('开发任务606'); //测试project值为0,date值为空
|
||||
r($weekly->getTasksOfNextWeekTest($projectList[1], $dateList[0])) && p() && e('0'); //测试project值为1,date值为2022-05-01
|
||||
r($weekly->getTasksOfNextWeekTest($projectList[1], $dateList[1])) && p() && e('0'); //测试project值为1,date值为空
|
||||
r($weekly->getTasksOfNextWeekTest($projectList[2], $dateList[0])) && p('541:name') && e('开发任务551'); //测试project值为11,date值为2022-05-01
|
||||
r($weekly->getTasksOfNextWeekTest($projectList[2], $dateList[1])) && p('1:name') && e('开发任务11'); //测试project值为11,date值为空
|
||||
r($weekly->getTasksOfNextWeekTest($projectList[0], $dateList[0])) && p('906:name') && e('子任务6'); //测试project值为0,date值为2022-07-30
|
||||
r($weekly->getTasksOfNextWeekTest($projectList[0], $dateList[1])) && p() && e('0'); //测试project值为0,date值为空
|
||||
r($weekly->getTasksOfNextWeekTest($projectList[1], $dateList[0])) && p() && e('0'); //测试project值为1,date值为2022-07-30
|
||||
r($weekly->getTasksOfNextWeekTest($projectList[1], $dateList[1])) && p() && e('0'); //测试project值为1,date值为空
|
||||
r($weekly->getTasksOfNextWeekTest($projectList[2], $dateList[0])) && p('361:name') && e('开发任务371'); //测试project值为11,date值为2022-07-30
|
||||
r($weekly->getTasksOfNextWeekTest($projectList[2], $dateList[1])) && p() && e('0'); //测试project值为11,date值为空
|
||||
@@ -12,13 +12,13 @@ pid=1
|
||||
|
||||
查询日期为星期日 >> 2022-05-02
|
||||
查询日期为其他 >> 2022-04-25
|
||||
查询日期为空 >> 2022-05-04
|
||||
查询日期为空 >> 2022-03-21
|
||||
|
||||
*/
|
||||
$date = array('2022-05-08', '2022-04-29', '');
|
||||
$date = array('2022-05-08', '2022-04-29', '2022-03-25');
|
||||
|
||||
$weekly = new weeklyTest();
|
||||
|
||||
r($weekly->getThisMondayTest($date[0])) && p() && e('2022-05-02'); //查询日期为星期日
|
||||
r($weekly->getThisMondayTest($date[1])) && p() && e('2022-04-25'); //查询日期为其他
|
||||
r($weekly->getThisMondayTest($date[2])) && p() && e('2022-05-04'); //查询日期为空
|
||||
r($weekly->getThisMondayTest($date[2])) && p() && e('2022-03-21'); //查询日期为空
|
||||
@@ -12,13 +12,13 @@ pid=1
|
||||
|
||||
查询日期为星期日 >> 2022-05-08
|
||||
查询日期为其他 >> 2022-05-01
|
||||
查询日期为空 >> 2022-05-10
|
||||
查询日期为空 >> 2022-03-06
|
||||
|
||||
*/
|
||||
$date = array('2022-05-08', '2022-04-29', '');
|
||||
$date = array('2022-05-08', '2022-04-29', '2022-03-01');
|
||||
|
||||
$weekly = new weeklyTest();
|
||||
|
||||
r($weekly->getThisSundayTest($date[0])) && p() && e('2022-05-08'); //查询日期为星期日
|
||||
r($weekly->getThisSundayTest($date[1])) && p() && e('2022-05-01'); //查询日期为其他
|
||||
r($weekly->getThisSundayTest($date[2])) && p() && e('2022-05-10'); //查询日期为空
|
||||
r($weekly->getThisSundayTest($date[2])) && p() && e('2022-03-06'); //查询日期为空
|
||||
@@ -10,9 +10,9 @@ title=测试 weeklyModel->getWorkloadByType();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
测试project值为0 >> 574.00,568.00,563.00,556.00,557.00,571.00,563.00,566.00
|
||||
测试project值为0 >> 577.00,568.00,563.00,556.00,557.00,571.00,563.00,566.00
|
||||
测试project值为1 >> 0
|
||||
测试project值为11 >> 24.00,11.00,16.00,3.00,9.00,5.00,18.00,14.00
|
||||
测试project值为11 >> 27.00,11.00,16.00,3.00,9.00,5.00,18.00,14.00
|
||||
测试project值为41 >> 13.00,12.00,3.00,7.00
|
||||
|
||||
*/
|
||||
@@ -20,7 +20,7 @@ $projectList = array(0, 1, 11, 41);
|
||||
|
||||
$weekly = new weeklyTest();
|
||||
|
||||
r($weekly->getWorkloadByTypeTest($projectList[0])) && p('design,devel,test,study,discuss,ui,affair,misc') && e('574.00,568.00,563.00,556.00,557.00,571.00,563.00,566.00'); //测试project值为0
|
||||
r($weekly->getWorkloadByTypeTest($projectList[0])) && p('design,devel,test,study,discuss,ui,affair,misc') && e('577.00,568.00,563.00,556.00,557.00,571.00,563.00,566.00'); //测试project值为0
|
||||
r($weekly->getWorkloadByTypeTest($projectList[1])) && p() && e('0'); //测试project值为1
|
||||
r($weekly->getWorkloadByTypeTest($projectList[2])) && p('design,devel,test,study,discuss,ui,affair,misc') && e('24.00,11.00,16.00,3.00,9.00,5.00,18.00,14.00'); //测试project值为11
|
||||
r($weekly->getWorkloadByTypeTest($projectList[2])) && p('design,devel,test,study,discuss,ui,affair,misc') && e('27.00,11.00,16.00,3.00,9.00,5.00,18.00,14.00'); //测试project值为11
|
||||
r($weekly->getWorkloadByTypeTest($projectList[3])) && p('affair,test,study,discuss') && e('13.00,12.00,3.00,7.00'); //测试project值为41
|
||||
@@ -181,12 +181,18 @@ switch($argv[1])
|
||||
case 'user':
|
||||
ztfRun('model/user');
|
||||
break;
|
||||
case 'weekly':
|
||||
ztfRun('model/weekly');
|
||||
break;
|
||||
case 'gitlab':
|
||||
ztfRun('model/gitlab');
|
||||
break;
|
||||
case 'gitea':
|
||||
ztfRun('model/gitea');
|
||||
break;
|
||||
case 'webhook':
|
||||
ztfRun('model/webhook');
|
||||
break;
|
||||
|
||||
default:
|
||||
ztfExtract($argv[1]);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user