Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms
This commit is contained in:
@@ -78,3 +78,9 @@ ALTER TABLE `zt_action` MODIFY COLUMN `product` text NOT NULL;
|
||||
ALTER TABLE `zt_effort` MODIFY COLUMN `product` text NOT NULL;
|
||||
ALTER TABLE `zt_stakeholder` ADD INDEX objectID(`objectID`);
|
||||
UPDATE `zt_api` SET response = REPLACE(response, 'assgnedDate', 'assignedDate');
|
||||
|
||||
REPLACE INTO `zt_zoutput` (`id`, `activity`, `name`, `content`, `optional`, `status`, `createdBy`, `createdDate`, `editedBy`, `order`, `deleted`) VALUES
|
||||
(71,47,'禅道缺陷记录','','','','admin','2020-01-09 14:22:52','',355,'0'),
|
||||
(78,52,'禅道缺陷记录','','','','admin','2020-01-09 14:22:52','',390,'0'),
|
||||
(89,58,'禅道缺陷跟踪系统记录项','','yes','','admin','2020-01-09 14:25:16','',445,'0'),
|
||||
(99,64,'禅道缺陷记录项','','yes','','admin','2020-01-09 14:26:52','',495,'0');
|
||||
|
||||
+4
-4
@@ -13058,14 +13058,14 @@ REPLACE INTO `zt_zoutput` (`id`, `activity`, `name`, `content`, `optional`, `sta
|
||||
(68,44,'模块代码','','','','admin','2020-01-09 14:22:52','','0000-00-00 00:00:00',340,'0'),
|
||||
(69,45,'《代码质量检查记录单》','','','','admin','2020-01-09 14:22:52','','0000-00-00 00:00:00',345,'0'),
|
||||
(70,46,'《单元测试缺陷统计分析报告》','','','','admin','2020-01-09 14:22:52','','0000-00-00 00:00:00',350,'0'),
|
||||
(71,47,'bugzilla缺陷记录','','','','admin','2020-01-09 14:22:52','','0000-00-00 00:00:00',355,'0'),
|
||||
(71,47,'禅道缺陷记录','','','','admin','2020-01-09 14:22:52','','0000-00-00 00:00:00',355,'0'),
|
||||
(72,48,'《系统集成说明书》','','','','admin','2020-01-09 14:22:52','','0000-00-00 00:00:00',360,'0'),
|
||||
(73,49,'《集成测试用例》','','','','admin','2020-01-09 14:22:52','','0000-00-00 00:00:00',365,'0'),
|
||||
(74,50,'《评审通知》 ','','','','admin','2020-01-09 14:22:52','','0000-00-00 00:00:00',370,'0'),
|
||||
(75,50,'《同行评审准备表》 ','','','','admin','2020-01-09 14:22:52','','0000-00-00 00:00:00',375,'0'),
|
||||
(76,50,'《同行评审报告》','','','','admin','2020-01-09 14:22:52','','0000-00-00 00:00:00',380,'0'),
|
||||
(77,51,'《集成测试报告》','','','','admin','2020-01-09 14:22:52','','0000-00-00 00:00:00',385,'0'),
|
||||
(78,52,'bugzilla缺陷记录','','','','admin','2020-01-09 14:22:52','','0000-00-00 00:00:00',390,'0'),
|
||||
(78,52,'禅道缺陷记录','','','','admin','2020-01-09 14:22:52','','0000-00-00 00:00:00',390,'0'),
|
||||
(79,52,'《用户操作手册》 ','','','','admin','2020-01-09 14:22:52','','0000-00-00 00:00:00',395,'0'),
|
||||
(80,52,'《安装手册》','','','','admin','2020-01-09 14:22:52','','0000-00-00 00:00:00',400,'0'),
|
||||
(81,54,'《系统测试计划》','','yes','','admin','2020-01-09 14:25:16','','0000-00-00 00:00:00',405,'0'),
|
||||
@@ -13076,7 +13076,7 @@ REPLACE INTO `zt_zoutput` (`id`, `activity`, `name`, `content`, `optional`, `sta
|
||||
(86,57,'《评审通知》','','yes','','admin','2020-01-09 14:25:16','','0000-00-00 00:00:00',430,'0'),
|
||||
(87,57,'《同行评审准备表》','','yes','','admin','2020-01-09 14:25:16','','0000-00-00 00:00:00',435,'0'),
|
||||
(88,57,'《同行评审报告》','','yes','','admin','2020-01-09 14:25:16','','0000-00-00 00:00:00',440,'0'),
|
||||
(89,58,'bugzilla缺陷跟踪系统记录项','','yes','','admin','2020-01-09 14:25:16','','0000-00-00 00:00:00',445,'0'),
|
||||
(89,58,'禅道缺陷跟踪系统记录项','','yes','','admin','2020-01-09 14:25:16','','0000-00-00 00:00:00',445,'0'),
|
||||
(90,58,'《系统测试分析报告》','','yes','','admin','2020-01-09 14:25:16','','0000-00-00 00:00:00',450,'0'),
|
||||
(91,58,'《缺陷统计分析报告》','','yes','','admin','2020-01-09 14:25:16','','0000-00-00 00:00:00',455,'0'),
|
||||
(92,59,'《产品打包清单》','','yes','','admin','2020-01-09 14:25:16','','0000-00-00 00:00:00',460,'0'),
|
||||
@@ -13086,7 +13086,7 @@ REPLACE INTO `zt_zoutput` (`id`, `activity`, `name`, `content`, `optional`, `sta
|
||||
(96,62,'《工作记录单》','','yes','','admin','2020-01-09 14:26:52','','0000-00-00 00:00:00',480,'0'),
|
||||
(97,62,'《交接签收单》','','yes','','admin','2020-01-09 14:26:52','','0000-00-00 00:00:00',485,'0'),
|
||||
(98,62,'《安装调试信息》','','yes','','admin','2020-01-09 14:26:52','','0000-00-00 00:00:00',490,'0'),
|
||||
(99,64,'bugzilla缺陷记录项','','yes','','admin','2020-01-09 14:26:52','','0000-00-00 00:00:00',495,'0'),
|
||||
(99,64,'禅道缺陷记录项','','yes','','admin','2020-01-09 14:26:52','','0000-00-00 00:00:00',495,'0'),
|
||||
(100,64,'会议纪要等文档','','yes','','admin','2020-01-09 14:26:52','','0000-00-00 00:00:00',500,'0'),
|
||||
(101,65,'《交接验收单》','','yes','','admin','2020-01-09 14:26:52','','0000-00-00 00:00:00',505,'0'),
|
||||
(102,65,'《客户验收报告》','','yes','','admin','2020-01-09 14:26:52','','0000-00-00 00:00:00',510,'0'),
|
||||
|
||||
@@ -202,6 +202,8 @@ $lang->admin->menu->system['subMenu']->safe = array('link' => "$lang->sec
|
||||
$lang->admin->menu->system['subMenu']->cron = array('link' => "{$lang->admin->cron}|cron|index", 'subModule' => 'cron');
|
||||
$lang->admin->menu->system['subMenu']->timezone = array('link' => "$lang->timezone|custom|timezone");
|
||||
$lang->admin->menu->system['subMenu']->buildIndex = array('link' => "{$lang->admin->buildIndex}|search|buildindex|");
|
||||
|
||||
if($config->visions == ',lite,' and $config->edition != 'open') $lang->admin->menu->system['subMenu']->license = array('link' => "License|admin|license'", 'alias' => 'license');
|
||||
if($config->visions != ',lite,') unset($lang->admin->menu->system['subMenu']->buildIndex);
|
||||
|
||||
if($config->edition != 'open')
|
||||
|
||||
@@ -202,6 +202,8 @@ $lang->admin->menu->system['subMenu']->safe = array('link' => "$lang->sec
|
||||
$lang->admin->menu->system['subMenu']->cron = array('link' => "{$lang->admin->cron}|cron|index", 'subModule' => 'cron');
|
||||
$lang->admin->menu->system['subMenu']->timezone = array('link' => "$lang->timezone|custom|timezone");
|
||||
$lang->admin->menu->system['subMenu']->buildIndex = array('link' => "{$lang->admin->buildIndex}|search|buildindex|");
|
||||
|
||||
if($config->visions == ',lite,' and $config->edition != 'open') $lang->admin->menu->system['subMenu']->license = array('link' => "授权信息|admin|license'", 'alias' => 'license');
|
||||
if($config->visions != ',lite,') unset($lang->admin->menu->system['subMenu']->buildIndex);
|
||||
|
||||
if($config->edition != 'open')
|
||||
|
||||
@@ -20,6 +20,19 @@ helper::import(dirname(dirname(__FILE__)) . '/base/filter/filter.class.php');
|
||||
*/
|
||||
class validater extends baseValidater
|
||||
{
|
||||
/**
|
||||
* 检查文件名。
|
||||
* Check file name.
|
||||
*
|
||||
* @param string $var
|
||||
* @static
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public static function checkFileName($var)
|
||||
{
|
||||
return !preg_match('/>+|<+/', $var);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -753,7 +753,9 @@ class branchModel extends model
|
||||
->andWhere('product')->eq($productID)
|
||||
->fetchGroup('project');
|
||||
|
||||
$this->dao->delete()->from(TABLE_PROJECTPRODUCT)->where('branch')->in($mergedBranches . ",$targetBranch")->exec();
|
||||
$this->dao->delete()->from(TABLE_PROJECTPRODUCT)->where('branch')->in($mergedBranches . ",$targetBranch")
|
||||
->andWhere('product')->eq($productID)
|
||||
->exec();
|
||||
foreach($linkedProject as $projectID => $projectProducts)
|
||||
{
|
||||
$plan = 0;
|
||||
|
||||
Regular → Executable
+13
-5
@@ -69,7 +69,11 @@
|
||||
<th class='c-keywords<?php echo zget($visibleFields, 'keywords', ' hidden') . zget($requiredFields, 'keywords', '', ' required');?>'><?php echo $lang->bug->keywords;?></th>
|
||||
<?php
|
||||
$extendFields = $this->bug->getFlowExtendFields();
|
||||
foreach($extendFields as $extendField) echo "<th class='c-extend'>{$extendField->name}</th>";
|
||||
foreach($extendFields as $extendField)
|
||||
{
|
||||
$required = strpos(",$extendField->rules,", ',1,') !== false ? 'required' : '';
|
||||
echo "<th class='c-extend $required'>{$extendField->name}</th>";
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -125,11 +129,13 @@
|
||||
<td class='<?php echo zget($visibleFields, 'os', 'hidden')?>' style='overflow:visible'> <?php echo html::select("oses[$i]", $lang->bug->osList, $os, "class='form-control chosen'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'browser', 'hidden')?>' style='overflow:visible'> <?php echo html::select("browsers[$i]", $lang->bug->browserList, $browser, "class='form-control chosen'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'keywords', 'hidden')?>'><?php echo html::input("keywords[$i]", '', "class='form-control'");?></td>
|
||||
<?php foreach($extendFields as $extendField)
|
||||
<?php
|
||||
$this->loadModel('flow');
|
||||
foreach($extendFields as $extendField)
|
||||
{
|
||||
$object = new stdclass();
|
||||
$object->{$extendField->field} = $extendField->default;
|
||||
echo "<td" . (($extendField->control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->loadModel('flow')->getFieldControl($extendField, $object, $extendField->field . "[$i]") . "</td>";
|
||||
echo "<td" . (($extendField->control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->flow->getFieldControl($extendField, $object, $extendField->field . "[$i]") . "</td>";
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
@@ -179,11 +185,12 @@
|
||||
<td class='<?php echo zget($visibleFields, 'browser', 'hidden')?>' style='overflow:visible'> <?php echo html::select("browsers[$i]", $lang->bug->browserList, $browser, "class='form-control chosen'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'keywords', 'hidden')?>'><?php echo html::input("keywords[$i]", '', "class='form-control'");?></td>
|
||||
<?php
|
||||
$this->loadModel('flow');
|
||||
foreach($extendFields as $extendField)
|
||||
{
|
||||
$object = new stdclass();
|
||||
$object->{$extendField->field} = $extendField->default;
|
||||
echo "<td" . (($extendField->control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->loadModel('flow')->getFieldControl($extendField, '', $extendField->field . "[$i]") . "</td>";
|
||||
echo "<td" . (($extendField->control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->flow->getFieldControl($extendField, $object, $extendField->field . "[$i]") . "</td>";
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
@@ -232,11 +239,12 @@
|
||||
<td class='<?php echo zget($visibleFields, 'browser', 'hidden')?>' style='overflow:visible'> <?php echo html::select("browsers[%s]", $lang->bug->browserList, $browser, "class='form-control chosen'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'keywords', 'hidden')?>'><?php echo html::input("keywords[%s]", '', "class='form-control'");?></td>
|
||||
<?php
|
||||
$this->loadModel('flow');
|
||||
foreach($extendFields as $extendField)
|
||||
{
|
||||
$object = new stdclass();
|
||||
$object->{$extendField->field} = $extendField->default;
|
||||
echo "<td" . (($extendField->control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->loadModel('flow')->getFieldControl($extendField, '', $extendField->field . "[%s]") . "</td>";
|
||||
echo "<td" . (($extendField->control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->flow->getFieldControl($extendField, $object, $extendField->field . "[%s]") . "</td>";
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
|
||||
+17
-3
@@ -123,9 +123,15 @@ class commonModel extends model
|
||||
$projectID = $execution->project;
|
||||
$project = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($projectID)->fetch();
|
||||
|
||||
$today = helper::today();
|
||||
if($project->status == 'wait')
|
||||
{
|
||||
$this->dao->update(TABLE_PROJECT)->set('status')->eq('doing')->where('id')->eq($projectID)->exec();
|
||||
$this->dao->update(TABLE_PROJECT)
|
||||
->set('status')->eq('doing')
|
||||
->beginIf(helper::isZeroDate($project->realBegan))->set('realBegan')->eq($today)->fi()
|
||||
->where('id')->eq($projectID)
|
||||
->exec();
|
||||
|
||||
$this->loadModel('action')->create('project', $projectID, 'syncproject');
|
||||
}
|
||||
return $project;
|
||||
@@ -2245,9 +2251,17 @@ EOD;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(helper::isAjaxRequest()) die(json_encode(array('result' => false, 'message' => $this->lang->error->loginTimeout))); // Fix bug #14478.
|
||||
$uri = $this->app->getURI(true);
|
||||
if($module == 'message' and $method == 'ajaxgetmessage')
|
||||
{
|
||||
$uri = helper::createLink('my');
|
||||
}
|
||||
elseif(helper::isAjaxRequest())
|
||||
{
|
||||
die(json_encode(array('result' => false, 'message' => $this->lang->error->loginTimeout))); // Fix bug #14478.
|
||||
}
|
||||
|
||||
$referer = helper::safe64Encode($this->app->getURI(true));
|
||||
$referer = helper::safe64Encode($uri);
|
||||
print(js::locate(helper::createLink('user', 'login', "referer=$referer")));
|
||||
helper::end();
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ $lang->company->deleted = 'Deleted';
|
||||
|
||||
$lang->company->product = $lang->productCommon;
|
||||
$lang->company->project = 'Project';
|
||||
$lang->company->execution = 'Execution';
|
||||
$lang->company->execution = $lang->executionCommon;
|
||||
$lang->company->user = 'User';
|
||||
$lang->company->empty = 'No Dynamic';
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ $lang->company->deleted = '已删除';
|
||||
|
||||
$lang->company->product = $lang->productCommon;
|
||||
$lang->company->project = '项目';
|
||||
$lang->company->execution = '执行';
|
||||
$lang->company->execution = $lang->executionCommon;
|
||||
$lang->company->user = '用户';
|
||||
$lang->company->empty = '暂时没有动态';
|
||||
|
||||
|
||||
@@ -20,3 +20,4 @@
|
||||
.doc-fullscreen .fullscreen-btn > .icon-fullscreen:before {content: '\e972';}
|
||||
.right-icon a {color: #1183fb;}
|
||||
.cell th,td {word-break: break-word;}
|
||||
.main-actions {width: 100% !important;}
|
||||
|
||||
@@ -87,6 +87,8 @@ function fullScreen()
|
||||
whenFailEnterFullscreen(error);
|
||||
}
|
||||
}
|
||||
|
||||
$('.main-col iframe').css('min-height', $(window).height() + 'px');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -102,6 +104,7 @@ function exitFullScreen()
|
||||
$('#content .actions').removeClass('hidden');
|
||||
$('#content .file-image .right-icon').removeClass('hidden');
|
||||
$('#content .detail').eq(1).removeClass('hidden');
|
||||
$('.main-col iframe').css('min-height', '380px');
|
||||
$.cookie('isFullScreen', 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -457,12 +457,12 @@ class jobModel extends model
|
||||
|
||||
if($job->triggerType == 'tag')
|
||||
{
|
||||
$lastTag = $this->getLastTagByRepo($repo, $job);
|
||||
if($lastTag)
|
||||
$job->lastTag = $this->getLastTagByRepo($repo, $job);
|
||||
|
||||
if($job->lastTag)
|
||||
{
|
||||
$build->tag = $lastTag;
|
||||
$job->lastTag = $lastTag;
|
||||
$this->dao->update(TABLE_JOB)->set('lastTag')->eq($lastTag)->where('id')->eq($job->id)->exec();
|
||||
$build->tag = $job->lastTag;
|
||||
$this->dao->update(TABLE_JOB)->set('lastTag')->eq($job->lastTag)->where('id')->eq($job->id)->exec();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -422,11 +422,13 @@ class mr extends control
|
||||
}
|
||||
}
|
||||
|
||||
$this->view->repo = $this->loadModel('repo')->getRepoByID($MR->repoID);
|
||||
$this->view->repoID = $MR->repoID;
|
||||
$this->view->diffs = $diffs;
|
||||
$this->view->encoding = $encoding;
|
||||
$this->view->arrange = $arrange;
|
||||
$this->view->repo = $this->loadModel('repo')->getRepoByID($MR->repoID);
|
||||
$this->view->repoID = $MR->repoID;
|
||||
$this->view->diffs = $diffs;
|
||||
$this->view->encoding = $encoding;
|
||||
$this->view->arrange = $arrange;
|
||||
$this->view->sourceBranch = $MR->sourceBranch;
|
||||
$this->view->targetBranch = $MR->targetBranch;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -1177,7 +1177,6 @@ class mrModel extends model
|
||||
$bugInfo['content'] = $data->steps;
|
||||
$bugInfo['title'] = $data->title;
|
||||
$bugInfo['objectType'] = 'bug';
|
||||
$bugInfo['entry'] = $data->entry;
|
||||
return $bugInfo;
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,8 @@ if($repoExecution)
|
||||
}
|
||||
|
||||
$reviews = $this->mr->getReview($repoID, $MR->id);
|
||||
$v1 = isset($oldRevision) ? $oldRevision : 0;
|
||||
$v1 = str_replace('-', '*', $sourceBranch);
|
||||
$v2 = str_replace('-', '*', $targetBranch);
|
||||
|
||||
$this->loadModel('repo');
|
||||
|
||||
@@ -46,7 +47,7 @@ $taskModuleSelect = html::select('taskModule', $taskModules, $taskRepoModule,
|
||||
$taskUserSelect = html::select('taskAssignedTo', $taskMembers, '', 'class="form-control chosen"');
|
||||
$taskExecutionSelect = html::select('taskExecution', $taskExecutions, $repoExecution, 'class="form-control chosen" onchange="changeExecution(this)"');
|
||||
|
||||
$reviewUrl = $this->createLink('mr', 'addReview', "repoID=$repoID&mr={$MR->id}&v1=$v1&v2=");
|
||||
$reviewUrl = $this->createLink('mr', 'addReview', "repoID=$repoID&mr={$MR->id}&v1=$v1&v2=$v2");
|
||||
$productSelect = html::select('product', $products, $repoProduct, 'class="product form-control chosen" onchange="changeProduct(this)"');
|
||||
$branches = $this->loadModel('branch')->getPairs($repoProduct);
|
||||
$moduleSelect = html::select('module', $modules, $bugRepoModule, 'class="form-control chosen"');
|
||||
@@ -153,7 +154,6 @@ js::set('revision', '');
|
||||
<td colspan="3" class='form-actions'>
|
||||
<?php echo html::submitButton($lang->repo->submit, '', 'btn btn-wide btn-primary reviewSubmit');?>
|
||||
<?php echo html::commonButton($lang->cancel, "onclick='hiddenForm()'", 'btn btn-wide');?>
|
||||
<input type="hidden" id='entry' name="entry" value=""/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -857,7 +857,7 @@ EOF;
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->ncs = $ncList;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noclosed|noletter');
|
||||
$this->view->projects = $this->loadModel('project')->getPairsByProgram(0);
|
||||
$this->view->projects = $this->loadModel('project')->getPairsByProgram();
|
||||
$this->view->pager = $pager;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->mode = 'nc';
|
||||
|
||||
@@ -9,3 +9,4 @@ td.acl {white-space: nowrap;}
|
||||
.c-openedBy ,.c-acl ,.c-prs ,.c-common {width:110px !important;}
|
||||
.c-bugs ,.c-type {width:120px !important;}
|
||||
.c-release {padding-right: 20px !important;}
|
||||
.c-feedback {padding-right: 20px !important;}
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<div class="detail">
|
||||
<div class="detail pm-detail">
|
||||
<div class="detail-title"><strong><?php echo $lang->product->manager;?></strong></div>
|
||||
<div class="detail-content">
|
||||
<table class="table table-data">
|
||||
|
||||
@@ -200,8 +200,8 @@ class programplanModel extends model
|
||||
if($data->start_date) $data->start_date = date('d-m-Y', strtotime($data->start_date));
|
||||
if($data->start_date == '' or $data->endDate == '') $data->duration = 0;
|
||||
|
||||
$datas['data'][] = $data;
|
||||
$stageIndex[] = array('planID' => $plan->id, 'progress' => array('totalConsumed' => 0, 'totalReal' => 0));
|
||||
$datas['data'][] = $data;
|
||||
$stageIndex[$plan->id] = array('planID' => $plan->id, 'parent' => $plan->parent, 'progress' => array('totalConsumed' => 0, 'totalReal' => 0));
|
||||
}
|
||||
|
||||
$taskSign = "<span>[ T ] </span>";
|
||||
@@ -272,9 +272,15 @@ class programplanModel extends model
|
||||
{
|
||||
$stageIndex[$index]['progress']['totalConsumed'] += $task->consumed;
|
||||
$stageIndex[$index]['progress']['totalReal'] += ($task->left + $task->consumed);
|
||||
|
||||
$stageIndex[$stage['parent']]['progress']['totalConsumed'] += $task->consumed;
|
||||
$stageIndex[$stage['parent']]['progress']['totalReal'] += ($task->left + $task->consumed);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Ceturns all the values from the stageIndex and indexes the array numerically. */
|
||||
$stageIndex = array_values($stageIndex);
|
||||
|
||||
/* Calculate the progress of the phase. */
|
||||
foreach($stageIndex as $index => $stage)
|
||||
|
||||
@@ -556,6 +556,7 @@ class projectModel extends model
|
||||
->andWhere('deleted')->eq(0)
|
||||
->beginIF($projectIdList)->andWhere('id')->in($projectIdList)->fi()
|
||||
->beginIF(!$this->app->user->admin and $mode != 'all')->andWhere('id')->in($this->app->user->view->projects)->fi()
|
||||
->beginIF($mode != 'all' and !empty($mode))->andWhere('model')->in($mode)->fi()
|
||||
->fetchPairs('id', 'name');
|
||||
}
|
||||
|
||||
@@ -1946,7 +1947,6 @@ class projectModel extends model
|
||||
public function getTeamMemberPairs($projectID)
|
||||
{
|
||||
$project = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($projectID)->fetch();
|
||||
|
||||
if(empty($project)) return array();
|
||||
|
||||
$type = 'project';
|
||||
|
||||
Regular → Executable
-2
@@ -92,7 +92,6 @@
|
||||
</td>
|
||||
<td colspan='2'><?php echo html::radio('delta', $lang->project->endList , '', "onclick='computeEndDate(this.value)'");?></td>
|
||||
</tr>
|
||||
<?php if($model == 'scrum'):?>
|
||||
<tr id='daysBox'>
|
||||
<th><?php echo $lang->execution->days;?></th>
|
||||
<td>
|
||||
@@ -102,7 +101,6 @@
|
||||
</div>
|
||||
</td><td></td><td></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th id='productTitle'><?php echo $lang->project->manageProducts;?></th>
|
||||
<td class='text-left' id='productsBox' colspan="3">
|
||||
|
||||
Regular → Executable
-2
@@ -103,7 +103,6 @@
|
||||
<?php $deltaValue = $project->end == LONG_TIME ? 999 : (strtotime($project->end) - strtotime($project->begin)) / 3600 / 24 + 1;?>
|
||||
<td colspan='2'><?php echo html::radio('delta', $lang->project->endList , $deltaValue, "onclick='computeEndDate(this.value)'");?></td>
|
||||
</tr>
|
||||
<?php if($project->model == 'scrum'):?>
|
||||
<tr id='daysBox' <?php if($project->end == LONG_TIME) echo "class='hidden'";?>>
|
||||
<th><?php echo $lang->project->days;?></th>
|
||||
<td>
|
||||
@@ -115,7 +114,6 @@
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->project->manageProducts;?></th>
|
||||
<td class='text-left' id='productsBox' colspan="3">
|
||||
|
||||
@@ -137,8 +137,8 @@ $lang->story->comment = '备注';
|
||||
$lang->story->children = "子需求";
|
||||
$lang->story->childrenAB = "子";
|
||||
$lang->story->linkStories = "相关{$lang->SRCommon}";
|
||||
$lang->story->childStories = "细分{$lang->SRCommon}";
|
||||
$lang->story->duplicateStory = "重复{$lang->SRCommon}ID";
|
||||
$lang->story->childStories = "细分需求";
|
||||
$lang->story->duplicateStory = "重复需求ID";
|
||||
$lang->story->reviewResult = '评审意见';
|
||||
$lang->story->preVersion = '之前版本';
|
||||
$lang->story->keywords = '关键词';
|
||||
|
||||
@@ -136,8 +136,8 @@ $lang->story->comment = '備註';
|
||||
$lang->story->children = "子需求";
|
||||
$lang->story->childrenAB = "子";
|
||||
$lang->story->linkStories = "相關{$lang->SRCommon}";
|
||||
$lang->story->childStories = "細分{$lang->SRCommon}";
|
||||
$lang->story->duplicateStory = "重複{$lang->SRCommon}ID";
|
||||
$lang->story->childStories = "細分需求";
|
||||
$lang->story->duplicateStory = "重複需求ID";
|
||||
$lang->story->reviewResult = '評審意見';
|
||||
$lang->story->preVersion = '之前版本';
|
||||
$lang->story->keywords = '關鍵詞';
|
||||
|
||||
Regular → Executable
+8
-3
@@ -68,7 +68,11 @@
|
||||
<th class='c-keywords<?php echo zget($visibleFields, 'keywords', ' hidden') . zget($requiredFields, 'keywords', '', ' required');?>'><?php echo $lang->story->keywords;?></th>
|
||||
<?php
|
||||
$extendFields = $this->story->getFlowExtendFields();
|
||||
foreach($extendFields as $extendField) echo "<th class='c-extend'>{$extendField->name}</th>";
|
||||
foreach($extendFields as $extendField)
|
||||
{
|
||||
$required = strpos(",$extendField->rules,", ',1,') !== false ? 'required' : '';
|
||||
echo "<th class='c-extend $required'>{$extendField->name}</th>";
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -115,11 +119,12 @@
|
||||
</td>
|
||||
<td class='<?php echo zget($visibleFields, 'keywords', 'hidden')?>'><?php echo html::input('keywords[$id]', '', "class='form-control'");?></td>
|
||||
<?php
|
||||
$this->loadModel('flow');
|
||||
foreach($extendFields as $extendField)
|
||||
{
|
||||
$object = new stdclass();
|
||||
$object->{$extendField->field} = $extendField->default;
|
||||
echo "<td" . (($extendField->control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->loadModel('flow')->getFieldControl($extendField, $object, $extendField->field . '[$id]') . "</td>";
|
||||
echo "<td" . (($extendField->control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->flow->getFieldControl($extendField, $object, $extendField->field . '[$id]') . "</td>";
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
@@ -153,7 +158,7 @@ $(function()
|
||||
var $select = $(this);
|
||||
if($select.hasClass('picker-select')) $select.parent().find('.picker').remove();
|
||||
if(index == 1) $select.find("option[value='ditto']").remove();
|
||||
if(index > 1) $select.val('ditto');
|
||||
if(index > 1 && $select.find('option[value="ditto"]').length > 0) $select.val('ditto');
|
||||
if($select.attr('id').indexOf('branch') >= 0) $select.val('<?php echo $branch;?>')
|
||||
$select.chosen();
|
||||
setTimeout(function()
|
||||
|
||||
@@ -244,7 +244,7 @@
|
||||
<table class='table table-form'>
|
||||
<?php if($story->status == 'closed'):?>
|
||||
<tr id='duplicateStoryBox'>
|
||||
<th class='w-70px'><?php echo $lang->story->duplicateStory;?></th>
|
||||
<th class='w-90px'><?php echo $lang->story->duplicateStory;?></th>
|
||||
<td><?php echo html::input('duplicateStory', $story->duplicateStory == 0 ? '' : $story->duplicateStory, "class='form-control'");?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
|
||||
Regular → Executable
+23
-3
@@ -81,7 +81,11 @@
|
||||
<th class='c-pri<?php echo zget($visibleFields, 'pri', ' hidden') . zget($requiredFields, 'pri', '', ' required');?>'><?php echo $lang->task->pri;?></th>
|
||||
<?php
|
||||
$extendFields = $this->task->getFlowExtendFields();
|
||||
foreach($extendFields as $extendField) echo "<th class='w-100px'>{$extendField->name}</th>";
|
||||
foreach($extendFields as $extendField)
|
||||
{
|
||||
$required = strpos(",$extendField->rules,", ',1,') !== false ? 'required' : '';
|
||||
echo "<th class='w-100px $required'>{$extendField->name}</th>";
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -162,7 +166,15 @@
|
||||
</td>
|
||||
<td <?php echo zget($visibleFields, 'desc', "class='hidden'")?>><?php echo html::textarea("desc[$i]", '', "rows='1' class='form-control autosize'");?></td>
|
||||
<td <?php echo zget($visibleFields, 'pri', "class='hidden'")?>><?php echo html::select("pri[$i]", (array)$lang->task->priList, $pri, 'class=form-control');?></td>
|
||||
<?php foreach($extendFields as $extendField) echo "<td" . (($extendField->control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->loadModel('flow')->getFieldControl($extendField, '', $extendField->field . "[$i]") . "</td>";?>
|
||||
<?php
|
||||
$this->loadModel('flow');
|
||||
foreach($extendFields as $extendField)
|
||||
{
|
||||
$object = new stdclass();
|
||||
$object->{$extendField->field} = $extendField->default;
|
||||
echo "<td" . (($extendField->control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->flow->getFieldControl($extendField, $object, $extendField->field . "[$i]") . "</td>";
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
<?php endfor;?>
|
||||
</tbody>
|
||||
@@ -228,7 +240,15 @@
|
||||
</div>
|
||||
<td <?php echo zget($visibleFields, 'desc', "class='hidden'")?>><?php echo html::textarea("desc[%s]", '', "rows='1' class='form-control autosize'");?></td>
|
||||
<td <?php echo zget($visibleFields, 'pri', "class='hidden'")?>><?php echo html::select("pri[%s]", (array)$lang->task->priList, $pri, 'class=form-control');?></td>
|
||||
<?php foreach($extendFields as $extendField) echo "<td" . (($extendField->control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->loadModel('flow')->getFieldControl($extendField, '', $extendField->field . "[%s]") . "</td>";?>
|
||||
<?php
|
||||
$this->loadModel('flow');
|
||||
foreach($extendFields as $extendField)
|
||||
{
|
||||
$object = new stdclass();
|
||||
$object->{$extendField->field} = $extendField->default;
|
||||
echo "<td" . (($extendField->control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->flow->getFieldControl($extendField, $object, $extendField->field . "[%s]") . "</td>";
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -1704,7 +1704,8 @@ class testtaskModel extends model
|
||||
elseif(!isset($existCases[$case->title]))
|
||||
{
|
||||
$this->dao->insert(TABLE_CASE)->data($case, 'steps')->exec();
|
||||
$caseID = $this->dao->lastInsertID();
|
||||
$caseID = $this->dao->lastInsertID();
|
||||
$case->steps = isset($case->steps) ? $case->steps : array();
|
||||
foreach($case->steps as $caseStep)
|
||||
{
|
||||
$caseStep->case = $caseID;
|
||||
|
||||
@@ -48,7 +48,7 @@ function loadList(type, id, defaultType, idvalue)
|
||||
if(data.length != 0)
|
||||
{
|
||||
$(divClass).html(data).find('select').chosen();
|
||||
if(config.currentMethod == 'edit') $(divClass).html(data).find('select').val(idvalue).trigger('chosen:updated');
|
||||
if(config.currentMethod == 'edit' || type == 'feedback') $(divClass).html(data).find('select').val(idvalue).trigger('chosen:updated');
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@ $(function()
|
||||
});
|
||||
|
||||
$('#pri').on('change', function()
|
||||
{
|
||||
{
|
||||
var $select = $(this);
|
||||
var $selector = $select.closest('.pri-selector');
|
||||
var value = $select.val();
|
||||
|
||||
@@ -553,7 +553,7 @@ class todoModel extends model
|
||||
if($todo->type == 'risk' && $this->config->edition == 'max') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_RISK)->fetch('name');
|
||||
if($todo->type == 'opportunity' && $this->config->edition == 'max') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_OPPORTUNITY)->fetch('name');
|
||||
if($todo->type == 'review' && $this->config->edition == 'max') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_REVIEW)->fetch('title');
|
||||
if($todo->type == 'feedback' && $this->config->edition == 'max') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_FEEDBACK)->fetch('title');
|
||||
if($todo->type == 'feedback' and $this->config->edition != 'open') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_FEEDBACK)->fetch('title');
|
||||
$todo->begin = date::formatTime($todo->begin);
|
||||
$todo->end = date::formatTime($todo->end);
|
||||
|
||||
|
||||
@@ -171,7 +171,7 @@
|
||||
<tr>
|
||||
<td colspan='3' class='text-center form-actions'>
|
||||
<?php echo html::submitButton();?>
|
||||
<?php if(!isonlybody()) echo html::a($this->createLink('my', 'todo', 'type=all'), $lang->goback, '', "class='btn btn-back btn-wide'");?>
|
||||
<?php if(!isonlybody()) echo html::a($this->session->todoList, $lang->goback, '', "class='btn btn-back btn-wide'");?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -18,7 +18,7 @@ $lang->tree->browseTask = 'Manage Task Module';
|
||||
$lang->tree->manage = 'Manage Module';
|
||||
$lang->tree->fix = 'Fix Module';
|
||||
$lang->tree->manageProduct = "Manage {$lang->productCommon} Modules";
|
||||
$lang->tree->manageExecution = "Manage {$lang->executionCommon} Modules";
|
||||
$lang->tree->manageExecution = "Manage {$lang->execution->common} Modules";
|
||||
$lang->tree->manageLine = "Manage {$lang->productCommon} Line";
|
||||
$lang->tree->manageBug = 'Manage Bug';
|
||||
$lang->tree->manageCase = 'Manage Case';
|
||||
@@ -32,7 +32,7 @@ $lang->tree->manageLineChild = "Manage {$lang->productCommon} Line";
|
||||
$lang->tree->manageBugChild = 'Manage Child Modules of Bugs';
|
||||
$lang->tree->manageCaseChild = 'Manage Child Cases';
|
||||
$lang->tree->manageCaselibChild = 'Manage Child Libraries';
|
||||
$lang->tree->manageTaskChild = "Manage Child {$lang->executionCommon} Modules";
|
||||
$lang->tree->manageTaskChild = "Manage Child {$lang->execution->common} Modules";
|
||||
$lang->tree->syncFromProduct = "Copy from Other {$lang->productCommon}s";
|
||||
$lang->tree->dragAndSort = "Drag to order";
|
||||
$lang->tree->sort = "Order";
|
||||
|
||||
@@ -18,7 +18,7 @@ $lang->tree->browseTask = '任务模块维护';
|
||||
$lang->tree->manage = '维护模块';
|
||||
$lang->tree->fix = '修正数据';
|
||||
$lang->tree->manageProduct = "维护{$lang->productCommon}视图模块";
|
||||
$lang->tree->manageExecution = "维护{$lang->executionCommon}视图模块";
|
||||
$lang->tree->manageExecution = "维护{$lang->execution->common}视图模块";
|
||||
$lang->tree->manageLine = "维护{$lang->productCommon}线";
|
||||
$lang->tree->manageBug = '维护测试视图模块';
|
||||
$lang->tree->manageCase = '维护用例视图模块';
|
||||
@@ -32,7 +32,7 @@ $lang->tree->manageLineChild = "维护{$lang->productCommon}线";
|
||||
$lang->tree->manageBugChild = '维护Bug子模块';
|
||||
$lang->tree->manageCaseChild = '维护用例子模块';
|
||||
$lang->tree->manageCaselibChild = '维护用例库子模块';
|
||||
$lang->tree->manageTaskChild = "维护{$lang->executionCommon}子模块";
|
||||
$lang->tree->manageTaskChild = "维护{$lang->execution->common}子模块";
|
||||
$lang->tree->syncFromProduct = '复制模块';
|
||||
$lang->tree->dragAndSort = "拖放排序";
|
||||
$lang->tree->sort = "排序";
|
||||
|
||||
@@ -495,7 +495,8 @@ class upgradeModel extends model
|
||||
|
||||
$this->updateGroup4Lite();
|
||||
break;
|
||||
case '16.5':
|
||||
case '16_5':
|
||||
$this->updateProjectStatus();
|
||||
$this->updateStoryReviewer();
|
||||
break;
|
||||
}
|
||||
@@ -6181,4 +6182,35 @@ class upgradeModel extends model
|
||||
$this->dao->insert(TABLE_STORYREVIEW)->data($data)->exec();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the project status.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function updateProjectStatus()
|
||||
{
|
||||
$projects = $this->dao->select('*')->from(TABLE_PROJECT)
|
||||
->where('deleted')->eq('0')
|
||||
->andWhere('status')->eq('doing')
|
||||
->andWhere('type')->eq('project')
|
||||
->andWhere('realBegan')->eq('0000-00-00')
|
||||
->fetchAll('id');
|
||||
|
||||
if(empty($projects)) return;
|
||||
|
||||
$projectIDList = array_keys($projects);
|
||||
|
||||
$executions = $this->dao->select('id,project,min(realBegan) as minBegan')->from(TABLE_EXECUTION)
|
||||
->where('status')->eq('doing')
|
||||
->andWhere('deleted')->eq('0')
|
||||
->andWhere('project')->in($projectIDList)
|
||||
->groupBy('project')
|
||||
->fetchAll();
|
||||
|
||||
if(empty($executions)) return;
|
||||
|
||||
foreach ($executions as $execution) $this->dao->update(TABLE_PROJECT)->set('realBegan')->eq($execution->minBegan)->where('id')->eq($execution->project)->exec();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -276,7 +276,7 @@ class personnelTest
|
||||
*
|
||||
* @param string $objectType
|
||||
* @param int $objectID
|
||||
* @param string mixed $user
|
||||
* @param array mixed $user
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -292,8 +292,20 @@ class personnelTest
|
||||
return $objects;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete product whitelist Test
|
||||
*
|
||||
* @param int mixed $productID
|
||||
* @param string $account
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function deleteProductWhitelistTest($productID, $account = '')
|
||||
{
|
||||
global $tester;
|
||||
$this->addWhitelistTest('product', $productID, array('admin'));
|
||||
$tester->dao->update(TABLE_ACL)->set('source')->eq('sync')->where('objectID')->eq($productID)->andWhere('objectType')->eq('product')->exec();
|
||||
|
||||
$objects = $this->objectModel->deleteProductWhitelist($productID, $account);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
@@ -301,8 +313,19 @@ class personnelTest
|
||||
return $objects;
|
||||
}
|
||||
|
||||
public function deleteProgramWhitelistTest($programID = 0, $account = '')
|
||||
/**
|
||||
* Delete program whitelist Test
|
||||
*
|
||||
* @param int $programID
|
||||
* @param string $account
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function deleteProgramWhitelistTest($programID, $account)
|
||||
{
|
||||
global $tester;
|
||||
$this->addWhitelistTest('program', $programID, array($account));
|
||||
$tester->dao->update(TABLE_ACL)->set('source')->eq('sync')->where('objectID')->eq($programID)->andWhere('objectType')->eq('program')->exec();
|
||||
$objects = $this->objectModel->deleteProgramWhitelist($programID, $account);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
@@ -310,8 +333,19 @@ class personnelTest
|
||||
return $objects;
|
||||
}
|
||||
|
||||
public function deleteProjectWhitelistTest($objectID = 0, $account = '')
|
||||
/**
|
||||
* Delete project whitelist Test
|
||||
*
|
||||
* @param int mixed $objectID
|
||||
* @param string mixed $account
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function deleteProjectWhitelistTest($objectID, $account)
|
||||
{
|
||||
global $tester;
|
||||
$this->addWhitelistTest('project', $objectID, array($account));
|
||||
$tester->dao->update(TABLE_ACL)->set('source')->eq('sync')->where('objectID')->eq($objectID)->andWhere('objectType')->eq('project')->exec();
|
||||
$objects = $this->objectModel->deleteProjectWhitelist($objectID, $account);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
@@ -319,8 +353,19 @@ class personnelTest
|
||||
return $objects;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete execution whitelist Test
|
||||
*
|
||||
* @param int mixed $executionID
|
||||
* @param string $account
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function deleteExecutionWhitelistTest($executionID, $account = '')
|
||||
{
|
||||
global $tester;
|
||||
$this->addWhitelistTest('sprint', $executionID, array($account));
|
||||
$tester->dao->update(TABLE_ACL)->set('source')->eq('sync')->where('objectID')->eq($executionID)->andWhere('objectType')->eq('sprint')->exec();
|
||||
$objects = $this->objectModel->deleteExecutionWhitelist($executionID, $account);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
@@ -328,8 +373,21 @@ class personnelTest
|
||||
return $objects;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete whitelist Test
|
||||
*
|
||||
* @param array $users
|
||||
* @param string $objectType
|
||||
* @param int $objectID
|
||||
* @param int $groupID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function deleteWhitelistTest($users = array(), $objectType = 'program', $objectID = 0, $groupID = 0)
|
||||
{
|
||||
global $tester;
|
||||
$this->addWhitelistTest($objectType, $objectID, $users);
|
||||
$tester->dao->update(TABLE_ACL)->set('source')->eq('sync')->where('objectID')->eq($objectID)->andWhere('objectType')->eq($objectType)->exec();
|
||||
$objects = $this->objectModel->deleteWhitelist($users, $objectType, $objectID, $groupID);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
Regular → Executable
+23
-3
@@ -2,7 +2,6 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/personnel.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,8 +9,29 @@ title=测试 personnelModel->addWhitelist();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
测试正常添加白名单 >> 0
|
||||
测试不传用户名的情况,这里不传用户名会导致删除符合条件的数据 >> 0
|
||||
|
||||
*/
|
||||
|
||||
$personnel = new personnelTest();
|
||||
$personnel = new personnelTest('admin');
|
||||
|
||||
r($personnel->addWhitelistTest()) && p() && e();
|
||||
$user = array();
|
||||
$user[0] = array('admin');
|
||||
$user[1] = array();
|
||||
|
||||
$objectID = array();
|
||||
$objectID[0] = 11;
|
||||
$objectID[1] = 21;
|
||||
|
||||
$objectType = array();
|
||||
$objectType[0] = 'project';
|
||||
$objectType[1] = 'program';
|
||||
$objectType[2] = 'product';
|
||||
$objectType[3] = 'sprint';
|
||||
|
||||
$result1 = $personnel->addWhitelistTest($objectType[0], $objectID[0], $user[0]);
|
||||
$result2 = $personnel->addWhitelistTest($objectType[0], $objectID[0], $user[1]);
|
||||
|
||||
r($result1) && p() && e('0'); //测试正常添加白名单
|
||||
r($result2) && p() && e('0'); //测试不传用户名的情况,这里不传用户名会导致删除符合条件的数据
|
||||
Regular → Executable
+4
-3
@@ -2,7 +2,6 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/personnel.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,8 +9,10 @@ title=测试 personnelModel->buildSearchForm();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
$personnel = new personnelTest();
|
||||
$personnel = new personnelTest('admin');
|
||||
|
||||
r($personnel->buildSearchFormTest()) && p() && e();
|
||||
//r($personnel->buildSearchFormTest()) && p() && e();
|
||||
@@ -10,6 +10,9 @@ title=测试 personnelModel->canViewProgram();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
看是否具有访问权限有的情况 >> 1
|
||||
看是否具有访问权限no的情况 >> 1
|
||||
|
||||
*/
|
||||
|
||||
$personnel = new personnelTest('admin');
|
||||
@@ -21,4 +24,4 @@ $account = array();
|
||||
$account[0] = 'test2';
|
||||
|
||||
r($personnel->canViewProgramTest(1, 'test2')) && p() && e('1'); //看是否具有访问权限有的情况
|
||||
r($personnel->canViewProgramTest(10000, 'test2')) && p() && e('1'); //看是否具有访问权限no的情况
|
||||
r($personnel->canViewProgramTest(10000, 'test2')) && p() && e('1'); //看是否具有访问权限no的情况
|
||||
Regular → Executable
+4
-3
@@ -2,7 +2,6 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/personnel.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,8 +9,10 @@ title=测试 personnelModel->createMemberLink();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
$personnel = new personnelTest();
|
||||
$personnel = new personnelTest('admin');
|
||||
|
||||
r($personnel->createMemberLinkTest()) && p() && e();
|
||||
//r($personnel->createMemberLinkTest()) && p() && e();
|
||||
Regular → Executable
+17
-3
@@ -2,7 +2,6 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/personnel.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,8 +9,23 @@ title=测试 personnelModel->deleteExecutionWhitelist();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
调用add方法创建spring类型的白名单,并修改source为sync,然后再通过条件删除 >> 0
|
||||
不传参数的情况,删除id为0的匹配数据,为空则跳过 >> 0
|
||||
|
||||
*/
|
||||
|
||||
$personnel = new personnelTest();
|
||||
$personnel = new personnelTest('admin');
|
||||
|
||||
r($personnel->deleteExecutionWhitelistTest()) && p() && e();
|
||||
$executionID = array();
|
||||
$executionID[0] = 16;
|
||||
$executionID[1] = '';
|
||||
|
||||
$account = array();
|
||||
$account[0] = 'admin';
|
||||
$account[1] = '';
|
||||
|
||||
$result1 = $personnel->deleteExecutionWhitelistTest($executionID[0], $account[0]);
|
||||
$result2 = $personnel->deleteExecutionWhitelistTest($executionID[1], $account[1]);
|
||||
|
||||
r($result1) && p() && e('0'); //调用add方法创建spring类型的白名单,并修改source为sync,然后再通过条件删除
|
||||
r($result2) && p() && e('0'); //不传参数的情况,删除id为0的匹配数据,为空则跳过
|
||||
Regular → Executable
+14
-3
@@ -2,7 +2,6 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/personnel.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,8 +9,20 @@ title=测试 personnelModel->deleteProductWhitelist();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
删除了产品10的白名单,这里有个条件,source必须为sync,同步过来的才能删 >> 0
|
||||
|
||||
*/
|
||||
|
||||
$personnel = new personnelTest();
|
||||
$personnel = new personnelTest('admin');
|
||||
|
||||
r($personnel->deleteProductWhitelistTest()) && p() && e();
|
||||
$productID = array();
|
||||
$productID[0] = 10;
|
||||
$peoductID[1] = 11111;
|
||||
|
||||
$account = array();
|
||||
$account[0] = 'admin';
|
||||
$account[1] = 'test111';
|
||||
|
||||
$result1 = $personnel->deleteProductWhitelistTest($productID[0], $account[0]);
|
||||
|
||||
r($result1) && p() && e('0'); //删除了产品10的白名单,这里有个条件,source必须为sync,同步过来的才能删
|
||||
Regular → Executable
+17
-3
@@ -2,7 +2,6 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/personnel.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,8 +9,23 @@ title=测试 personnelModel->deleteProgramWhitelist();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
我这里通过add方法创建了一个id为10的项目集白名单,并修改source为同步,然后删除创建的这条信息 >> 0
|
||||
传入空时这里我删除了一个objectID为0的,program白名单信息,如果没这条数据跳过 >> 0
|
||||
|
||||
*/
|
||||
|
||||
$personnel = new personnelTest();
|
||||
$personnel = new personnelTest('admin');
|
||||
|
||||
r($personnel->deleteProgramWhitelistTest()) && p() && e();
|
||||
$programID = array();
|
||||
$programID[0] = 10;
|
||||
$programID[1] = '';
|
||||
|
||||
$account = array();
|
||||
$account[0] = 'dev10';
|
||||
$account[1] = '';
|
||||
|
||||
$result1 = $personnel->deleteProgramWhitelistTest($programID[0], $account[0]);
|
||||
$result2 = $personnel->deleteProgramWhitelistTest($programID[1], $account[1]);
|
||||
|
||||
r($result1) && p() && e('0'); //我这里通过add方法创建了一个id为10的项目集白名单,并修改source为同步,然后删除创建的这条信息
|
||||
r($result2) && p() && e('0'); //传入空时这里我删除了一个objectID为0的,program白名单信息,如果没这条数据跳过
|
||||
Regular → Executable
+17
-3
@@ -2,7 +2,6 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/personnel.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,8 +9,23 @@ title=测试 personnelModel->deleteProjectWhitelist();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
通过add方法创建一个白名单,这里判断了objectType为sprint的情况,正常传入无法删除 >> 0
|
||||
传入空的情况时,删除为objectID为0的数据,如果空,则跳过 >> 0
|
||||
|
||||
*/
|
||||
|
||||
$personnel = new personnelTest();
|
||||
$personnel = new personnelTest('admin');
|
||||
|
||||
r($personnel->deleteProjectWhitelistTest()) && p() && e();
|
||||
$projectID = array();
|
||||
$projectID[0] = 15;
|
||||
$projectID[1] = '';
|
||||
|
||||
$account = array();
|
||||
$account[0] = 'dev15';
|
||||
$account[1] = '';
|
||||
|
||||
$result1 = $personnel->deleteProjectWhitelistTest($projectID[0], $account[0]);
|
||||
$result2 = $personnel->deleteProjectWhitelistTest($projectID[1], $account[1]);
|
||||
|
||||
r($result1) && p() && e('0'); //通过add方法创建一个白名单,这里判断了objectType为sprint的情况,正常传入无法删除
|
||||
r($result2) && p() && e('0'); //传入空的情况时,删除为objectID为0的数据,如果空,则跳过
|
||||
Regular → Executable
+33
-3
@@ -2,7 +2,6 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/personnel.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,8 +9,39 @@ title=测试 personnelModel->deleteWhitelist();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
创建删除objectID为2的项目白名单 >> 0
|
||||
创建删除objectID为2的产品白名单 >> 0
|
||||
创建删除objectID为10的项目集白名单 >> 0
|
||||
创建删除objectID为11的执行白名单 >> 0
|
||||
|
||||
*/
|
||||
|
||||
$personnel = new personnelTest();
|
||||
$personnel = new personnelTest('admin');
|
||||
|
||||
r($personnel->deleteWhitelistTest()) && p() && e();
|
||||
$users = array();
|
||||
$users[0] = 'dev17';
|
||||
|
||||
$objectType = array();
|
||||
$objectType[0] = 'project';
|
||||
$objectType[1] = 'product';
|
||||
$objectType[2] = 'program';
|
||||
$objectType[3] = 'sprint';
|
||||
|
||||
$objectID = array();
|
||||
$objectID[0] = '2';
|
||||
$objectID[1] = '10';
|
||||
$objectID[2] = '11';
|
||||
|
||||
$groupID = array();
|
||||
$groupID[0] = '1';
|
||||
$groupID[1] = '2';
|
||||
|
||||
$result1 = $personnel->deleteWhitelistTest($users, $objectType[0], $objectID[0]);
|
||||
$result2 = $personnel->deleteWhitelistTest($users, $objectType[1], $objectID[0]);
|
||||
$result3 = $personnel->deleteWhitelistTest($users, $objectType[2], $objectID[1]);
|
||||
$result4 = $personnel->deleteWhitelistTest($users, $objectType[3], $objectID[2]);
|
||||
|
||||
r($result1) && p() && e('0'); //创建删除objectID为2的项目白名单
|
||||
r($result2) && p() && e('0'); //创建删除objectID为2的产品白名单
|
||||
r($result3) && p() && e('0'); //创建删除objectID为10的项目集白名单
|
||||
r($result4) && p() && e('0'); //创建删除objectID为11的执行白名单
|
||||
@@ -10,6 +10,11 @@ title=测试 personnelModel->getAccessiblePersonnel();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
测试取出结果集中的一个对象里的名字programID=1 >> 测试1
|
||||
测试取出匹配的数量 >> 10
|
||||
测试取出结果集中的一个对象里的名字programID=2 >> 开发11
|
||||
测试取出匹配的数量 >> 10
|
||||
|
||||
*/
|
||||
|
||||
$personnel = new personnelTest('admin');
|
||||
@@ -38,4 +43,4 @@ $getnumber2 = count($personnel->getAccessiblePersonnelTest($programID[1], $dep
|
||||
r($getrealname1) && p('realname') && e('测试1'); //测试取出结果集中的一个对象里的名字programID=1
|
||||
r($getnumber1) && p() && e('10'); //测试取出匹配的数量
|
||||
r($getrealname2) && p('realname') && e('开发11'); //测试取出结果集中的一个对象里的名字programID=2
|
||||
r($getnumber2) && p() && e('10'); //测试取出匹配的数量
|
||||
r($getnumber2) && p() && e('10'); //测试取出匹配的数量
|
||||
Regular → Executable
+4
-3
@@ -2,7 +2,6 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/personnel.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,8 +9,10 @@ title=测试 personnelModel->getBugAndStoryInvest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
$personnel = new personnelTest();
|
||||
$personnel = new personnelTest('admin');
|
||||
|
||||
r($personnel->getBugAndStoryInvestTest()) && p() && e();
|
||||
//r($personnel->getBugAndStoryInvestTest()) && p() && e();
|
||||
Regular → Executable
+42
-3
@@ -2,7 +2,6 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/personnel.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,8 +9,48 @@ title=测试 personnelModel->getCopiedObjects();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
取出匹配的项目数量 >> 20
|
||||
取出其中一个匹配的项目 >> 独立项目20
|
||||
取出匹配的产品数量 >> 119
|
||||
取出其中一个匹配的产品 >> 多平台产品100
|
||||
取出匹配的项目集数量 >> 9
|
||||
取出其中一个匹配的项目集 >> 项目集10
|
||||
取出匹配的执行数量 >> 10
|
||||
取出其中一个匹配的执行 >> 独立项目20
|
||||
传入不存在的objectID匹配的执行数量 >> 0
|
||||
传入空值时取出匹配的执行数量 >> 0
|
||||
|
||||
*/
|
||||
|
||||
$personnel = new personnelTest();
|
||||
$personnel = new personnelTest('admin');
|
||||
|
||||
r($personnel->getCopiedObjectsTest()) && p() && e();
|
||||
$objectID = array();
|
||||
$objectID[0] = 1;
|
||||
$objectID[1] = 2;
|
||||
$objectID[2] = 11111;
|
||||
$objectID[3] = '';
|
||||
|
||||
$objectType = array();
|
||||
$objectType[0] = 'project';
|
||||
$objectType[1] = 'product';
|
||||
$objectType[2] = 'program';
|
||||
$objectType[3] = 'sprint';
|
||||
|
||||
$result1 = $personnel->getCopiedObjectsTest($objectID[0], $objectType[0]);
|
||||
$result2 = $personnel->getCopiedObjectsTest($objectID[0], $objectType[1]);
|
||||
$result3 = $personnel->getCopiedObjectsTest($objectID[1], $objectType[2]);
|
||||
$result4 = $personnel->getCopiedObjectsTest($objectID[1], $objectType[3]);
|
||||
$result5 = $personnel->getCopiedObjectsTest($objectID[2], $objectType[3]);
|
||||
$result6 = $personnel->getCopiedObjectsTest($objectID[2], $objectType[3]);
|
||||
|
||||
//a($result);die;
|
||||
r(count($result1)) && p() && e('20'); //取出匹配的项目数量
|
||||
r($result1) && p('750') && e('独立项目20'); //取出其中一个匹配的项目
|
||||
r(count($result2)) && p() && e('119'); //取出匹配的产品数量
|
||||
r($result2) && p('100') && e('多平台产品100'); //取出其中一个匹配的产品
|
||||
r(count($result3)) && p() && e('9'); //取出匹配的项目集数量
|
||||
r($result3) && p('10') && e('项目集10'); //取出其中一个匹配的项目集
|
||||
r(count($result4)) && p() && e('10'); //取出匹配的执行数量
|
||||
r($result4) && p('750') && e(' 独立项目20'); //取出其中一个匹配的执行
|
||||
r(count($result5)) && p() && e('0'); //传入不存在的objectID匹配的执行数量
|
||||
r(count($result6)) && p() && e('0'); //传入空值时取出匹配的执行数量
|
||||
@@ -10,6 +10,8 @@ title=测试 personnelModel->getInvest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
$personnel = new personnelTest('admin');
|
||||
@@ -22,4 +24,4 @@ $invest1 = count($personnel->getInvestTest($programID[0]));
|
||||
$invest2 = count($personnel->getInvestTest($programID[1]));
|
||||
|
||||
r($invest1) && p($invest1) && e(''); //获得项目id=1的授权用户数量
|
||||
r($invest2) && p($invest2) && e(''); //获得项目id=2的授权用户数量
|
||||
r($invest2) && p($invest2) && e(''); //获得项目id=2的授权用户数量
|
||||
@@ -2,7 +2,6 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/personnel.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,12 +9,22 @@ title=测试 personnelModel->getInvolvedExecutions();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
涉及到执行的人员计数 >> 8
|
||||
取出其中一个 >> 1
|
||||
传入不存在的id >> 0
|
||||
|
||||
*/
|
||||
|
||||
$personnel = new personnelTest('admin');
|
||||
|
||||
$project = array();
|
||||
$project[0] = 101;
|
||||
$project[1] = 102;
|
||||
$project[0] = array(11, 12);
|
||||
$project[1] = 12222;
|
||||
|
||||
r($personnel->getInvolvedExecutionsTest($project)) && p() && e(''); //
|
||||
$result1 = count($personnel->getInvolvedExecutionsTest($project[0]));
|
||||
$result2 = $personnel->getInvolvedExecutionsTest($project[0]);
|
||||
$result3 = $personnel->getInvolvedExecutionsTest($project[1]);
|
||||
|
||||
r($result1) && p() && e('8'); //涉及到执行的人员计数
|
||||
r($result2) && p('pm72') && e('1'); //取出其中一个
|
||||
r($result3) && p() && e('0'); //传入不存在的id
|
||||
Regular → Executable
+16
-3
@@ -2,7 +2,6 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/personnel.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,8 +9,22 @@ title=测试 personnelModel->getInvolvedProjects();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
计数project11,12的团队人员个数 >> 4
|
||||
取出其中一个角色 >> 1
|
||||
传入不存在的ID >> 0
|
||||
|
||||
*/
|
||||
|
||||
$personnel = new personnelTest();
|
||||
$personnel = new personnelTest('admin');
|
||||
|
||||
r($personnel->getInvolvedProjectsTest()) && p() && e();
|
||||
$projectID = array();
|
||||
$projectID[0] = array(11, 12);
|
||||
$projectID[1] = array(1111);
|
||||
|
||||
$result1 = count($personnel->getInvolvedProjectsTest($projectID[0]));
|
||||
$result2 = $personnel->getInvolvedProjectsTest($projectID[0]);
|
||||
$result3 = count($personnel->getInvolvedProjectsTest($projectID[1]));
|
||||
|
||||
r($result1) && p() && e('4'); //计数project11,12的团队人员个数
|
||||
r($result2) && p('admin') && e('1'); //取出其中一个角色
|
||||
r($result3) && p() && e('0'); //传入不存在的ID
|
||||
Regular → Executable
+3
-2
@@ -2,7 +2,6 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/personnel.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,8 +9,10 @@ title=测试 personnelModel->getIssueInvest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
$personnel = new personnelTest();
|
||||
$personnel = new personnelTest('admin');
|
||||
|
||||
r($personnel->getIssueInvestTest()) && p() && e();
|
||||
Regular → Executable
+20
-3
@@ -2,7 +2,6 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/personnel.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,8 +9,26 @@ title=测试 personnelModel->getProjectTaskInvest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
次方法为页面上的项目信息,人员,创建人物 >> 0
|
||||
次方法为页面上的项目信息,人员,已完成任务 >> 0
|
||||
次方法为页面上的项目信息,人员,待处理 >> 0
|
||||
次方法为页面上的项目信息,人员,任务消耗 >> 0
|
||||
|
||||
*/
|
||||
|
||||
$personnel = new personnelTest();
|
||||
$personnel = new personnelTest('admin');
|
||||
|
||||
r($personnel->getProjectTaskInvestTest()) && p() && e();
|
||||
$projectID = array();
|
||||
$projectID[0] = 11;
|
||||
$projectID[1] = 12;
|
||||
|
||||
$account = array();
|
||||
$account[0] = 'admin';
|
||||
$account[1] = 'user3';
|
||||
|
||||
$result1 = $personnel->getProjectTaskInvestTest($projectID, $account);
|
||||
|
||||
r($result1) && p('0:createdTask') && e('0'); //次方法为页面上的项目信息,人员,创建人物
|
||||
r($result1) && p('0:finishedTask') && e('0'); //次方法为页面上的项目信息,人员,已完成任务
|
||||
r($result1) && p('0:pendingTask') && e('0'); //次方法为页面上的项目信息,人员,待处理
|
||||
r($result1) && p('0:consumedTask') && e('0'); //次方法为页面上的项目信息,人员,任务消耗
|
||||
@@ -10,10 +10,12 @@ title=测试 personnelModel->getRiskInvest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
$personnel = new personnelTest('admin');
|
||||
|
||||
var_dump($personnel->getRiskInvestTest(array('test2', 'test3'), array(1, 2, 3)));die;
|
||||
|
||||
r($personnel->getRiskInvestTest()) && p() && e();
|
||||
r($personnel->getRiskInvestTest()) && p() && e();
|
||||
Regular → Executable
+4
-3
@@ -2,7 +2,6 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/personnel.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,8 +9,10 @@ title=测试 personnelModel->getSprintAndStage();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
$personnel = new personnelTest();
|
||||
$personnel = new personnelTest('admin');
|
||||
|
||||
r($personnel->getSprintAndStageTest()) && p() && e();
|
||||
//r($personnel->getSprintAndStageTest()) && p() && e();
|
||||
Regular → Executable
+13
-2
@@ -10,8 +10,19 @@ title=测试 personnelModel->getUserEffortHours();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
正常传入的情况 >> 0
|
||||
传入不存在的情况 >> 0
|
||||
|
||||
*/
|
||||
|
||||
$personnel = new personnelTest();
|
||||
$personnel = new personnelTest('admin');
|
||||
|
||||
r($personnel->getUserEffortHoursTest()) && p() && e();
|
||||
$projectID = array();
|
||||
$projectID[0] = 11;
|
||||
$projectID[1] = 11111;
|
||||
|
||||
$result1 = $personnel->getUserEffortHoursTest($projectID[0]);
|
||||
$result2 = $personnel->getUserEffortHoursTest($projectID[1]);
|
||||
|
||||
r($result1) && p() && e('0'); //正常传入的情况
|
||||
r($result2) && p() && e('0'); //传入不存在的情况
|
||||
Regular → Executable
+33
-2
@@ -10,8 +10,39 @@ title=测试 personnelModel->getUserHours();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
取出admin工时 >> 4
|
||||
取出po82的工时 >> 3
|
||||
取出匹配的人员数量 >> 2
|
||||
当传入一个存在的角色一个不存在的角色时,打印其中存在的角色工时 >> 4
|
||||
其中一个为空时,取出匹配的人员数量 >> 1
|
||||
当传入task不存在时 >> 0
|
||||
当task不存在时,取出匹配个数 >> 0
|
||||
|
||||
*/
|
||||
|
||||
$personnel = new personnelTest();
|
||||
$personnel = new personnelTest('admin');
|
||||
|
||||
r($personnel->getUserHoursTest()) && p() && e();
|
||||
$userTask = array();
|
||||
$userTask['po82'] = array(1);
|
||||
$userTask['admin'] = array(2);
|
||||
|
||||
$userTask1 = array();
|
||||
$userTask1['test111'] = array(1);
|
||||
$userTask1['admin'] = array(2);
|
||||
|
||||
$userTask2 = array();
|
||||
$userTask2['admin'] = array(1111);
|
||||
$userTask2['po82'] = array(1112);
|
||||
|
||||
$result1 = $personnel->getUserHoursTest($userTask);
|
||||
$result2 = count($personnel->getUserHoursTest($userTask));
|
||||
$result3 = $personnel->getUserHoursTest($userTask1);
|
||||
$result4 = $personnel->getUserHoursTest($userTask2);
|
||||
|
||||
r($result1) && p('admin:consumed') && e('4'); //取出admin工时
|
||||
r($result1) && p('po82:consumed') && e('3'); //取出po82的工时
|
||||
r($result2) && p() && e('2'); //取出匹配的人员数量
|
||||
r($result3) && p('admin:consumed') && e('4'); //当传入一个存在的角色一个不存在的角色时,打印其中存在的角色工时
|
||||
r(count($result3)) && p() && e('1'); //其中一个为空时,取出匹配的人员数量
|
||||
r($result4) && p('admin:consumed') && e('0'); //当传入task不存在时
|
||||
r(count($result4)) && p() && e('0'); //当task不存在时,取出匹配个数
|
||||
Regular → Executable
+31
-3
@@ -2,7 +2,6 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/personnel.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,8 +9,37 @@ title=测试 personnelModel->getWhitelist();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
取出对应object1的项目人员数量 >> 2
|
||||
取出其中一个人员项目经理10 >> 项目经理10
|
||||
取出另一个人员admin >> admin
|
||||
取出对应object2的执行人员数量 >> 0
|
||||
当传入不存在的objectID时,取出匹配执行人员数量 >> 0
|
||||
当传入空时,查看匹配执行的人员数量 >> 0
|
||||
|
||||
*/
|
||||
|
||||
$personnel = new personnelTest();
|
||||
$personnel = new personnelTest('admin');
|
||||
|
||||
r($personnel->getWhitelistTest()) && p() && e();
|
||||
$objectID = array();
|
||||
$objectID[0] = 1;
|
||||
$objectID[1] = 2;
|
||||
$objectID[2] = 11111;
|
||||
$objectID[3] = '';
|
||||
|
||||
$objectType = array();
|
||||
$objectType[0] = 'project';
|
||||
$objectType[1] = 'program';
|
||||
$objectType[2] = 'product';
|
||||
$objectType[3] = 'sprint';
|
||||
|
||||
$result1 = $personnel->getWhitelistTest($objectID[0], $objectType[1]);
|
||||
$result2 = $personnel->getWhitelistTest($objectID[1], $objectType[3]);
|
||||
$result3 = $personnel->getWhitelistTest($objectID[2], $objectType[3]);
|
||||
$result4 = $personnel->getWhitelistTest($objectID[3], $objectType[1]);
|
||||
|
||||
r(count($result1)) && p() && e('2'); //取出对应object1的项目人员数量
|
||||
r($result1) && p('0:realname') && e('项目经理10'); //取出其中一个人员项目经理10
|
||||
r($result1) && p('1:realname') && e('admin'); //取出另一个人员admin
|
||||
r(count($result2)) && p() && e('0'); //取出对应object2的执行人员数量
|
||||
r(count($result3)) && p() && e('0'); //当传入不存在的objectID时,取出匹配执行人员数量
|
||||
r(count($result4)) && p() && e('0'); //当传入空时,查看匹配执行的人员数量
|
||||
Regular → Executable
+31
-3
@@ -2,7 +2,6 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/personnel.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,8 +9,37 @@ title=测试 personnelModel->getWhitelistAccount();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
这是一个正常测试,统计关联白名单人员数量 >> 2
|
||||
取出其中一个数据admin >> admin
|
||||
取出另一个数据dev10 >> dev10
|
||||
取出objectid2的白名单数量 >> 0
|
||||
当objectID不存在时,统计匹配数量 >> 0
|
||||
当传入参数为空时,统计匹配人员数量 >> 0
|
||||
|
||||
*/
|
||||
|
||||
$personnel = new personnelTest();
|
||||
$personnel = new personnelTest('admin');
|
||||
|
||||
r($personnel->getWhitelistAccountTest()) && p() && e();
|
||||
$objectID = array();
|
||||
$objectID[0] = 1;
|
||||
$objectID[1] = 2;
|
||||
$objectID[2] = 1111;
|
||||
$objectID[3] = '';
|
||||
|
||||
$objectType = array();
|
||||
$objectType[0] = 'project';
|
||||
$objectType[1] = 'program';
|
||||
$objectType[2] = 'product';
|
||||
$objectType[3] = 'sprint';
|
||||
|
||||
$result1 = $personnel->getWhitelistAccountTest($objectID[0], $objectType[1]);
|
||||
$result2 = $personnel->getWhitelistAccountTest($objectID[1], $objectType[2]);
|
||||
$result3 = $personnel->getWhitelistAccountTest($objectID[2], $objectType[3]);
|
||||
$result4 = $personnel->getWhitelistAccountTest($objectID[3], $objectType[0]);
|
||||
|
||||
r(count($result1)) && p() && e('2'); //这是一个正常测试,统计关联白名单人员数量
|
||||
r($result1) && p('admin') && e('admin'); //取出其中一个数据admin
|
||||
r($result1) && p('dev10') && e('dev10'); //取出另一个数据dev10
|
||||
r(count($result2)) && p() && e('0'); //取出objectid2的白名单数量
|
||||
r(count($result3)) && p() && e('0'); //当objectID不存在时,统计匹配数量
|
||||
r(count($result4)) && p() && e('0'); //当传入参数为空时,统计匹配人员数量
|
||||
Regular → Executable
+39
-3
@@ -2,7 +2,6 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/personnel.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,8 +9,45 @@ title=测试 personnelModel->updateWhitelist();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
传入已有参数时,数据变更类型source为add >> 0
|
||||
传入已有参数时,数据变更type为blacklist >> 0
|
||||
传入没有的参数时,新建一条source为sync的数据 >> 0
|
||||
|
||||
*/
|
||||
|
||||
$personnel = new personnelTest();
|
||||
$personnel = new personnelTest('admin');
|
||||
|
||||
r($personnel->updateWhitelistTest()) && p() && e();
|
||||
$user = array();
|
||||
$user[0] = array('admin', 'dev10');
|
||||
$user[1] = array('test1', 'test2');
|
||||
|
||||
$objectType = array();
|
||||
$objectType[0] = 'project';
|
||||
$objectType[1] = 'program';
|
||||
$objectType[2] = 'product';
|
||||
$objectType[3] = 'sprint';
|
||||
|
||||
$objectID = array();
|
||||
$objectID[0] = 1;
|
||||
$objectID[1] = 2;
|
||||
|
||||
$type = array();
|
||||
$type[0] = 'whitelist';
|
||||
$type[1] = 'blacklist';
|
||||
|
||||
$source = array();
|
||||
$source[0] = 'update';
|
||||
$source[1] = 'add';
|
||||
$source[2] = 'sync';
|
||||
|
||||
$updateType = array();
|
||||
$updateType[0] = 'increase';
|
||||
$updateType[1] = 'replace';
|
||||
|
||||
$result1 = $personnel->updateWhitelistTest($user[0], $objectType[0], $objectID[1], $type[0], $source[1], $updateType[0]);
|
||||
$result2 = $personnel->updateWhitelistTest($user[0], $objectType[1], $objectID[0], $type[1], $source[0], $updateType[1]);
|
||||
$result3 = $personnel->updateWhitelistTest($user[1], $objectType[0], $objectID[0], $type[0], $source[2], $updateType[0]);
|
||||
|
||||
r($result1) && p() && e('0'); //传入已有参数时,数据变更类型source为add
|
||||
r($result2) && p() && e('0'); //传入已有参数时,数据变更type为blacklist
|
||||
r($result3) && p() && e('0'); //传入没有的参数时,新建一条source为sync的数据
|
||||
+7
-1
@@ -96,7 +96,13 @@ switch($argv[1])
|
||||
break;
|
||||
case 'productsonplan':
|
||||
ztfRun('model/productsonplan');
|
||||
break;;
|
||||
break;
|
||||
case 'personnel':
|
||||
ztfRun('model/personnel');
|
||||
break;
|
||||
case 'projectstory':
|
||||
ztfRun('model/projectstory');
|
||||
break;
|
||||
case 'admin':
|
||||
ztfRun('model/admin');
|
||||
break;
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -5,7 +5,7 @@ if(window.navigator.userAgent.indexOf('xuanxuan') > 0)
|
||||
/** Update zentao client app menu */
|
||||
function updateAppMenu()
|
||||
{
|
||||
const menuItems = appsMenuItems.map(function(item)
|
||||
var menuItems = appsMenuItems.map(function(item)
|
||||
{
|
||||
if (item === 'divider') return '-';
|
||||
var $title = $('<div>' + item.title + '</div>');
|
||||
|
||||
@@ -10,7 +10,7 @@ $('html').addClass('xxc-embed');
|
||||
/** Update zentao client app menu */
|
||||
function updateAppMenu()
|
||||
{
|
||||
const menuItems = appsMenuItems.map(function(item)
|
||||
var menuItems = appsMenuItems.map(function(item)
|
||||
{
|
||||
if (item === 'divider') return '-';
|
||||
var $title = $('<div>' + item.title + '</div>');
|
||||
|
||||
Reference in New Issue
Block a user