Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms
This commit is contained in:
@@ -7,4 +7,8 @@
|
||||
</style>
|
||||
<script>
|
||||
$('#mainMenu').remove();
|
||||
if(laneCount === 1)
|
||||
{
|
||||
$("#kanbanActionMenu li:eq(1)").remove();
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
<?php
|
||||
$config->project->datatable->fieldList['actions']['width'] = '120';
|
||||
|
||||
$config->project->list->exportFields = 'id,code,name,status,budget,PM,desc';
|
||||
|
||||
@@ -183,6 +183,9 @@ class router extends baseRouter
|
||||
if($setting->key == 'mode' and $setting->section == 'global') $mode = $setting->value;
|
||||
if($setting->key == 'scoreStatus' and $setting->section == 'global') $score = $setting->value;
|
||||
}
|
||||
|
||||
/* Lite Version is compatible with classic modes */
|
||||
if($config->vision == 'lite') $mode = 'new';
|
||||
|
||||
/* Record system mode. */
|
||||
$config->systemMode = $mode;
|
||||
|
||||
@@ -325,16 +325,8 @@ class api extends control
|
||||
return $this->sendSuccess(array('locate' => $this->createLink('api', 'index', "libID=$libID")));
|
||||
}
|
||||
|
||||
$lib = fixer::input('post')
|
||||
->join('groups', ',')
|
||||
->join('users', ',')
|
||||
->get();
|
||||
|
||||
if($lib->acl == 'private') $lib->users = $this->app->user->account;
|
||||
if($lib->acl == 'custom' && strpos($lib->users, $this->app->user->account) === false) $lib->users .= ',' . $this->app->user->account;
|
||||
|
||||
/* save api doc library */
|
||||
$libID = $this->doc->createApiLib($lib);
|
||||
$libID = $this->doc->createApiLib();
|
||||
if(dao::isError())
|
||||
{
|
||||
return $this->sendError(dao::getError());
|
||||
|
||||
@@ -71,7 +71,7 @@ function setLane(regionID, num)
|
||||
function loadExecutionBuilds(productID, executionID, index)
|
||||
{
|
||||
branch = $('#branches' + index).val();
|
||||
if(executionID)
|
||||
if(executionID != 0)
|
||||
{
|
||||
link = createLink('build', 'ajaxGetExecutionBuilds', 'executionID=' + executionID + '&productID=' + productID + "&varName=openedBuilds&build=&branch=" + branch + "&index=" + index);
|
||||
}
|
||||
|
||||
@@ -485,8 +485,6 @@ class commonModel extends model
|
||||
/* The standalone lite version removes the lite interface button */
|
||||
if(trim($config->visions, ',') == 'lite') return true;
|
||||
|
||||
if($app->config->systemMode != 'new') return print("<div>{$lang->visionList['rnd']}</div>");
|
||||
|
||||
if(count($userVisions) < 2) return print("<div>{$lang->visionList[$currentVision]}</div>");
|
||||
if(count($configVisions) < 2) return print("<div>{$lang->visionList[$currentVision]}</div>");
|
||||
|
||||
|
||||
+10
-9
@@ -229,15 +229,16 @@ $lang->doc->ge = ':';
|
||||
$lang->doc->point = '.';
|
||||
|
||||
$lang->doclib = new stdclass();
|
||||
$lang->doclib->name = 'Name';
|
||||
$lang->doclib->control = 'Access Control';
|
||||
$lang->doclib->group = 'Group';
|
||||
$lang->doclib->user = 'User';
|
||||
$lang->doclib->files = 'Attachments';
|
||||
$lang->doclib->all = 'All Libraries';
|
||||
$lang->doclib->select = 'Select';
|
||||
$lang->doclib->execution = $lang->executionCommon . ' Library';
|
||||
$lang->doclib->product = $lang->productCommon . ' Library';
|
||||
$lang->doclib->name = 'Name';
|
||||
$lang->doclib->control = 'Access Control';
|
||||
$lang->doclib->group = 'Group';
|
||||
$lang->doclib->user = 'User';
|
||||
$lang->doclib->files = 'Attachments';
|
||||
$lang->doclib->all = 'All Libraries';
|
||||
$lang->doclib->select = 'Select';
|
||||
$lang->doclib->execution = $lang->executionCommon . ' Library';
|
||||
$lang->doclib->product = $lang->productCommon . ' Library';
|
||||
$lang->doclib->apiLibName = 'Api Library Name';
|
||||
|
||||
$lang->doclib->aclListA['default'] = 'Default';
|
||||
$lang->doclib->aclListA['custom'] = 'Custom';
|
||||
|
||||
@@ -229,15 +229,16 @@ $lang->doc->ge = '个';
|
||||
$lang->doc->point = '、';
|
||||
|
||||
$lang->doclib = new stdclass();
|
||||
$lang->doclib->name = '文档库名称';
|
||||
$lang->doclib->control = '访问控制';
|
||||
$lang->doclib->group = '分组';
|
||||
$lang->doclib->user = '用户';
|
||||
$lang->doclib->files = '附件库';
|
||||
$lang->doclib->all = '所有文档库';
|
||||
$lang->doclib->select = '选择文档库';
|
||||
$lang->doclib->execution = $lang->executionCommon . '库';
|
||||
$lang->doclib->product = $lang->productCommon . '库';
|
||||
$lang->doclib->name = '文档库名称';
|
||||
$lang->doclib->control = '访问控制';
|
||||
$lang->doclib->group = '分组';
|
||||
$lang->doclib->user = '用户';
|
||||
$lang->doclib->files = '附件库';
|
||||
$lang->doclib->all = '所有文档库';
|
||||
$lang->doclib->select = '选择文档库';
|
||||
$lang->doclib->execution = $lang->executionCommon . '库';
|
||||
$lang->doclib->product = $lang->productCommon . '库';
|
||||
$lang->doclib->apiLibName = '接口库名称';
|
||||
|
||||
$lang->doclib->aclListA['default'] = '默认';
|
||||
$lang->doclib->aclListA['custom'] = '自定义';
|
||||
|
||||
+12
-3
@@ -196,20 +196,29 @@ class docModel extends model
|
||||
/**
|
||||
* creat a api doc library.
|
||||
*
|
||||
* @param stdClass $data form data.
|
||||
* @return int
|
||||
* @author thanatos thanatos915@163.com
|
||||
*/
|
||||
public function createApiLib($data)
|
||||
public function createApiLib()
|
||||
{
|
||||
/* replace doc library name */
|
||||
$this->lang->doclib->name = '接口库名称';
|
||||
$this->lang->doclib->name = $this->lang->doclib->apiLibName;
|
||||
|
||||
$data = fixer::input('post')
|
||||
->trim('name')
|
||||
->join('groups', ',')
|
||||
->join('users', ',')
|
||||
->get();
|
||||
|
||||
if($data->acl == 'private') $data->users = $this->app->user->account;
|
||||
if($data->acl == 'custom' && strpos($data->users, $this->app->user->account) === false) $data->users .= ',' . $this->app->user->account;
|
||||
|
||||
$data->type = static::DOC_TYPE_API;
|
||||
$this->dao->insert(TABLE_DOCLIB)->data($data)->autoCheck()
|
||||
->batchCheck($this->config->api->createlib->requiredFields, 'notempty')
|
||||
->check('name', 'unique', "`type` = '" . static::DOC_TYPE_API . "'")
|
||||
->exec();
|
||||
|
||||
return $this->dao->lastInsertID();
|
||||
}
|
||||
|
||||
|
||||
@@ -12,3 +12,4 @@ th.c-pri{width:50px;}
|
||||
.c-category {width: 80px;}
|
||||
.c-actions-7 {width: 190px;}
|
||||
.closed-story {color: #e5e5e5;}
|
||||
.stageBox {height: 180px; overflow: scroll; background: #ffffff;}
|
||||
|
||||
@@ -768,6 +768,7 @@ function updateRegion(regionID, regionData = [])
|
||||
if(!regionData) regionData = regions[regionID];
|
||||
|
||||
$region.data('zui.kanban').render(regionData.groups);
|
||||
resetRegionHeight('open');
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1236,6 +1237,7 @@ $(function()
|
||||
$(this).toggleClass('icon-chevron-double-up icon-chevron-double-down');
|
||||
$(this).parents('.region').find('.kanban').toggle();
|
||||
hideKanbanAction();
|
||||
resetRegionHeight($(this).hasClass('icon-chevron-double-up') ? 'open' : 'close');
|
||||
});
|
||||
|
||||
$('.region-header').on('click', '.action', hideKanbanAction);
|
||||
@@ -1458,6 +1460,8 @@ $(function()
|
||||
});
|
||||
}, 10000);
|
||||
}
|
||||
|
||||
resetRegionHeight('open');
|
||||
});
|
||||
|
||||
/** Calculate column height */
|
||||
@@ -1471,3 +1475,62 @@ function calcColHeight(col, lane, colCards, colHeight, kanban)
|
||||
if (typeof displayCards !== 'number' || displayCards < 2) displayCards = 2;
|
||||
return (displayCards * (options.cardHeight + options.cardSpace) + options.cardSpace);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset region height according to window height.
|
||||
*
|
||||
* @param string fold
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function resetRegionHeight(fold)
|
||||
{
|
||||
var regionCount = 0;
|
||||
if($.isEmptyObject(regions)) return false;
|
||||
for(var i in regions)
|
||||
{
|
||||
regionCount += 1;
|
||||
if(regionCount > 1) return false;
|
||||
}
|
||||
|
||||
var regionID = Object.keys(regions)[0];
|
||||
var region = regions[regionID].groups;
|
||||
var groupCount = 0;
|
||||
|
||||
if($.isEmptyObject(region)) return false;
|
||||
for(var j in region)
|
||||
{
|
||||
groupCount += 1;
|
||||
if(groupCount > 1) return false;
|
||||
}
|
||||
|
||||
var group = region[0];
|
||||
var laneCount = 0;
|
||||
|
||||
if($.isEmptyObject(group.lanes)) return false;
|
||||
for(var h in group.lanes)
|
||||
{
|
||||
laneCount += 1;
|
||||
if(laneCount > 1) return false;
|
||||
}
|
||||
|
||||
var regionHeaderHeight = $('.region-header').outerHeight();
|
||||
if(fold == 'open')
|
||||
{
|
||||
var windowHeight = $(window).height();
|
||||
var headerHeight = $('#mainHeader').outerHeight();
|
||||
var mainPadding = $('#main').css('padding-top');
|
||||
var panelBorder = $('.panel').css('border-top-width');
|
||||
var bodyPadding = $('.panel-body').css('padding-top');
|
||||
var height = windowHeight - (parseInt(mainPadding) * 2) - (parseInt(bodyPadding) * 2) - headerHeight - (parseInt(panelBorder) * 2);
|
||||
var regionPadding = $('.kanban').css('padding-bottom');
|
||||
var columnHeight = $('.kanban-header').outerHeight();
|
||||
|
||||
$('.region').css('height', height);
|
||||
$('.kanban-lane').css('height', height - regionHeaderHeight - parseInt(regionPadding) - columnHeight);
|
||||
}
|
||||
else
|
||||
{
|
||||
$('.region').css('height', regionHeaderHeight);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -353,8 +353,8 @@
|
||||
<?php if(common::hasPriv('story', 'batchChangeStage')):?>
|
||||
<div class="btn-group dropup">
|
||||
<button data-toggle="dropdown" type="button" class="btn"><?php echo $lang->story->stageAB;?> <span class="caret"></span></button>
|
||||
<ul class='dropdown-menu <?php echo count($stories) == 1 ? 'stageBox' : '';?>'>
|
||||
<?php
|
||||
echo "<ul class='dropdown-menu'>";
|
||||
$lang->story->stageList[''] = $lang->null;
|
||||
foreach($lang->story->stageList as $key => $stage)
|
||||
{
|
||||
@@ -363,8 +363,8 @@
|
||||
$actionLink = $this->createLink('story', 'batchChangeStage', "stage=$key");
|
||||
echo "<li>" . html::a('#', $stage, '', "onclick=\"setFormAction('$actionLink', 'hiddenwin', '#storyList')\"") . "</li>";
|
||||
}
|
||||
echo '</ul>';
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php
|
||||
|
||||
@@ -1000,7 +1000,7 @@ class product extends control
|
||||
{
|
||||
$executionsName = "executions[$number]";
|
||||
$executions = empty($executions) ? array('' => '') : $executions;
|
||||
return print(html::select($executionsName, $executions, '', "class='form-control' onchange='loadExecutionBuilds($executionID, this.value, $number)'"));
|
||||
return print(html::select($executionsName, $executions, '', "class='form-control' onchange='loadExecutionBuilds($productID, this.value, $number)'"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1760,6 +1760,8 @@ class projectModel extends model
|
||||
}
|
||||
else
|
||||
{
|
||||
common::printIcon($moduleName, 'manageMembers', "projectID=$project->id", $project, 'list', 'group', '', '', '', $dataApp, $this->lang->execution->team);
|
||||
if($this->config->systemMode == 'new') common::printIcon('project', 'whitelist', "projectID=$project->id&module=project&from=$from", $project, 'list', 'shield-check', '', 'btn-action', '', $dataApp);
|
||||
if(common::hasPriv($moduleName, 'delete')) echo html::a(helper::createLink($moduleName, "delete", "projectID=$project->id"), "<i class='icon-trash'></i>", 'hiddenwin', "class='btn btn-action' title='{$this->lang->project->delete}'");
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -2152,6 +2152,7 @@ class taskModel extends model
|
||||
->from(TABLE_KANBANCELL)->alias('t1')
|
||||
->leftJoin(TABLE_KANBANLANE)->alias('t2')->on('t1.lane = t2.id')
|
||||
->where('t1.kanban')->eq($executionID)
|
||||
->andWhere('t2.deleted')->eq(0)
|
||||
->andWhere("($cardsWhere)")
|
||||
->fetchAll();
|
||||
|
||||
|
||||
@@ -0,0 +1,274 @@
|
||||
<?php
|
||||
class deptTest
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
global $tester;
|
||||
$this->objectModel = $tester->loadModel('dept');
|
||||
}
|
||||
|
||||
/**
|
||||
* function getByID test by dept
|
||||
*
|
||||
* @param string $deptID
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getByIDTest($deptID)
|
||||
{
|
||||
$objects = $this->objectModel->getByID($deptID);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
}
|
||||
|
||||
/**
|
||||
* function getDeptPairs test by dept
|
||||
*
|
||||
* @param string $deptID
|
||||
* @param string $count
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getDeptPairsTest($deptID, $count)
|
||||
{
|
||||
$objects = $this->objectModel->getDeptPairs($deptID);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
if($count == '1') return count($objects);
|
||||
|
||||
return $objects;
|
||||
}
|
||||
|
||||
/**
|
||||
* function buildMenuQuery test by dept
|
||||
*
|
||||
* @param string $rootDeptID
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function buildMenuQueryTest($rootDeptID)
|
||||
{
|
||||
$objects = $this->objectModel->buildMenuQuery($rootDeptID);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
}
|
||||
|
||||
/**
|
||||
* function getOptionMenu test by dept
|
||||
*
|
||||
* @param string $rootDeptID
|
||||
* @param string $count
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getOptionMenuTest($rootDeptID, $count)
|
||||
{
|
||||
$objects = $this->objectModel->getOptionMenu($rootDeptID);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
if($count == '1') return count($objects);
|
||||
|
||||
return $objects;
|
||||
}
|
||||
|
||||
/**
|
||||
* function getTreeMenu test by dept
|
||||
*
|
||||
* @param string $rootDeptID
|
||||
* @param array $userFunc
|
||||
* @param int $param
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getTreeMenuTest($rootDeptID, $userFunc, $param = 0)
|
||||
{
|
||||
$objects = $this->objectModel->getTreeMenu($rootDeptID, $userFunc, $param = 0);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
}
|
||||
|
||||
/**
|
||||
* function update test by dept
|
||||
*
|
||||
* @param string $deptID
|
||||
* @param array $param
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function updateTest($deptID, $param = array())
|
||||
{
|
||||
global $tester;
|
||||
|
||||
$createFields = array('parent' => '', 'name' => '', 'manager' => '');
|
||||
|
||||
foreach($createFields as $field => $defaultValue) $_POST[$field] = $defaultValue;
|
||||
foreach($param as $key => $value) $_POST[$key] = $value;
|
||||
|
||||
$this->objectModel->update($deptID);
|
||||
|
||||
unset($_POST);
|
||||
|
||||
$objects = $tester->dao->select('*')->from(TABLE_DEPT)->where('id')->eq($deptID)->fetchAll('id');
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
}
|
||||
|
||||
/**
|
||||
* function createManageLink test by dept
|
||||
*
|
||||
* @param string $deptID
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function createManageLinkTest($deptID)
|
||||
{
|
||||
$dept = $this->objectModel->getByID($deptID);
|
||||
$objects = $this->objectModel->createManageLink($dept);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
}
|
||||
|
||||
/**
|
||||
* function createMemberLink test by dept
|
||||
*
|
||||
* @param string $deptID
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function createMemberLinkTest($deptID)
|
||||
{
|
||||
$dept = $this->objectModel->getByID($deptID);
|
||||
$objects = $this->objectModel->createMemberLink($dept);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
}
|
||||
|
||||
public function traingoalMemberLinkTest($dept, $planID)
|
||||
{
|
||||
$objects = $this->objectModel->traingoalMemberLink($dept, $planID);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
}
|
||||
|
||||
public function createGroupManageMemberLinkTest($dept, $groupID)
|
||||
{
|
||||
$objects = $this->objectModel->createGroupManageMemberLink($dept, $groupID);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
}
|
||||
|
||||
public function createManageProjectAdminLinkTest($dept, $groupID)
|
||||
{
|
||||
$objects = $this->objectModel->createManageProjectAdminLink($dept, $groupID);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
}
|
||||
|
||||
public function getSonsTest($deptID)
|
||||
{
|
||||
$objects = $this->objectModel->getSons($deptID);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
}
|
||||
|
||||
public function getAllChildIdTest($deptID)
|
||||
{
|
||||
$objects = $this->objectModel->getAllChildId($deptID);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
}
|
||||
|
||||
public function getParentsTest($deptID)
|
||||
{
|
||||
$objects = $this->objectModel->getParents($deptID);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
}
|
||||
|
||||
public function updateOrderTest($orders)
|
||||
{
|
||||
$objects = $this->objectModel->updateOrder($orders);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
}
|
||||
|
||||
public function manageChildTest($parentDeptID, $childs)
|
||||
{
|
||||
$objects = $this->objectModel->manageChild($parentDeptID, $childs);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
}
|
||||
|
||||
public function getUsersTest($browseType = 'inside', $deptID = 0, $pager = null, $orderBy = 'id')
|
||||
{
|
||||
$objects = $this->objectModel->getUsers($browseType = 'inside', $deptID = 0, $pager = null, $orderBy = 'id');
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
}
|
||||
|
||||
public function getDeptUserPairsTest($deptID = 0, $key = 'account', $type = 'inside', $params = '')
|
||||
{
|
||||
$objects = $this->objectModel->getDeptUserPairs($deptID = 0, $key = 'account', $type = 'inside', $params = '');
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
}
|
||||
|
||||
public function deleteTest($deptID, $null = null)
|
||||
{
|
||||
$objects = $this->objectModel->delete($deptID, $null = null);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
}
|
||||
|
||||
public function fixDeptPathTest()
|
||||
{
|
||||
$objects = $this->objectModel->fixDeptPath();
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
}
|
||||
|
||||
public function getDataStructureTest()
|
||||
{
|
||||
$objects = $this->objectModel->getDataStructure();
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -61,7 +61,7 @@ fields:
|
||||
- field: activatedCount
|
||||
range: 0
|
||||
- field: mailto
|
||||
range: []
|
||||
range: admin{100},[]{200}
|
||||
- field: openedBy
|
||||
range: admin
|
||||
- field: openedDate
|
||||
|
||||
@@ -6,27 +6,27 @@ fields:
|
||||
range: 1-1000
|
||||
|
||||
- field: project
|
||||
range: 31{5},32{2},0
|
||||
range: 11-20,0{630}
|
||||
|
||||
- field: product
|
||||
range: [1,41]{2!},1{2},42,2
|
||||
range: 1-10
|
||||
|
||||
- field: branch
|
||||
range: [0,1]{2!},0{2},2,0
|
||||
range: 0
|
||||
|
||||
- field: execution
|
||||
range: 391{2},121{2},661,122{2},0
|
||||
range: 0{10}, 101-110
|
||||
|
||||
- field: name
|
||||
fields:
|
||||
- field: name1
|
||||
range: 迭代{7},无相关迭代的
|
||||
range: 项目{10},执行{10}
|
||||
|
||||
- field: name2
|
||||
range: 131{5},132{2},[]
|
||||
range: 11-20,101-110
|
||||
|
||||
- field: name2
|
||||
range: 版本{6},`版本!@()[]{}|\+=%^&*$#测试版本名称到底可以有多长!@#¥%&*'":.<>。?/();`,版本
|
||||
range: 版本
|
||||
|
||||
- field: name3
|
||||
range: 1-1000
|
||||
|
||||
@@ -0,0 +1,131 @@
|
||||
title: zt_bug
|
||||
desc: Bug表
|
||||
version: 1.0
|
||||
fields:
|
||||
- field: id
|
||||
range: 301-10000
|
||||
- field: project
|
||||
range: 11-20,0{5}
|
||||
- field: product
|
||||
range: 1-10,1{5}
|
||||
- field: branch
|
||||
range: 0
|
||||
- field: module
|
||||
range: 0
|
||||
- field: execution
|
||||
range: 101-110,0{5}
|
||||
- field: plan
|
||||
range: 0
|
||||
- field: story
|
||||
range: 2-40:4,0{5}
|
||||
- field: storyVersion
|
||||
range: 3{10},1{5}
|
||||
- field: task
|
||||
range: 0
|
||||
- field: toTask
|
||||
range: 0
|
||||
- field: toStory
|
||||
range: 0
|
||||
- field: title
|
||||
fields:
|
||||
- field: title1
|
||||
range: 测试单转Bug,SonarQube_Bug
|
||||
- field: title2
|
||||
range: 1-10000
|
||||
- field: keywords
|
||||
range: []
|
||||
- field: severity
|
||||
range: 1-4
|
||||
- field: pri
|
||||
range: 1-4
|
||||
- field: type
|
||||
range: codeerror
|
||||
- field: os
|
||||
range: ""
|
||||
- field: browser
|
||||
range: []
|
||||
- field: hardware
|
||||
range: []
|
||||
- field: found
|
||||
range: []
|
||||
- field: steps
|
||||
range: [<p>【步骤】</p><br/><p>【结果】</p><br/><p>【期望】</p><br/>,【步骤】进入成果展示<br/>【结果】乱码<br/>【期望】正常显示<br/>]
|
||||
- field: status
|
||||
range: active
|
||||
- field: subStatus
|
||||
range: []
|
||||
- field: color
|
||||
range: [#3da7f5,#75c941,#2dbdb2,#797ec9,#ffaf38,#ff4e3e]
|
||||
- field: confirmed
|
||||
range: 0
|
||||
- field: activatedCount
|
||||
range: 0
|
||||
- field: mailto
|
||||
range: admin{100},[]{200}
|
||||
- field: openedBy
|
||||
range: admin
|
||||
- field: openedDate
|
||||
range: "(-1M)-(+1w):60"
|
||||
type: timestamp
|
||||
format: "YYYY-MM-DD hh:mm:ss"
|
||||
- field: openedBuild
|
||||
range: 11-20
|
||||
- field: assignedTo
|
||||
range: admin,dev1,test1
|
||||
- field: assignedDate
|
||||
range: "(-1M)-(+1w):60"
|
||||
type: timestamp
|
||||
format: "YYYY-MM-DD"
|
||||
- field: deadline
|
||||
range: "(-1M)-(+1w):-1D"
|
||||
type: timestamp
|
||||
prefix: ""
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: "YYYY-MM-DD"
|
||||
- field: resolvedBy
|
||||
range: ""
|
||||
- field: resolution
|
||||
range: ""
|
||||
- field: resolvedBuild
|
||||
range: ""
|
||||
- field: resolvedDate
|
||||
range: ""
|
||||
prefix: ""
|
||||
postfix: ""
|
||||
- field: closedBy
|
||||
range: ""
|
||||
- field: closedDate
|
||||
range: ""
|
||||
- field: duplicateBug
|
||||
range: 0
|
||||
- field: linkBug
|
||||
range:
|
||||
- field: case
|
||||
range: 2-40:4
|
||||
- field: caseVersion
|
||||
range: 1{10},0{5}
|
||||
- field: result
|
||||
range: 2-40:4
|
||||
- field: repo
|
||||
range: 0
|
||||
- field: entry
|
||||
range:
|
||||
- field: lines
|
||||
range:
|
||||
- field: v1
|
||||
range:
|
||||
- field: v2
|
||||
range:
|
||||
- field: issueKey
|
||||
range: []{10},[17]{5}
|
||||
- field: repoType
|
||||
range:
|
||||
- field: testtask
|
||||
range: 1-10,0{5}
|
||||
- field: lastEditedBy
|
||||
range:
|
||||
- field: lastEditedDate
|
||||
range:
|
||||
- field: deleted
|
||||
range: 0
|
||||
@@ -0,0 +1,69 @@
|
||||
title: table zt_testrun
|
||||
desc: "测试执行"
|
||||
author: automated export
|
||||
version: "1.0"
|
||||
fields:
|
||||
- field: id
|
||||
note: "ID"
|
||||
range: 1-10000
|
||||
prefix: ""
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: ""
|
||||
- field: task
|
||||
note: "测试单任务ID"
|
||||
range: 1-10{4}
|
||||
prefix: ""
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: ""
|
||||
- field: case
|
||||
note: "用例ID"
|
||||
range: 1-40
|
||||
prefix: ""
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: ""
|
||||
- field: version
|
||||
note: "版本"
|
||||
range: 1
|
||||
prefix: ""
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: ""
|
||||
- field: assignedTo
|
||||
note: "指派给"
|
||||
range: ""
|
||||
prefix: ""
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: ""
|
||||
- field: lastRunner
|
||||
note: "最后执行人"
|
||||
use: admin
|
||||
prefix: ""
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: ""
|
||||
- field: lastRunDate
|
||||
note: "最后执行时间"
|
||||
range: "(M)-(w):60"
|
||||
type: timestamp
|
||||
prefix: ""
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: "YYYY-MM-DD"
|
||||
- field: lastRunResult
|
||||
note: "最后执行结果"
|
||||
range: pass,fail
|
||||
prefix: ""
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: ""
|
||||
- field: status
|
||||
note: "状态"
|
||||
range: normal
|
||||
prefix: ""
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: ""
|
||||
@@ -0,0 +1,126 @@
|
||||
title: table zt_testtask
|
||||
desc: "测试版本"
|
||||
author: automated export
|
||||
version: "1.0"
|
||||
fields:
|
||||
- field: id
|
||||
note: "ID"
|
||||
range: 1-10000
|
||||
prefix: ""
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: ""
|
||||
- field: name
|
||||
note: "测试单名称"
|
||||
range: 1-10000
|
||||
prefix: "测试单"
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: ""
|
||||
- field: product
|
||||
note: "所属产品"
|
||||
range: 1-10
|
||||
prefix: ""
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: ""
|
||||
- field: project
|
||||
note: "所属项目"
|
||||
range: 11-20
|
||||
prefix: ""
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: ""
|
||||
- field: execution
|
||||
note: "所属执行"
|
||||
range: 101-110
|
||||
prefix: ""
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: ""
|
||||
- field: build
|
||||
range: 11-20
|
||||
note: "版本"
|
||||
prefix: ""
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: ""
|
||||
- field: owner
|
||||
note: "负责人"
|
||||
range: 3-14
|
||||
prefix: "user"
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: ""
|
||||
- field: pri
|
||||
note: "优先级"
|
||||
range: 1-4
|
||||
prefix: ""
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: ""
|
||||
- field: begin
|
||||
note: "开始日期"
|
||||
range: "(M)-(w):60"
|
||||
type: timestamp
|
||||
prefix: ""
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: "YYYY-MM-DD"
|
||||
- field: end
|
||||
note: "结束日期"
|
||||
range: "(M)-(+1w):60"
|
||||
type: timestamp
|
||||
prefix: ""
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: "YYYY-MM-DD"
|
||||
- field: mailto
|
||||
note: "抄送给"
|
||||
range: ""
|
||||
prefix: ","
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: ""
|
||||
- field: desc
|
||||
note: "描述"
|
||||
range: 1-1000
|
||||
prefix: "这是测试单描述"
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: ""
|
||||
- field: report
|
||||
note: "报告"
|
||||
range: ""
|
||||
prefix: ""
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: ""
|
||||
- field: status
|
||||
note: "状态"
|
||||
range: wait,doing,done,blocked
|
||||
prefix: ""
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: ""
|
||||
- field: auto
|
||||
note: "自动"
|
||||
range: no
|
||||
prefix: ""
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: ""
|
||||
- field: subStatus
|
||||
note: "子状态"
|
||||
range: ""
|
||||
prefix: ""
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: ""
|
||||
- field: deleted
|
||||
note: "是否删除"
|
||||
range: 0
|
||||
prefix: ""
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: ""
|
||||
@@ -27,6 +27,10 @@ $builder->taskestimate = array('rows' => 600, 'extends' => array('taskestimate')
|
||||
$builder->taskson = array('rows' => 10, 'extends' => array('task', 'taskson'));
|
||||
$builder->case = array('rows' => 400, 'extends' => array('case'));
|
||||
$builder->bug = array('rows' => 300, 'extends' => array('bug'));
|
||||
$builder->morebug = array('rows' => 15, 'extends' => array('bug','morebug'));
|
||||
|
||||
$builder->testtask = array('rows' => 10, 'extends' => array('testtask'));
|
||||
$builder->testrun = array('rows' => 40, 'extends' => array('testrun'));
|
||||
|
||||
$builder->product = array('rows' => 100, 'extends' => array('product'));
|
||||
$builder->productline = array('rows' => 20, 'extends' => array('module', 'productline'));
|
||||
@@ -61,7 +65,7 @@ $builder->doclib = array('rows' => 900, 'extends' => array('doclib'));
|
||||
$builder->doc = array('rows' => 900, 'extends' => array('doc'));
|
||||
$builder->doccontent = array('rows' => 900, 'extends' => array('doccontent'));
|
||||
|
||||
$builder->build = array('rows' => 8, 'extends' => array('build'));
|
||||
$builder->build = array('rows' => 20, 'extends' => array('build'));
|
||||
$builder->release = array('rows' => 8, 'extends' => array('release'));
|
||||
|
||||
$builder->pipeline = array('rows' => 2, 'extends' => array('pipeline'));
|
||||
|
||||
@@ -46,6 +46,7 @@ class Processor
|
||||
$this->initUserquery();
|
||||
$this->initUpdateKanban();
|
||||
$this->initStory();
|
||||
$this->initBug();
|
||||
|
||||
$this->dao->commit();
|
||||
}
|
||||
@@ -156,6 +157,11 @@ class Processor
|
||||
$this->dao->update(TABLE_STORY)->set('`status`')->eq('active')->where('id')->le('20')->exec();
|
||||
}
|
||||
|
||||
private function initBug()
|
||||
{
|
||||
$this->dao->update(TABLE_BUG)->set('`issueKey`')->eq('2:AX-W7K3_L7H_36P3H4le')->where('issueKey')->eq('17')->exec();
|
||||
}
|
||||
|
||||
/**
|
||||
* Init product plan.
|
||||
*
|
||||
|
||||
Executable
+18
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/dept.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 deptModel->buildMenuQuery();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
|
||||
$deptIDList = array('', '2');
|
||||
|
||||
$dept = new deptTest();
|
||||
r($dept->buildMenuQueryTest($deptIDList[0])) && p() && e('SELECT * FROM `zt_dept` ORDER BY `grade` desc,`order` '); //不输入部门id
|
||||
r($dept->buildMenuQueryTest($deptIDList[1])) && p() && e(',2,'); //输入部门id
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/dept.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 deptModel->createGroupManageMemberLink();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
|
||||
$dept = new deptTest();
|
||||
|
||||
r() && p() && e();
|
||||
Executable
+20
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/dept.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 deptModel->createManageLink();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
|
||||
$deptID = '5';
|
||||
|
||||
$dept = new deptTest();
|
||||
r($dept->createManageLinkTest($deptID)) && p() && e('编辑'); //编辑链接
|
||||
r($dept->createManageLinkTest($deptID)) && p() && e('删除'); //删除链接
|
||||
r($dept->createManageLinkTest($deptID)) && p() && e('下级部门'); //下级部门
|
||||
r($dept->createManageLinkTest($deptID)) && p() && e('orders[5]'); //数量
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/dept.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 deptModel->createManageProjectAdminLink();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
|
||||
$dept = new deptTest();
|
||||
|
||||
r() && p() && e();
|
||||
Executable
+17
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/dept.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 deptModel->createMemberLink();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
|
||||
$deptID = '2';
|
||||
|
||||
$dept = new deptTest();
|
||||
r($dept->createMemberLinkTest($deptID)) && p() && e('>开发部<');
|
||||
Executable
+16
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/dept.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 deptModel->delete();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
|
||||
$dept = new deptTest();
|
||||
|
||||
r() && p() && e();
|
||||
Executable
+16
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/dept.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 deptModel->fixDeptPath();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
|
||||
$dept = new deptTest();
|
||||
|
||||
r() && p() && e();
|
||||
Executable
+16
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/dept.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 deptModel->getAllChildId();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
|
||||
$dept = new deptTest();
|
||||
|
||||
r() && p() && e();
|
||||
Executable
+18
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/dept.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 deptModel->getByID();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
|
||||
$deptIDList = array('1','0');
|
||||
|
||||
$dept = new deptTest();
|
||||
r($dept->getByIDTest($deptIDList[0])) && p('name') && e('产品部'); //查找id为1的部门
|
||||
r($dept->getByIDTest($deptIDList[1])) && p() && e('0'); //查找id不存在的部门
|
||||
Executable
+16
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/dept.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 deptModel->getDataStructure();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
|
||||
$dept = new deptTest();
|
||||
|
||||
r() && p() && e();
|
||||
Executable
+20
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/dept.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 deptModel->getDeptPairs();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
|
||||
$deptIDlist = array('0', '2');
|
||||
$count = array('0', '1');
|
||||
|
||||
$dept = new deptTest();
|
||||
r($dept->getDeptPairsTest($deptIDlist[0], $count[1])) && p() && e('100'); //查询全部部门统计
|
||||
r($dept->getDeptPairsTest($deptIDlist[1], $count[0])) && p('2') && e('开发部'); //查询id为2的部门
|
||||
r($dept->getDeptPairsTest($deptIDlist[1], $count[1])) && p() && e('100'); //查询id为2的部门数量
|
||||
Executable
+16
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/dept.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 deptModel->getDeptUserPairs();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
|
||||
$dept = new deptTest();
|
||||
|
||||
r() && p() && e();
|
||||
Executable
+23
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/dept.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 deptModel->getOptionMenu();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
|
||||
$deptIDList = array('0', '1', '2');
|
||||
$count = array('0', '1');
|
||||
|
||||
$dept = new deptTest();
|
||||
r($dept->getOptionMenuTest($deptIDList[1], $count[0])) && p('1') && e('/产品部'); //父级部门查询
|
||||
r($dept->getOptionMenuTest($deptIDList[2], $count[0])) && p('2') && e('开发部'); //多级部门查询
|
||||
r($dept->getOptionMenuTest($deptIDList[0], $count[0])) && p('5') && e('/开发部/开发部1'); //全部部门查询
|
||||
r($dept->getOptionMenuTest($deptIDList[1], $count[1])) && p() && e('2'); //父级部门查询统计
|
||||
r($dept->getOptionMenuTest($deptIDList[2], $count[1])) && p() && e('4'); //多级部门查询统计
|
||||
r($dept->getOptionMenuTest($deptIDList[0], $count[1])) && p() && e('101'); //全部部门查询统计
|
||||
Executable
+16
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/dept.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 deptModel->getParents();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
|
||||
$dept = new deptTest();
|
||||
|
||||
r() && p() && e();
|
||||
Executable
+16
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/dept.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 deptModel->getSons();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
|
||||
$dept = new deptTest();
|
||||
|
||||
r() && p() && e();
|
||||
Executable
+20
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/dept.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 deptModel->getTreeMenu();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
|
||||
$deptIDList = array('0', '1', '2');
|
||||
$userFunc = array('deptmodel', 'createManageLink');
|
||||
|
||||
$dept = new deptTest();
|
||||
r($dept->getTreeMenuTest($deptIDList[0], $userFunc)) && p() && e('<li>开发部 <a'); //全部部门树结构查询
|
||||
r($dept->getTreeMenuTest($deptIDList[1], $userFunc)) && p() && e('<li>产品部 <a'); //无子部门树结构查询
|
||||
r($dept->getTreeMenuTest($deptIDList[2], $userFunc)) && p() && e('<li>开发部部1 <a'); //有子部门树结构查询
|
||||
Executable
+16
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/dept.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 deptModel->getUsers();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
|
||||
$dept = new deptTest();
|
||||
|
||||
r() && p() && e();
|
||||
Executable
+16
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/dept.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 deptModel->manageChild();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
|
||||
$dept = new deptTest();
|
||||
|
||||
r() && p() && e();
|
||||
Executable
+16
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/dept.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 deptModel->traingoalMemberLink();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
|
||||
$dept = new deptTest();
|
||||
|
||||
r() && p() && e();
|
||||
Executable
+29
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/dept.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 deptModel->update();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
|
||||
$deptIDList = array('16', '17', '18', '19', '20');
|
||||
|
||||
$parentDept = array('parent' => '0', 'name' => '修改后部门', 'manager' => 'dev1');
|
||||
$childDept = array('parent' => '1', 'name' => '子级部门修改', 'manager' => 'dev2');
|
||||
$noParent = array('name' => '无父级部门', 'manager' => 'test1');
|
||||
$noName = array('parent' => '0', 'manager' => 'test2');
|
||||
$noManager = array('parent' => '1', 'name' => '无负责人部门');
|
||||
|
||||
$dept = new deptTest();
|
||||
r($dept->updateTest($deptIDList[0], $parentDept)) && p('16:name,parent,path,manager') && e('修改后部门,0,,16,,dev1');
|
||||
r($dept->updateTest($deptIDList[2], $childDept)) && p('18:name,parent,path,manager') && e('子级部门修改,1,,1,18,,dev2');
|
||||
r($dept->updateTest($deptIDList[1], $noParent)) && p('parent:0') && e('『上级部门』应当是数字。');
|
||||
r($dept->updateTest($deptIDList[3], $noName)) && p('name:0') && e('『部门名称』不能为空。');
|
||||
r($dept->updateTest($deptIDList[4], $noManager)) && p('20:name,parent,path,manager') && e('无负责人部门,1,,1,20,,');
|
||||
|
||||
system("./ztest init");
|
||||
Executable
+16
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/dept.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 deptModel->updateOrder();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
|
||||
$dept = new deptTest();
|
||||
|
||||
r() && p() && e();
|
||||
Reference in New Issue
Block a user