add userview data
This commit is contained in:
@@ -1263,6 +1263,8 @@ class executionTest
|
||||
public function getTeamSkipTest($taskID, $begin, $end)
|
||||
{
|
||||
global $tester;
|
||||
//$tester->dao->update(TABLE_TEAM)->set('account')->eq('admin')->where('root')->eq($taskID)->andWhere('type')->eq('task')->exec();
|
||||
|
||||
$teams = $tester->dao->select('*')->from(TABLE_TEAM)->where('root')->eq($taskID)->andWhere('type')->eq('task')->orderBy('order')->fetchAll('account');
|
||||
|
||||
$object = $this->objectModel->getTeamSkip($teams, $begin, $end);
|
||||
@@ -1591,8 +1593,12 @@ class executionTest
|
||||
*/
|
||||
public function getBurnDataFlotTest($executionID = 0, $count)
|
||||
{
|
||||
$date = date("Y-m-d");
|
||||
$object = $this->objectModel->getBurnDataFlot($executionID, $burnBy = 'left');
|
||||
|
||||
$todayData = array();
|
||||
foreach ($object[$date] as $key => $value) $todayData[$key] = $value;
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
$error = dao::getError();
|
||||
@@ -1600,7 +1606,7 @@ class executionTest
|
||||
}
|
||||
elseif($count == "1")
|
||||
{
|
||||
return count($object);
|
||||
return sizeof($todayData);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
36
test/data/userview.yaml
Normal file
36
test/data/userview.yaml
Normal file
@@ -0,0 +1,36 @@
|
||||
title: table zt_userview
|
||||
desc: "可访问权限"
|
||||
author: automated export
|
||||
version: "1.0"
|
||||
fields:
|
||||
- field: account
|
||||
note: "用户名"
|
||||
fields:
|
||||
- field: account1
|
||||
range: test{100},dev{100},td{100},top{100}
|
||||
- field: account2
|
||||
range: 1-100,1-100,1-100,1-100
|
||||
- field: programs
|
||||
note: "项目集"
|
||||
range: 1-10
|
||||
prefix: ","
|
||||
postfix: ""
|
||||
format: ""
|
||||
- field: products
|
||||
note: "产品"
|
||||
range: 1-100
|
||||
prefix: ","
|
||||
postfix: ""
|
||||
format: ""
|
||||
- field: projects
|
||||
note: "项目"
|
||||
range: 11-100
|
||||
prefix: ","
|
||||
postfix: ""
|
||||
format: ""
|
||||
- field: sprints
|
||||
note: "迭代"
|
||||
range: 101-700
|
||||
prefix: ","
|
||||
postfix: ""
|
||||
format: ""
|
||||
@@ -7,6 +7,7 @@ $builder->todo = array('rows' => 2000, 'extends' => array('todo'));
|
||||
$builder->effort = array('rows' => 100, 'extends' => array('effort'));
|
||||
$builder->usergroup = array('rows' => 600, 'extends' => array('usergroup'));
|
||||
$builder->usercontact = array('rows' => 61, 'extends' => array('usercontact'));
|
||||
$builder->userview = array('rows' => 400, 'extends' => array('userview'));
|
||||
$builder->dept = array('rows' => 100, 'extends' => array('dept'));
|
||||
$builder->action = array('rows' => 100, 'extends' => array('action'));
|
||||
|
||||
|
||||
@@ -91,6 +91,29 @@ class Processor
|
||||
foreach($users as $account => $user) $this->dao->update(TABLE_USER)->data($user)->where('account')->eq($account)->exec();
|
||||
|
||||
$this->dao->update(TABLE_USERCONTACT)->set('account')->eq('admin')->where('account')->like('admin%')->exec();
|
||||
|
||||
$productIDList = $this->dao->select('id')->from(TABLE_PRODUCT)->fetchAll();
|
||||
$projectIDList = $this->dao->select('id')->from(TABLE_PROJECT)->where('type')->eq('project')->fetchAll();
|
||||
$sprintIDList = $this->dao->select('id')->from(TABLE_EXECUTION)->where('type')->in('sprint,stage,kanban')->fetchAll();
|
||||
|
||||
$product = array();
|
||||
$project = array();
|
||||
$sprint = array();
|
||||
foreach($productIDList as $productID) $product[] = $productID->id;
|
||||
foreach($projectIDList as $projectID) $project[] = $projectID->id;
|
||||
foreach($sprintIDList as $sprintID) $sprint[] = $sprintID->id;
|
||||
|
||||
$products = ",".join(",",$product);
|
||||
$projects = ",".join(",",$project);
|
||||
$sprints = ",".join(",",$sprint);
|
||||
|
||||
$userViews = new stdclass();
|
||||
$userViews->account = 'admin';
|
||||
$userViews->programs = ',1,2,3,4,5,6,7,8,9,10';
|
||||
$userViews->products = $products;
|
||||
$userViews->projects = $projects;
|
||||
$userViews->sprints = $sprints;
|
||||
$this->dao->insert(TABLE_USERVIEW)->data($userViews)->exec();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,9 +10,9 @@ title=测试executionModel->getBurnDataFlotTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行查询统计 >> 2
|
||||
瀑布执行查询统计 >> 2
|
||||
看板执行查询统计 >> 1
|
||||
敏捷执行查询统计 >> 3
|
||||
瀑布执行查询统计 >> 3
|
||||
看板执行查询统计 >> 3
|
||||
|
||||
*/
|
||||
|
||||
@@ -20,6 +20,6 @@ $executionIDList = array('101', '131', '161');
|
||||
$count = array('0','1');
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->getBurnDataFlotTest($executionIDList[0], $count[1])) && p() && e('2'); // 敏捷执行查询统计
|
||||
r($execution->getBurnDataFlotTest($executionIDList[1], $count[1])) && p() && e('2'); // 瀑布执行查询统计
|
||||
r($execution->getBurnDataFlotTest($executionIDList[2], $count[1])) && p() && e('1'); // 看板执行查询统计
|
||||
r($execution->getBurnDataFlotTest($executionIDList[0], $count[1])) && p() && e('3'); // 敏捷执行查询统计
|
||||
r($execution->getBurnDataFlotTest($executionIDList[1], $count[1])) && p() && e('3'); // 瀑布执行查询统计
|
||||
r($execution->getBurnDataFlotTest($executionIDList[2], $count[1])) && p() && e('3'); // 看板执行查询统计
|
||||
@@ -1,32 +0,0 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/execution.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试executionModel->getKanbanGroupDataTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行查询 >> 子任务6,101
|
||||
瀑布执行查询 >> 更多任务93,131
|
||||
看板执行查询 >> 开发任务71,161
|
||||
敏捷执行查询统计 >> 11
|
||||
瀑布执行查询统计 >> 4
|
||||
看板执行查询统计 >> 4
|
||||
|
||||
*/
|
||||
|
||||
$executionIDList = array('101', '131', '161');
|
||||
$count = array('0', '1');
|
||||
|
||||
$execution = new executionTest();
|
||||
var_dump($execution->getKanbanGroupDataTest($executionIDList[0], $count[0]));die;
|
||||
r($execution->getKanbanGroupDataTest($executionIDList[0], $count[0])) && p('906:name,execution') && e('子任务6,101'); // 敏捷执行查询
|
||||
r($execution->getKanbanGroupDataTest($executionIDList[1], $count[0])) && p('693:name,execution') && e('更多任务93,131'); // 瀑布执行查询
|
||||
r($execution->getKanbanGroupDataTest($executionIDList[2], $count[0])) && p('61:name,execution') && e('开发任务71,161'); // 看板执行查询
|
||||
r($execution->getKanbanGroupDataTest($executionIDList[0], $count[1])) && p() && e('11'); // 敏捷执行查询统计
|
||||
r($execution->getKanbanGroupDataTest($executionIDList[1], $count[1])) && p() && e('4'); // 瀑布执行查询统计
|
||||
r($execution->getKanbanGroupDataTest($executionIDList[2], $count[1])) && p() && e('4'); // 看板执行查询统计
|
||||
@@ -11,7 +11,7 @@ cid=1
|
||||
pid=1
|
||||
|
||||
全部执行计划查询 >> 长名称
|
||||
执行计划查询 >> 1.1 [2021-05-23 ~ 2021-09-23]
|
||||
执行计划查询 >> 1.1
|
||||
全部执行计划查询 >> 2
|
||||
|
||||
*/
|
||||
@@ -21,6 +21,6 @@ $executionIDList = array('0','101');
|
||||
$count = array('0','1');
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->getPlansTest($productIDList, $executionIDList[0], $count[0])) && p('1:3') && e('长名称'); // 全部执行计划查询
|
||||
r($execution->getPlansTest($productIDList, $executionIDList[1], $count[0])) && p('1:2') && e('1.1 [2021-05-23 ~ 2021-09-23]'); // 执行计划查询
|
||||
r($execution->getPlansTest($productIDList, $executionIDList[0], $count[1])) && p() && e('2'); // 全部执行计划查询
|
||||
r($execution->getPlansTest($productIDList, $executionIDList[0], $count[0])) && p('1:3') && e('长名称'); // 全部执行计划查询
|
||||
r($execution->getPlansTest($productIDList, $executionIDList[1], $count[0])) && p('1:2') && e('1.1'); // 执行计划查询
|
||||
r($execution->getPlansTest($productIDList, $executionIDList[0], $count[1])) && p() && e('2'); // 全部执行计划查询
|
||||
@@ -34,7 +34,7 @@ doing任务查询统计 >> 1
|
||||
undone任务查询统计 >> 3
|
||||
done任务查询统计 >> 1
|
||||
根据查询条件查询任务统计 >> 1
|
||||
根据模块查询任务统计 >> 2
|
||||
根据模块查询任务统计 >> 8
|
||||
name_asc,id_asc排序查询统计 >> 4
|
||||
id_asc排序查询统计 >> 4
|
||||
pri_desc,id_desc排序查询统计 >> 4
|
||||
@@ -74,7 +74,7 @@ r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[3],
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[4],$queryID[0],$moduleID[0],$sort[0],$count[1])) && p() && e('3'); // undone任务查询统计
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[5],$queryID[0],$moduleID[0],$sort[0],$count[1])) && p() && e('1'); // done任务查询统计
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[7],$queryID[1],$moduleID[0],$sort[0],$count[1])) && p() && e('1'); // 根据查询条件查询任务统计
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[0],$queryID[0],$moduleID[1],$sort[0],$count[1])) && p() && e('2'); // 根据模块查询任务统计
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[0],$queryID[0],$moduleID[1],$sort[0],$count[1])) && p() && e('8'); // 根据模块查询任务统计
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[0],$queryID[0],$moduleID[0],$sort[1],$count[1])) && p() && e('4'); // name_asc,id_asc排序查询统计
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[0],$queryID[0],$moduleID[0],$sort[2],$count[1])) && p() && e('4'); // id_asc排序查询统计
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[0],$queryID[0],$moduleID[0],$sort[3],$count[1])) && p() && e('4'); // pri_desc,id_desc排序查询统计
|
||||
@@ -10,17 +10,17 @@ title=测试executionModel->getTeamSkipTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
正常跳过 >> 901,admin,研发
|
||||
正常跳过 >> 901,user92,研发
|
||||
begin与end一致 >> 无跳转数据
|
||||
end与begin一致 >> 无跳转数据
|
||||
|
||||
*/
|
||||
|
||||
$taskID = 901;
|
||||
$begin = 'admin';
|
||||
$end = 'user92';
|
||||
$begin = 'user92';
|
||||
$end = 'user93';
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->getTeamSkipTest($taskID, $begin, $end)) && p('admin:root,account,role') && e('901,admin,研发'); // 正常跳过
|
||||
r($execution->getTeamSkipTest($taskID, $begin, $begin)) && p() && e('无跳转数据'); // begin与end一致
|
||||
r($execution->getTeamSkipTest($taskID, $end, $end)) && p() && e('无跳转数据'); // end与begin一致
|
||||
r($execution->getTeamSkipTest($taskID, $begin, $end)) && p('user92:root,account,role') && e('901,user92,研发'); // 正常跳过
|
||||
r($execution->getTeamSkipTest($taskID, $begin, $begin)) && p() && e('无跳转数据'); // begin与end一致
|
||||
r($execution->getTeamSkipTest($taskID, $end, $end)) && p() && e('无跳转数据'); // end与begin一致
|
||||
@@ -11,8 +11,8 @@ cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行查询统计 >> 29
|
||||
瀑布执行查询统计 >> 60
|
||||
看板执行查询统计 >> 60
|
||||
瀑布执行查询统计 >> 59
|
||||
看板执行查询统计 >> 62
|
||||
错误时间查询统计 >> 0
|
||||
|
||||
*/
|
||||
@@ -25,6 +25,6 @@ $count = array('0','1');
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->processBurnDataTest($executionIDList[0], $itemCounts[0], $begin[0], $end[0], $count[1])) && p() && e('29'); // 敏捷执行查询统计
|
||||
r($execution->processBurnDataTest($executionIDList[1], $itemCounts[1], $begin[0], $end[0], $count[1])) && p() && e('60'); // 瀑布执行查询统计
|
||||
r($execution->processBurnDataTest($executionIDList[2], $itemCounts[2], $begin[0], $end[0], $count[1])) && p() && e('60'); // 看板执行查询统计
|
||||
r($execution->processBurnDataTest($executionIDList[1], $itemCounts[1], $begin[0], $end[0], $count[1])) && p() && e('59'); // 瀑布执行查询统计
|
||||
r($execution->processBurnDataTest($executionIDList[2], $itemCounts[2], $begin[0], $end[0], $count[1])) && p() && e('62'); // 看板执行查询统计
|
||||
r($execution->processBurnDataTest($executionIDList[2], $itemCounts[2], $begin[1], $end[1], $count[1])) && p() && e('0'); // 错误时间查询统计
|
||||
@@ -10,7 +10,7 @@ title=测试executionModel->statRelatedDataTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行数据统计 >> 3
|
||||
敏捷执行数据统计 >> 2
|
||||
瀑布执行数据统计 >> 4
|
||||
看板执行数据统计 >> 3
|
||||
|
||||
@@ -19,6 +19,6 @@ pid=1
|
||||
$executionIDList = array('101', '131', '161');
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->statRelatedDataTest($executionIDList[0])) && p('storyCount') && e('3'); // 敏捷执行数据统计
|
||||
r($execution->statRelatedDataTest($executionIDList[0])) && p('storyCount') && e('2'); // 敏捷执行数据统计
|
||||
r($execution->statRelatedDataTest($executionIDList[1])) && p('taskCount') && e('4'); // 瀑布执行数据统计
|
||||
r($execution->statRelatedDataTest($executionIDList[2])) && p('bugCount') && e('3'); // 看板执行数据统计
|
||||
@@ -11,7 +11,7 @@ cid=1
|
||||
pid=1
|
||||
|
||||
测试重复迭代code >> 『迭代代号』已经有『project1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。
|
||||
测试修改迭代名称 >> name,迭代1,任务名修改
|
||||
测试修改迭代名称 >> name,迭代1,迭代名修改
|
||||
测试修改迭代项目为瀑布项目 >> project,11,41
|
||||
测试修改迭代项目为看板项目 >> project,41,71
|
||||
测试修改迭代code >> code,project31,code修改
|
||||
@@ -44,7 +44,7 @@ $repeatcode = array('name' => '迭代名修改1');
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->updateObject($executionIDList[0], $repeatcode)) && p('code:0') && e('『迭代代号』已经有『project1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); // 测试重复迭代code
|
||||
r($execution->updateObject($executionIDList[0], $changeName)) && p('0:field,old,new') && e('name,迭代1,任务名修改'); // 测试修改迭代名称
|
||||
r($execution->updateObject($executionIDList[0], $changeName)) && p('0:field,old,new') && e('name,迭代1,迭代名修改'); // 测试修改迭代名称
|
||||
r($execution->updateObject($executionIDList[0], $changeStage)) && p('0:field,old,new') && e('project,11,41'); // 测试修改迭代项目为瀑布项目
|
||||
r($execution->updateObject($executionIDList[0], $changeKanban)) && p('0:field,old,new') && e('project,41,71'); // 测试修改迭代项目为看板项目
|
||||
r($execution->updateObject($executionIDList[1], $changeCode)) && p('0:field,old,new') && e('code,project31,code修改'); // 测试修改迭代code
|
||||
|
||||
Reference in New Issue
Block a user