Merge branch 'master' into 'liyuchun_bug_17235'

# Conflicts:
#   module/common/model.php
This commit is contained in:
孙广明
2022-03-22 07:43:58 +00:00
136 changed files with 2580 additions and 348 deletions
+1
View File
@@ -21,6 +21,7 @@ class buildsEntry extends entry
public function get($projectID = 0)
{
if(empty($projectID)) $projectID = $this->param('project', 0);
if(empty($projectID)) return $this->sendError(400, "Need project id.");
$control = $this->loadController('project', 'build');
$control->build($projectID, $this->param('type', 'all'), $this->param('param', 0), $this->param('order', 't1.date_desc,t1.id_desc'));
+8
View File
@@ -64,6 +64,14 @@ class executionEntry extends Entry
{
switch($field)
{
case 'modules':
$control = $this->loadController('tree', 'browsetask');
$control->browsetask($executionID);
$data = $this->getData();
if(isset($data->status) and $data->status == 'success')
{
$execution->modules = $data->data->tree;
}
case 'builds':
$execution->builds = $this->loadModel('build')->getBuildPairs($productID, 'all', 'noempty,noterminate,nodone', $executionID, 'execution');
break;
-25
View File
@@ -1,25 +0,0 @@
<?php
/**
* The execution cases entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
* @link http://www.zentao.net
*/
class executionMembersEntry extends entry
{
public function get($executionID = 0)
{
if(!$executionID) $executionID = $this->param('execution', 0);
if(empty($executionID)) return $this->sendError(400, 'Need execution id.');
$members = $this->loadModel('execution')->getTeamMembers($executionID);
if(isset($members))
{
foreach($members as $member) $result[] = $this->format($member, 'join:date');
}
return $this->send(200, array('members' => $result));
}
}
-1
View File
@@ -34,7 +34,6 @@ class executionStoriesEntry extends entry
$result = array();
foreach($stories as $story)
{
$story->name =$story->title;
$result[] = $this->format($story, 'openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,reviewedBy:user,reviewedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,deleted:bool,mailto:userList');
}
return $this->send(200, array('page' => $pager->pageID, 'total' => $pager->recTotal, 'limit' => $pager->recPerPage, 'stories' => $result));
+5 -6
View File
@@ -15,16 +15,15 @@ class moduleStoriesEntry extends Entry
{
$executionID = $this->param('executionID', 0);
if(empty($executionID)) return $this->sendError(400, 'Need execution id.');
$control = $this->loadController('story', 'ajaxGetExecutionStories');
$control->ajaxGetExecutionStories($executionID, $this->param('productID', 0), $this->param('branchID', 0), $moduleID);
$control = $this->loadController('execution', 'story');
$control->story($executionID, 'order_desc', 'byModule', $moduleID);
$data = $this->getData();
$this->loadModel('story');
$result = [];
foreach($data as $storyID => $storyName)
foreach($data->data->stories as $story)
{
if(empty($storyID)) continue;
$story = $this->story->getById($storyID);
$result[] = $this->filterFields($story, 'id,title,module,pri,status,stage,estimate');
}
return $this->send(200, array('stories' => $result));
-1
View File
@@ -36,7 +36,6 @@ class productplansEntry extends entry
foreach($plans as $plan)
{
$plan->name = $plan->title;
if($plan->parent > 0 and isset($result[$plan->parent]))
{
$parentPlan = $result[$plan->parent];
+1 -2
View File
@@ -35,7 +35,6 @@ class storiesEntry extends entry
$result = array();
foreach($stories as $story)
{
$story->name =$story->title;
if(isset($story->children)) $story->children = array_values((array)$story->children);
$result[] = $this->format($story, 'openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,reviewedBy:user,reviewedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,deleted:bool,mailto:userList');
}
@@ -55,7 +54,7 @@ class storiesEntry extends entry
if(!$productID and isset($this->requestBody->product)) $productID = $this->requestBody->product;
if(!$productID) return $this->sendError(400, 'Need product id.');
$fields = 'title,spec,verify,reviewer,type,plan,module,moduleOptionMenu,source,sourceNote,category,pri,estimate,mailto,keywords';
$fields = 'title,spec,verify,reviewer,type,plan,module,moduleOptionMenu,source,sourceNote,category,pri,estimate,mailto,keywords,notifyemail,uid';
$this->batchSetPost($fields);
/* If reviewer is not post, set needNotReview. */
+1 -1
View File
@@ -95,7 +95,7 @@ class storyEntry extends Entry
$oldStory = $this->loadModel('story')->getByID($storyID);
/* Set $_POST variables. */
$fields = 'title,product,reviewer,type,plan,module,source,sourceNote,category,pri,estimate,mailto,keywords';
$fields = 'title,product,reviewer,type,plan,module,source,sourceNote,category,pri,estimate,mailto,keywords,uid';
$this->batchSetPost($fields, $oldStory);
$this->setPost('parent', 0);
+30
View File
@@ -0,0 +1,30 @@
<?php
/**
* The story recall entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
* @link http://www.zentao.net
*/
class storyRecallEntry extends Entry
{
/**
* Delete method.
*
* @param int $storyID
* @access public
* @return void
*/
public function delete($storyID)
{
$control = $this->loadController('story', 'recall');
$control->recall($storyID);
$this->getData();
$this->sendSuccess(200, 'success');
}
}
+42
View File
@@ -0,0 +1,42 @@
<?php
/**
* The story review of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
* @link http://www.zentao.net
**/
class storyReviewEntry extends Entry
{
/**
* POST method.
*
* @param int $storyID
* @access public
* @return void
*/
public function post($storyID)
{
$oldStory = $this->loadModel('story')->getByID($storyID);
$fields = 'reviewedDate,result,closedReason,pri,estimate,';
$this->batchSetPost($fields);
$control = $this->loadController('story', 'review');
$control->review($storyID);
$data = $this->getData();
if(!$data or !isset($data->status)) return $this->send400('error');
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
$story = $this->loadModel('story')->getByID($storyID);
$this->send(200, $story);
}
}
+4 -1
View File
@@ -50,7 +50,10 @@ class tabsEntry extends baseEntry
if($menuKey == 'requirement' and empty($this->config->URAndSR)) continue;
if(isset($this->lang->product->menu->$menuKey))
{
list($label, $module, $method) = explode('|', $this->lang->product->menu->$menuKey['link']);
$menuName = $this->lang->product->menu->$menuKey;
if(!isset($menuName['link'])) continue;
list($label, $module, $method) = explode('|', $menuName['link']);
if(!common::hasPriv($module, $method)) continue;
}
else
+1 -1
View File
@@ -102,7 +102,7 @@ class taskEntry extends Entry
$oldTask = $this->loadModel('task')->getByID($taskID);
/* Set $_POST variables. */
$fields = 'name,type,desc,assignedTo,pri,estimate,left,consumed,story,parent,execution,module,closedReason,status,estStarted,deadline,team,teamEstimate,multiple,mailto';
$fields = 'name,type,desc,assignedTo,pri,estimate,left,consumed,story,parent,execution,module,closedReason,status,estStarted,deadline,team,teamEstimate,multiple,mailto,uid';
$this->batchSetPost($fields, $oldTask);
$control = $this->loadController('task', 'edit');
+4 -6
View File
@@ -56,7 +56,7 @@ class taskBatchCreateEntry extends Entry
$estStarted[] = isset($task->estStarted) ? $task->estStarted : 0;
$deadlines[] = isset($task->deadline) ? $task->deadline : null;
$desc[] = isset($task->desc) ? $task->desc : '';
$pri[] = isset($task->pri) ? $task->pri : '';
$pri[] = isset($task->pri) ? $task->pri : 0;
$stories[] = isset($task->story) ? $task->story : $storyID;
}
$this->setPost('module', $modules);
@@ -78,11 +78,9 @@ class taskBatchCreateEntry extends Entry
if(!$data) return $this->send400('error');
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
$this->send(200, array());
if(!$taskID) return $this->send(200, array());
$task = $this->loadModel('task')->getById($taskID);
return $this->send(200, array('task' => $task));
}
public function setArrayPost($field)
{
$_POST[$field] = array('0' => $_POST[$field]);
}
}
+45
View File
@@ -0,0 +1,45 @@
<?php
/**
* The task component entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
* @link http://www.zentao.net
*/
class taskComponentEntry extends Entry
{
/**
* POST method.
*
* @param int $taskID
* @access public
* @return void
*/
public function post($taskID)
{
$fields = 'name,color,type,assignedTo,parent,estimate,story,module,pri,desc,estStarted,deadline';
$this->batchSetPost($fields);
$fields = explode(',', $fields);
foreach($fields as $field) $this->setArrayPost($field);
$task = $this->loadModel('task')->getById($taskID);
$control = $this->loadController('task', 'batchCreate');
$control->batchCreate($task->execution, 0, 0, $taskID);
$data = $this->getData();
if(!$data) return $this->send400('error');
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
$task = $this->task->getById($data->idList[0]);
$this->send(200, $this->format($task, 'deadline:date,openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,realStarted:time,finishedBy:user,finishedDate:time,closedBy:user,closedDate:time,canceledBy:user,canceledDate:time,lastEditedBy:user,lastEditedDate:time,deleted:bool,mailto:userList'));
}
public function setArrayPost($field)
{
$_POST[$field] = array('0' => $_POST[$field]);
}
}
+31
View File
@@ -11,6 +11,37 @@
*/
class taskRecordEstimateEntry extends Entry
{
/**
* GET method.
*
* @param int $taskID
* @access public
* @return void
*/
public function get($taskID)
{
if($this->config->edition != 'open')
{
$control = $this->loadController('effort', 'createForObject');
$control->createForObject('task', $taskID);
}
else
{
$control = $this->loadController('task', 'recordEstimate');
$control->recordEstimate($taskID);
}
$data = $this->getData();
if(!$data) return $this->error('error');
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
$effort = array();
if($this->config->edition != 'open' and $data->data->efforts) $effort = $data->data->efforts;
if($this->config->edition == 'open' and $data->data->esitimates) $effort = $data->data->esitimates;
$this->send(200, array('effort' => $effort));
}
/**
* POST method.
*
+4 -2
View File
@@ -80,9 +80,11 @@ class testcasesEntry extends entry
$stepType = array();
foreach($this->requestBody->steps as $step)
{
$type = isset($step->type) ? $step->type : 'step';
$steps[] = $step->desc;
$expects[] = $step->expect;
$stepType[] = 'item';
$expects[] = $type == 'group' ? '' : $step->expect;
$stepType[] = $type;
}
$this->setPost('steps', $steps);
$this->setPost('expects', $expects);
+3
View File
@@ -50,6 +50,8 @@ $routes['/stories/:id/active'] = 'storyActive';
$routes['/stories/:id/assign'] = 'storyAssignto';
$routes['/stories/:id/recordEstimate'] = 'storyRecordEstimate';
$routes['/stories/:id/child'] = 'storyChild';
$routes['/stories/:id/recall'] = 'storyRecall';
$routes['/stories/:id/review'] = 'storyReview';
$routes['/module/:id/stories'] = 'moduleStories';
@@ -80,6 +82,7 @@ $routes['/tasks/:id/pause'] = 'taskPause';
$routes['/tasks/:id/finish'] = 'taskFinish';
$routes['/tasks/:id/close'] = 'taskClose';
$routes['/tasks/:id/recordEstimate'] = 'taskRecordEstimate';
$routes['/tasks/:id/getEstimate'] = 'taskRecordEstimate';
$routes['/users'] = 'users';
$routes['/users/:id'] = 'user';
+1
View File
@@ -23,6 +23,7 @@ ALTER TABLE `zt_story` ADD `activatedDate` datetime NOT NULL AFTER `closedReason
ALTER TABLE `zt_task` MODIFY `activatedDate` datetime NOT NULL AFTER `lastEditedDate`;
ALTER TABLE `zt_kanbancard` ADD `progress` float unsigned NOT NULL DEFAULT '0' AFTER `estimate`;
UPDATE `zt_kanbancard` SET `progress`='100' WHERE `status` = 'done' and `fromtype` = '';
ALTER TABLE `zt_user` ADD `visions` varchar(20) NOT NULL DEFAULT 'rnd,lite' AFTER `visits`;
UPDATE `zt_user` SET `visions`='rnd,lite';
@@ -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';
+2 -2
View File
@@ -337,8 +337,8 @@
<?php js::set('executionID', $execution->id);?>
<?php if(isonlybody()):?>
<style>
.body-modal .main-header{padding-right:0px;}
.btn-toolbar>.dropdown{margin:0px;}
.body-modal .main-header {padding-right: 0px; z-index: 1100;}
.btn-toolbar > .dropdown {margin: 0px;}
</style>
<?php $html = '<div class="divider"></div><button id="closeModal" type="button" class="btn btn-link" data-dismiss="modal"><i class="icon icon-close"></i></button>';?>
<script>
+3
View File
@@ -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;
+1 -9
View File
@@ -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());
+3 -1
View File
@@ -1505,6 +1505,8 @@ class bug extends control
public function resolve($bugID, $extra = '')
{
$bug = $this->bug->getById($bugID);
if($bug->execution) $execution = $this->loadModel('execution')->getByID($bug->execution);
if(!empty($_POST))
{
$changes = $this->bug->resolve($bugID, $extra);
@@ -1536,7 +1538,6 @@ class bug extends control
parse_str($extra, $output);
if(isonlybody())
{
$execution = $this->loadModel('execution')->getByID($bug->execution);
if(isset($execution->type) and $execution->type == 'kanban' and $this->app->tab == 'execution')
{
$regionID = isset($output['regionID']) ? $output['regionID'] : 0;
@@ -1577,6 +1578,7 @@ class bug extends control
$this->view->executions = $this->loadModel('product')->getExecutionPairsByProduct($productID, $bug->branch ? "0,{$bug->branch}" : 0, 'id_desc', $projectID);
$this->view->builds = $this->loadModel('build')->getBuildPairs($productID, $bug->branch, 'withbranch');
$this->view->actions = $this->action->getList('bug', $bugID);
$this->view->execution = isset($execution) ? $execution : '';
$this->display();
}
+1 -1
View File
@@ -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);
}
+10 -1
View File
@@ -1055,7 +1055,16 @@ class bugModel extends model
if($bug->resolution == 'duplicate' and !$this->post->duplicateBug) dao::$errors[] = sprintf($this->lang->error->notempty, $this->lang->bug->duplicateBug);
if(empty($bug->buildName)) dao::$errors['buildName'][] = sprintf($this->lang->error->notempty, $this->lang->bug->placeholder->newBuildName);
if(empty($bug->buildExecution)) dao::$errors['buildExecution'][] = sprintf($this->lang->error->notempty, $this->lang->bug->execution);
if(empty($bug->buildExecution))
{
$executionLang = $this->lang->bug->execution;
if($oldBug->execution)
{
$execution = $this->loadModel('execution')->getByID($oldBug->execution);
if($execution->type == 'kanban') $executionLang = $this->lang->bug->kanban;
}
dao::$errors['buildExecution'][] = sprintf($this->lang->error->notempty, $executionLang);
}
if(dao::isError()) return false;
$buildData = new stdclass();
+1 -1
View File
@@ -44,7 +44,7 @@ js::set('productID' , $bug->product);
<th><?php echo $lang->bug->resolvedBuild;?></th>
<td id='newBuildExecutionBox' class='hidden'>
<div class='input-group'>
<span class='input-group-addon'><?php echo $lang->build->execution;?></span>
<span class='input-group-addon'><?php echo (!empty($execution) and $execution->type == 'kanban') ? $lang->bug->kanban : $lang->build->execution;?></span>
<?php echo html::select('buildExecution', $executions, '', "class='form-control chosen'");?>
</div>
</td>
+1 -1
View File
@@ -19,5 +19,5 @@
.dynamic.collapsed .dynamic-btn > .icon:before {content: '\f0d8';}
.c-project, .c-product, .c-execution {width: 110px !important; overflow: unset;}
.c-user, .c-order {width: 90px !important; overflow: unset;}
.c-user, .c-order {width: 96px !important; overflow: unset;}
.c-date {width: 200px;}
+1 -1
View File
@@ -35,7 +35,7 @@
<div class="input-control space c-project"><?php echo html::select('project', $projects, $projectID, 'class="form-control chosen" data-max_drop_width="215"');?></div>
<?php endif;?>
<div class="input-control space c-execution"><?php echo html::select('execution', $executions, $executionID, 'class="form-control chosen" data-max_drop_width="215"'); ?></div>
<div class="input-control space c-order"><?php echo html::select('orderBy', $lang->company->order, $orderBy, 'class="form-control chosen" data-max_drop_width="215"'); ?></div>
<div class="input-control space c-order"><?php echo html::select('orderBy', $lang->company->order, $orderBy, 'class="form-control chosen" data-max_drop_width="215" data-disable_search="true"'); ?></div>
<a class="btn btn-link querybox-toggle" id="bysearchTab"><i class="icon icon-search muted"></i> <?php echo $lang->action->dynamic->search;?></a>
</div>
</div>
+10 -9
View File
@@ -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';
+10 -9
View File
@@ -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
View File
@@ -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();
}
+2 -9
View File
@@ -1317,7 +1317,6 @@ class execution extends control
$this->view->title = $this->lang->execution->tips;
$this->view->tips = $this->fetch('execution', 'tips', "executionID=$executionID");
$this->view->defaultURL = $this->session->closeTipsList ? $this->session->closeTipsList : $this->createLink('execution', 'task', 'executionID=' . $executionID);
$this->view->executionID = $executionID;
$this->view->projectID = $projectID;
$this->view->project = $project;
@@ -2895,11 +2894,7 @@ class execution extends control
$this->execution->unlinkStory($executionID, $storyID);
/* if kanban then reload and if ajax request then send result. */
if(isonlybody())
{
return print(js::reload('parent'));
}
elseif(helper::isAjaxRequest())
if(helper::isAjaxRequest())
{
if(dao::isError())
{
@@ -2913,7 +2908,7 @@ class execution extends control
}
return $this->send($response);
}
return print(js::locate($this->app->session->storyList, 'parent'));
return print(js::reload('parent'));
}
}
@@ -3267,8 +3262,6 @@ class execution extends control
*/
public function all($status = 'all', $projectID = 0, $orderBy = 'order_asc', $productID = 0, $recTotal = 0, $recPerPage = 10, $pageID = 1)
{
$this->session->set('closeTipsList', $this->app->getURI(true));
$this->app->loadLang('my');
$this->app->loadLang('product');
$this->app->loadLang('stage');
+1 -1
View File
@@ -20,7 +20,7 @@ td.flex span.project-type-label {margin-left: 5px; min-width: 36px;}
.c-status, .c-date, .c-percent, .c-attribute {width: 80px;}
.c-estimate, .c-consumed, .c-left, .c-pm {width: 70px;}
.c-progress, .c-burn {width: 60px;}
.c-percent, .c-realBegan, .c-end, .c-begin, .c-realEnd{width: 100px;}
.c-code, .c-percent, .c-realBegan, .c-end, .c-begin, .c-realEnd{width: 100px;}
.c-action {text-align: center;}
.c-name > span {margin-right: 2px;}
td.flex span.project-type-label {min-width: 40px;}
+1
View File
@@ -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;}
+66 -3
View File
@@ -768,6 +768,7 @@ function updateRegion(regionID, regionData = [])
if(!regionData) regionData = regions[regionID];
$region.data('zui.kanban').render(regionData.groups);
resetRegionHeight('open');
return true;
}
@@ -1101,7 +1102,7 @@ function createStoryMenu(options)
var items = [];
var showAction = story.$col.type == 'backlog' || story.$col.type == 'ready' || story.$col.type == 'developing' || story.$col.type == 'developed' || story.$col.type == 'testing' || story.$col.type == 'tested' || story.$col.type == 'verified' || story.$col.type == 'released';
if(priv.canEditStory) items.push({label: storyLang.edit, icon: 'edit', url: createLink('story', 'edit', 'storyID=' + story.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
if(priv.canEditStory) items.push({label: storyLang.edit, icon: 'edit', url: createLink('story', 'edit', 'storyID=' + story.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '95%'}});
if(priv.canChangeStory && showAction) items.push({label: storyLang.change, icon: 'change', url: createLink('story', 'change', 'storyID=' + story.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
if(priv.canCreateTask && showAction) items.push({label: executionLang.wbs, icon: 'plus', url: createLink('task', 'create', 'executionID=' + execution.id + '&storyID=' + story.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
if(priv.canBatchCreateTask && showAction) items.push({label: executionLang.batchWBS, icon: 'pluses', url: createLink('task', 'batchCreate', 'executionID=' + execution.id + '&storyID=' + story.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
@@ -1120,7 +1121,7 @@ function createTaskMenu(options)
var $card = options.$trigger.closest('.kanban-item');
var task = $card.data('item');
var items = [];
if(priv.canEditTask) items.push({label: taskLang.edit, icon: 'edit', url: createLink('task', 'edit', 'taskID=' + task.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
if(priv.canEditTask) items.push({label: taskLang.edit, icon: 'edit', url: createLink('task', 'edit', 'taskID=' + task.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '95%'}});
if(priv.canRestartTask && task.$col.type == 'pause') items.push({label: taskLang.restart, icon: 'play', url: createLink('task', 'restart', 'taskID=' + task.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
if(priv.canPauseTask && task.$col.type == 'developing') items.push({label: taskLang.pause, icon: 'pause', url: createLink('task', 'pause', 'taskID=' + task.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
if(priv.canRecordEstimateTask) items.push({label: executionLang.effort, icon: 'time', url: createLink('task', 'recordEstimate', 'taskID=' + task.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
@@ -1140,7 +1141,7 @@ function createBugMenu(options)
var $card = options.$trigger.closest('.kanban-item');
var bug = $card.data('item');
var items = [];
if(priv.canEditBug) items.push({label: bugLang.edit, icon: 'edit', url: createLink('bug', 'edit', 'bugID=' + bug.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
if(priv.canEditBug) items.push({label: bugLang.edit, icon: 'edit', url: createLink('bug', 'edit', 'bugID=' + bug.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '95%'}});
if(priv.canResolveBug && (bug.$col.type == 'unconfirmed' || bug.$col.type == 'confirmed' || bug.$col.type == 'fixing')) items.push({label: bugLang.resolve, icon: 'checked', url: createLink('bug', 'resolve', 'bugID=' + bug.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
if(priv.canConfirmBug && (bug.$col.type == 'fixed' || bug.$col.type == 'testing' || bug.$col.type == 'tested')) items.push({label: bugLang.close, icon: 'off', url: createLink('bug', 'close', 'bugID=' + bug.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
if(priv.canConfirmBug && bug.$col.type == 'unconfirmed') items.push({label: bugLang.confirmBug, icon: 'ok', url: createLink('bug', 'confirmbug', 'bugID=' + bug.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
@@ -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);
}
}
+2
View File
@@ -78,6 +78,7 @@
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
</th>
<th><?php common::printOrderLink('name', $orderBy, $vars, (($from == 'execution') and ($config->systemMode == 'new')) ? $lang->execution->execName : $lang->execution->name);?></th>
<th class='c-code'><?php common::printOrderLink('code', $orderBy, $vars, $lang->execution->code);?></th>
<?php if($config->systemMode == 'new' and $this->app->tab == 'execution'):?>
<th class='c-begin'><?php common::printOrderLink('projectName', $orderBy, $vars, $lang->execution->projectName);?></th></th>
<?php endif;?>
@@ -134,6 +135,7 @@
<a class="plan-toggle" data-id="<?php echo $execution->id;?>"><i class="icon icon-angle-double-right"></i></a>
<?php endif;?>
</td>
<td title='<?php echo $execution->code;?>'><?php echo $execution->code;?></td>
<?php if($config->systemMode == 'new' and $this->app->tab == 'execution'):?>
<td class='c-begin' title='<?php echo $execution->projectName;?>'>
<span class="status-execution status-<?php echo $execution->projectName?>"><?php echo $execution->projectName;?></span>
+1
View File
@@ -11,6 +11,7 @@
*/
?>
<?php if(isset($tips)):?>
<?php $defaultURL = $this->createLink('execution', 'all');?>
<?php include '../../common/view/header.html.php';?>
<body>
<div class='modal-dialog mw-500px' id='tipsModal'>
+2 -2
View File
@@ -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
+16
View File
@@ -1023,4 +1023,20 @@ class fileModel extends model
return array($info->ImageWidth->value, $info->ImageHeight->value, 'img');
}
}
/**
* Get file pairs.
*
* @param int $IDs
* @param string $value
* @access public
* @return void
*/
public function getPairs($IDs, $value = 'title')
{
return $this->dao->select("id,$value")->from(TABLE_FILE)
->where('id')->in($IDs)
->andWhere('deleted')->eq('0')
->fetchPairs();
}
}
+1 -1
View File
@@ -1 +1 @@
#mainContent {padding-left: 0px;}
#mainContent {padding-left: 0px; height: 500px;}
+1 -1
View File
@@ -1 +1 @@
#mainContent {padding-left: 0px;}
#mainContent {padding-left: 0px; height: 500px;}
+2
View File
@@ -36,3 +36,5 @@
.kanbans .kanbanAcl {position: absolute; right: 0px; bottom: 2px; color: #838a9d;}
a.disabled {pointer-events: none;}
.noBorder{border: 0px;}
+2 -1
View File
@@ -19,7 +19,7 @@
.region .region-header label {color: #999; background: transparent; border: 1px solid #ddd; margin-left: 10px; margin-right: 10px}
.region .region-header .action {float: right}
.region .region-header .icon-double-angle-up,.icon-double-angle-down {cursor: pointer;}
.region .kanban-header-sub-cols {border-right: 2px solid #fff;margin-left:0;}
.region .kanban-header-sub-cols {margin-left:0;}
.region .kanban-header-sub-cols .kanban-header-col > .title {max-width: 100% !important;min-width:240px;}
.region .sort .region-header {cursor: move;}
@@ -82,6 +82,7 @@
.kanban-item .has-color .info > .user .lable-teamSumCount,
.kanban-item .has-color .info > .label-light {color: #FFFFFF;}
.kanban-item .has-color .info > .label-pri {border-color: #FFFFFF;}
.kanban-item .has-color .progress-box > .progress-number {color: #FFFFFF;}
.kanban-item .item-more {position: absolute; right: 6px; top: 0px;}
.kanban-card {height: auto !important; padding: 8px 14px !important; min-height: 60px;}
+5
View File
@@ -1587,3 +1587,8 @@ function resetRegionHeight(fold)
$('.region').css('height', regionHeaderHeight);
}
}
$('.dropdown-menu').click(function()
{
$.zui.ContextMenu.hide();
})
+3 -3
View File
@@ -1647,14 +1647,14 @@ class kanbanModel extends model
public function getSpacePairs($browseType = 'private')
{
$account = $this->app->user->account;
$spaceIdList = $this->getCanViewObjects('kanbanspace');
$spaceIdList = $this->getCanViewObjects('kanbanspace', $browseType);
return $this->dao->select('id,name')->from(TABLE_KANBANSPACE)
->where('deleted')->eq(0)
->andWhere('id')->in($spaceIdList)
->beginIF(in_array($browseType, array('private', 'cooperation', 'public')))->andWhere('type')->eq($browseType)->fi()
->beginIF($browseType == 'involved')->andWhere('owner')->ne($account)->fi()
->beginIF($this->cookie->showClosed == 0 and $browseType != 'showClosed')->andWhere('status')->ne('closed')->fi()
->beginIF(!$this->app->user->admin)->andWhere('id')->in($spaceIdList)->fi()
->orderBy('id_desc')
->fetchPairs('id');
}
@@ -1694,7 +1694,7 @@ class kanbanModel extends model
$spaceList = $objectType == 'kanban' ? $this->dao->select('id,owner,type')->from(TABLE_KANBANSPACE)->fetchAll('id') : array();
if($this->app->user->admin and strpos('private,involved', $param) === false) return array_keys($objects);
if($param and $this->app->user->admin and strpos('private,involved', $param) === false) return array_keys($objects);
$account = $this->app->user->account;
foreach($objects as $objectID => $object)
+2
View File
@@ -71,6 +71,7 @@
</div>
</td>
</tr>
<?php if($card->progress):?>
<tr>
<th><?php echo $lang->kanbancard->progress;?></th>
<td>
@@ -80,6 +81,7 @@
</div>
</td>
</tr>
<?php endif;?>
</table>
</div>
</div>
+1 -1
View File
@@ -147,7 +147,7 @@
<?php endforeach;?>
</div>
<?php else:?>
<div class="table-empty-tip">
<div class="table-empty-tip <?php if($this->cookie->theme == 'blue') echo 'noBorder';?>">
<p><span class="text-muted"><?php echo $lang->kanban->empty;?></span></p>
</div>
<?php endif;?>
+2
View File
@@ -114,10 +114,12 @@
<th><?php echo $lang->kanbancard->estimate;?></th>
<td><?php echo round($card->estimate, 2) . ' ' . $lang->kanbancard->lblHour;?></td>
</tr>
<?php if($card->progress):?>
<tr>
<th><?php echo $lang->kanbancard->progress;?></th>
<td><?php echo round($card->progress, 2) . ' %';?></td>
</tr>
<?php endif;?>
</tbody>
</table>
</div>
+12 -1
View File
@@ -75,7 +75,18 @@ class messageModel extends model
/* If it is an api call, get the request method set by the user. */
global $config;
$requestType = $config->requestType;
if(defined('RUN_MODE') and RUN_MODE == 'api') include $this->app->getConfigRoot() . 'config.php';
if(defined('RUN_MODE') and RUN_MODE == 'api')
{
$configRoot = $this->app->getConfigRoot();
if(file_exists($configRoot . 'my.php'))
{
include $configRoot . 'my.php';
}
else
{
include $configRoot . 'config.php';
}
}
$moduleName = $objectType == 'case' ? 'testcase' : $objectType;
$this->loadModel('mail')->sendmail($objectID, $actionID);
+1 -1
View File
@@ -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)'"));
}
}
+1 -1
View File
@@ -864,7 +864,7 @@ class programplanModel extends model
*/
public function isCreateTask($planID)
{
$task = $this->dao->select('*')->from(TABLE_TASK)->where('execution')->eq($planID)->limit(1)->fetch();
$task = $this->dao->select('*')->from(TABLE_TASK)->where('execution')->eq($planID)->andWhere('deleted')->eq('0')->limit(1)->fetch();
return empty($task) ? true : false;
}
+3 -6
View File
@@ -1535,6 +1535,7 @@ class projectModel extends model
$oldJoin = $this->dao->select('`account`, `join`')->from(TABLE_TEAM)->where('root')->eq($projectID)->andWhere('type')->eq($projectType)->fetchPairs();
$this->dao->delete()->from(TABLE_TEAM)->where('root')->eq($projectID)->andWhere('type')->eq($projectType)->exec();
$projectMember = array();
foreach($accounts as $key => $account)
{
if(empty($account)) continue;
@@ -1549,12 +1550,6 @@ class projectModel extends model
dao::$errors['message'][] = $this->lang->project->errorHours;
return false;
}
}
$projectMember = array();
foreach($accounts as $key => $account)
{
if(empty($account)) continue;
$member = new stdclass();
$member->role = $roles[$key];
@@ -1760,6 +1755,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;
+2 -3
View File
@@ -89,8 +89,8 @@
</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'>
<?php $hiddenDays = $model == 'scrum' ? '' : 'hidden';?>
<tr id='daysBox' class="<?php echo $hiddenDays;?>">
<th><?php echo $lang->execution->days;?></th>
<td>
<div class='input-group'>
@@ -99,7 +99,6 @@
</div>
</td><td></td><td></td>
</tr>
<?php endif;?>
<tr>
<th><?php echo $lang->project->manageProducts;?></th>
<td class='text-left' id='productsBox' colspan="3">
+2 -3
View File
@@ -102,8 +102,8 @@
<?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'";?>>
<?php $hidden = ($model != 'scrum' or $project->end == LONG_TIME) ? "class='hidden'" : '';?>
<tr id='daysBox' <?php echo $hidden;?>>
<th><?php echo $lang->project->days;?></th>
<td>
<div class='input-group'>
@@ -114,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">
+3 -2
View File
@@ -208,7 +208,7 @@ class storyModel extends model
->callFunc('title', 'trim')
->add('version', 1)
->add('status', 'draft')
->setDefault('plan,verify', '')
->setDefault('plan,verify,notifyEmail', '')
->setDefault('openedBy', $this->app->user->account)
->setDefault('openedDate', $now)
->setIF($this->post->needNotReview, 'status', 'active')
@@ -247,6 +247,7 @@ class storyModel extends model
->checkIF($story->notifyEmail, 'notifyEmail', 'email')
->batchCheck($requiredFields, 'notempty')
->exec();
if(!dao::isError())
{
$storyID = $this->dao->lastInsertID();
@@ -763,7 +764,7 @@ class storyModel extends model
->setDefault('assignedDate', $oldStory->assignedDate)
->setDefault('lastEditedBy', $this->app->user->account)
->add('lastEditedDate', $now)
->setDefault('plan', '')
->setDefault('plan,notifyEmail', '')
->setDefault('status', $oldStory->status)
->setDefault('product', $oldStory->product)
->setDefault('branch', $oldStory->branch)
+4
View File
@@ -459,6 +459,10 @@ class task extends control
$changes = $this->task->update($taskID);
if(dao::isError()) return print(js::error(dao::getError()));
$files = $this->loadModel('file')->saveUpload('task', $taskID);
if(empty($files) and $this->post->uid != '')
{
$files = $this->file->getPairs($_SESSION['album']['used'][$this->post->uid]);
}
}
$task = $this->task->getById($taskID);
+14 -1
View File
@@ -85,6 +85,18 @@ function copyStoryTitle(num)
/* Set the story module. */
function setStoryRelated(num)
{
setPreview(num);
}
/**
* Set preview.
*
* @param int $num
* @access public
* @return void
*/
function setPreview(num)
{
var storyID = $('#story' + num).val();
if(storyID != 0 && storyID != 'ditto')
@@ -224,6 +236,7 @@ $(document).on('chosen:showing_dropdown', 'select[name^="story"],.chosen-with-dr
$(select).trigger("change");
}
})
$(document).on('mousedown', 'select', function()
{
if($(this).val() == 'ditto')
@@ -253,7 +266,7 @@ $(function()
if($.cookie('zeroTask') == 'true') toggleZeroTaskStory();
markStoryTask();
if(storyID != 0) setStoryRelated(0);
if(storyID != 0) setStoryRelated($('#batchCreateForm table tbody tr:first [id^=story]:first').attr('id').replace('story', ''));
$(document).keydown(function(event)
{
+1
View File
@@ -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();
+1 -1
View File
@@ -93,7 +93,6 @@ js::set('dittoNotice', $dittoNotice);
$members = array('' => '', 'ditto' => $this->lang->task->ditto);
$teamAccounts = !empty($executionTeams[$tasks[$taskID]->execution]) ? array_keys($executionTeams[$tasks[$taskID]->execution]) : array();
foreach($teamAccounts as $teamAccount) $members[$teamAccount] = zget($users, $teamAccount);
$members['closed'] = 'Closed';
$taskMembers = array();
if(isset($teams[$taskID]))
@@ -103,6 +102,7 @@ js::set('dittoNotice', $dittoNotice);
}
else
{
if($tasks[$taskID]->status == 'closed') $members['closed'] = 'Closed';
$taskMembers = $members;
}
+12 -5
View File
@@ -39,6 +39,7 @@
}
}
$minWidth = (count($visibleFields) > 5) ? 'w-150px' : '';
$showVisionList = count($visionList) > 1;
?>
<form method='post' class='load-indicator main-form' enctype='multipart/form-data' target='hiddenwin' id="batchCreateForm">
<div class="table-responsive">
@@ -49,7 +50,9 @@
<th class='c-dept<?php echo zget($visibleFields, 'dept', ' hidden') . zget($requiredFields, 'dept', '', ' required');?>'> <?php echo $lang->user->dept;?></th>
<th class='accountThWidth required'><?php echo $lang->user->account;?></th>
<th class='c-realname required'><?php echo $lang->user->realname;?></th>
<th class='c-visions required'><?php echo $lang->user->visions;?></th>
<?php if($showVisionList):?>
<th class='c-visions required'><?php echo $lang->user->visions;?></th>
<?php endif;?>
<th class='c-role<?php echo zget($requiredFields, 'role', '', ' required')?>'><?php echo $lang->user->role;?></th>
<th class='c-group'><?php echo $lang->user->group;?></th>
<th class='<?php echo zget($visibleFields, 'email', "$minWidth hidden", $minWidth) . zget($requiredFields, 'email', '', ' required')?>'><?php echo $lang->user->email;?></th>
@@ -80,10 +83,14 @@
<td class='text-left<?php echo zget($visibleFields, 'dept', ' hidden')?>' style='overflow:visible'><?php echo html::select("dept[$i]", $depts, $i > 1 ? 'ditto' : $deptID, "class='form-control chosen'");?></td>
<td><?php echo html::input("account[$i]", '', "class='form-control account_$i' onchange='changeEmail($i)'");?></td>
<td><?php echo html::input("realname[$i]", '', "class='form-control'");?></td>
<td class="<?php echo $config->systemMode == 'new' ? 'text-left' : 'text-center';?>" style='overflow:visible'>
<?php if($config->systemMode == 'new') echo html::select("visions[$i][]", $visionList, $i > 1 ? 'ditto' : (isset($visionList[$this->config->vision]) ? $this->config->vision : key($visionList)), "class='form-control chosen' multiple");?>
<?php if($config->systemMode == 'classic') echo $visionList['rnd'] . html::hidden("visions[$i][]", 'rnd');?>
</td>
<?php if($showVisionList):?>
<td class="<?php echo $config->systemMode == 'new' ? 'text-left' : 'text-center';?>" style='overflow:visible'>
<?php if($config->systemMode == 'new') echo html::select("visions[$i][]", $visionList, $i > 1 ? 'ditto' : (isset($visionList[$this->config->vision]) ? $this->config->vision : key($visionList)), "class='form-control chosen' multiple");?>
<?php if($config->systemMode == 'classic') echo $visionList['rnd'] . html::hidden("visions[$i][]", 'rnd');?>
</td>
<?php else:?>
<?php echo html::hidden("visions[$i][]", $this->config->vision);?>
<?php endif;?>
<td><?php echo html::select("role[$i]", $lang->user->roleList, $i > 1 ? 'ditto' : '', "class='form-control' onchange='changeGroup(this.value, $i)'");?></td>
<td class='text-left' style='overflow:visible'><?php echo html::select("group[$i][]", $groupList, $i > 1 ? 'ditto' : '', "class='form-control chosen' multiple");?></td>
<td <?php echo zget($visibleFields, 'email', "class='hidden'")?>><?php echo html::input("email[$i]", '', "class='form-control email_$i' onchange='setDefaultEmail($i)'");?></td>
+10 -3
View File
@@ -38,6 +38,7 @@
}
}
$minWidth = (count($visibleFields) > 7) ? 'w-120px' : '';
$showVisionList = count($visionList) > 1;
?>
<form method='post' class='load-indicator main-form' enctype='multipart/form-data' target='hiddenwin' id="batchCreateForm">
<div class="table-responsive">
@@ -48,7 +49,9 @@
<th class='w-150px<?php echo zget($visibleFields, 'dept', ' hidden')?>'> <?php echo $lang->user->dept;?></th>
<th class='<?php echo $minWidth?> required'><?php echo $lang->user->account;?></th>
<th class='<?php echo $minWidth?> required'><?php echo $lang->user->realname;?></th>
<th class='w-130px required'><?php echo $lang->user->visions;?></th>
<?php if($showVisionList):?>
<th class='w-130px required'><?php echo $lang->user->visions;?></th>
<?php endif;?>
<th class='w-120px'><?php echo $lang->user->role;?></th>
<th class='w-120px'><?php echo $lang->user->type;?></th>
<th class='<?php echo $minWidth . zget($visibleFields, 'commiter', ' hidden')?>'><?php echo $lang->user->commiter;?></th>
@@ -82,8 +85,12 @@
<td class='text-left<?php echo zget($visibleFields, 'dept', ' hidden')?>' style='overflow:visible'><?php echo html::select("dept[$user->id]", $depts, $dept, "class='form-control chosen'");?></td>
<td><?php echo html::input("account[$user->id]", $user->account, "class='form-control'");?></td>
<td><?php echo html::input("realname[$user->id]", $user->realname, "class='form-control'");?></td>
<td class="<?php echo $config->systemMode == 'new' ? 'text-left' : 'text-center';?>"><?php echo $config->systemMode == 'new' ? html::select("visions[$user->id][]", $visionList, $user->visions, "class='form-control chosen' multiple") : $visionList['rnd'];?></td>
<?php if($config->systemMode == 'classic') echo html::hidden("visions[$user->id][]", 'rnd');?>
<?php if($showVisionList):?>
<td class="<?php echo $config->systemMode == 'new' ? 'text-left' : 'text-center';?>"><?php echo $config->systemMode == 'new' ? html::select("visions[$user->id][]", $visionList, $user->visions, "class='form-control chosen' multiple") : $visionList['rnd'];?></td>
<?php if($config->systemMode == 'classic') echo html::hidden("visions[$user->id][]", 'rnd');?>
<?php else:?>
<?php echo html::hidden("visions[$user->id][]", $this->config->vision);?>
<?php endif;?>
<td><?php echo html::select("role[$user->id]", $lang->user->roleList, $role, "class='form-control'");?></td>
<td><?php echo html::select("type[$user->id]", $lang->user->typeList, $type, "class='form-control'");?></td>
<td class='<?php echo zget($visibleFields, 'commiter', 'hidden')?>'><?php echo html::input("commiter[$user->id]", $user->commiter, "class='form-control'");?></td>
+6 -2
View File
@@ -16,6 +16,10 @@
<?php if(!empty($config->safe->mode)) $lang->user->placeholder->password1 = $lang->user->placeholder->passwordStrength[$config->safe->mode]?>
<?php js::set('holders', $lang->user->placeholder);?>
<?php js::set('roleGroup', $roleGroup);?>
<?php
$visionList = $this->user->getVisionList();
$showVisionList = count($visionList) > 1;
?>
<div id="mainContent" class="main-content">
<div class="center-block">
<div class="main-header">
@@ -60,9 +64,8 @@
<th><?php echo $lang->user->password2;?></th>
<td><?php echo html::password('password2', '', "class='form-control'");?></td>
</tr>
<tr>
<tr <?php if(!$showVisionList) echo "class='hide'";?>>
<th><?php echo $lang->user->visions;?></th>
<?php $visionList = $this->user->getVisionList();?>
<td><?php echo html::checkbox('visions', $visionList, isset($visionList[$this->config->vision]) ? $this->config->vision : key($visionList), "class='form-control'");?></td>
</tr>
<tr>
@@ -106,6 +109,7 @@
<tr>
<th></th>
<td class='text-center form-actions'>
<?php if(!$showVisionList) echo html::hidden("visions[]", $this->config->vision);?>
<?php echo html::submitButton();?>
<?php echo html::backButton();?>
</td>
+2
View File
@@ -114,6 +114,8 @@ class weeklyModel extends model
*/
public function save($project, $date)
{
$this->dao->delete()->from(TABLE_WEEKLYREPORT)->where('project')->eq($project)->exec();
$report = new stdclass;
$report->pv = $this->getPV($project, $date);
$report->ev = $this->getEV($project, $date);
+183
View File
@@ -626,6 +626,27 @@ class bugTest
}
}
/**
* Test get by Sonarqube id.
*
* @param int $sonarqubeID
* @access public
* @return int
*/
public function getBySonarqubeIDTest($sonarqubeID)
{
$array = $this->objectModel->getBySonarqubeID($sonarqubeID);
if(dao::isError())
{
return dao::getError();
}
else
{
return count($array);
}
}
/**
* Test get bug list of a plan.
*
@@ -1522,6 +1543,28 @@ class bugTest
}
}
/**
* Test get bug info from a result.
*
* @param int $runID
* @param int $caseID
* @access public
* @return string
*/
public function getBugInfoFromResultTest($resultID, $caseID = 0)
{
$array = $this->objectModel->getBugInfoFromResult($resultID, $caseID);
if(dao::isError())
{
return dao::getError();
}
else
{
return isset($array['title']) ? $array['title'] : 0;
}
}
/**
* Test get report data of bugs per execution.
*
@@ -1841,4 +1884,144 @@ class bugTest
return $array;
}
}
/**
* Test form customed bugs.
*
* @param array $bugIDList
* @access public
* @return array
*/
public function formCustomedBugsTest($bugIDList)
{
$bugs = $this->objectModel->getByList($bugIDList);
$array = $this->objectModel->formCustomedBugs($bugs);
if(dao::isError())
{
return dao::getError();
}
else
{
return $array;
}
}
/**
* Test adjust the action is clickable.
*
* @param object $bug
* @param string $action
* @access public
* @return int
*/
public function isClickableTest($bug, $action)
{
$object = $this->objectModel->isClickable($bug, $action);
if(dao::isError())
{
return dao::getError();
}
else
{
return $object ? 1 : 2;
}
}
/**
* Test link bug to build and release.
*
* @param array $bugIDList
* @param int $resolvedBuild
* @access public
* @return object
*/
public function linkBugToBuildTest($bugIDList, $resolvedBuild)
{
$this->objectModel->linkBugToBuild($bugIDList, $resolvedBuild);
global $tester;
$release = $tester->dao->select('id,bugs')->from(TABLE_RELEASE)->where('build')->eq($resolvedBuild)->andWhere('deleted')->eq('0')->fetch();
if(dao::isError())
{
return dao::getError();
}
else
{
return $release;
}
}
/**
* Test get toList and ccList.
*
* @param int $bugID
* @access public
* @return string
*/
public function getToAndCcListTest($bugID)
{
$bug = $this->objectModel->getByID($bugID);
$array = $this->objectModel->getToAndCcList($bug);
$account = '';
foreach($array as $value) $account .= ',' . $value;
$account = trim($account, ',');
if(dao::isError())
{
return dao::getError();
}
else
{
return $account;
}
}
/**
* Test get project list.
*
* @param int $productID
* @access public
* @return string
*/
public function getProjectsTest($productID)
{
$array = $this->objectModel->getProjects($productID);
$title = '';
foreach($array as $id => $project) $title .= ',' . $project;
$title = trim($title, ',');
if(dao::isError())
{
return dao::getError();
}
else
{
return $title;
}
}
/**
* Test get id list of all projects.
*
* @access public
* @return array
*/
public function getAllProjectIdsTest()
{
$array = $this->objectModel->getAllProjectIds();
if(dao::isError())
{
return dao::getError();
}
else
{
return $array;
}
}
}
+274
View File
@@ -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;
}
}
+103 -37
View File
@@ -58,6 +58,13 @@ class storyTest
return $objects;
}
/**
* Test get story specs.
*
* @param array $storyIdList
* @access public
* @return void
*/
public function getStorySpecsTest($storyIdList)
{
$objects = $this->objectModel->getStorySpecs($storyIdList);
@@ -67,85 +74,144 @@ class storyTest
return $objects;
}
public function getAffectedScopeTest($story)
/**
* Test get affected scope.
*
* @param int $storyID
* @access public
* @return void
*/
public function getAffectedScopeTest($storyID)
{
$objects = $this->objectModel->getAffectedScope($story);
global $tester;
$story = $tester->loadModel('story')->getById($storyID);
$scope = $this->objectModel->getAffectedScope($story);
if(dao::isError()) return dao::getError();
return $objects;
return $scope;
}
/**
* Test get requierements.
*
* @param int $productID
* @access public
* @return void
*/
public function getRequierementsTest($productID)
{
$objects = $this->objectModel->getRequierements($productID);
$requirements = $this->objectModel->getRequierements($productID);
if(dao::isError()) return dao::getError();
return $objects;
return $requirements;
}
public function createTest($executionID = 0, $bugID = 0, $from = '', $extra = '')
/**
* Test create story.
*
* @param int $executionID
* @param int $bugID
* @param string $from
* @param string $extra
* @access public
* @return void
*/
public function createTest($executionID = 0, $bugID = 0, $from = '', $extra = '', $params)
{
$objects = $this->objectModel->create($executionID = 0, $bugID = 0, $from = '', $extra = '');
$_POST = $params;
$result = $this->objectModel->create($executionID, $bugID, $from, $extra);
unset($_POST);
if(dao::isError()) return dao::getError();
return $objects;
global $tester;
$storyID = $result['id'];
return $tester->loadModel('story')->getById($storyID);
}
/**
* Test create story from gitlab issue.
*
* @param int $story
* @param int $executionID
* @access public
* @return void
*/
public function createStoryFromGitlabIssueTest($story, $executionID)
{
$objects = $this->objectModel->createStoryFromGitlabIssue($story, $executionID);
$storyID = $this->objectModel->createStoryFromGitlabIssue($story, $executionID);
if(dao::isError()) return dao::getError();
return $objects;
global $tester;
return $tester->loadModel('story')->getById($storyID);
}
public function batchCreateTest($productID = 0, $branch = 0, $type = 'story')
/**
* Test batch create stories.
*
* @param int $productID
* @param int $branch
* @param string $type
* @param array $params
* @access public
* @return void
*/
public function batchCreateTest($productID = 0, $branch = 0, $type = 'story', $params)
{
$objects = $this->objectModel->batchCreate($productID = 0, $branch = 0, $type = 'story');
$_POST = $params;
$results = $this->objectModel->batchCreate($productID, $branch, $type);
unset($_POST);
if(dao::isError()) return dao::getError();
return $objects;
foreach($results as $result) $storyIdList[] = $result->storyID;
global $tester;
$stories = $tester->loadModel('story')->getByList($storyIdList);
return $stories;
}
public function changeTest($storyID)
/**
* Test change story.
*
* @param int $storyID
* @param array $params
* @access public
* @return void
*/
public function changeTest($storyID, $params)
{
$objects = $this->objectModel->change($storyID);
$_POST = $params;
$this->objectModel->change($storyID);
unset($_POST);
if(dao::isError()) return dao::getError();
return $objects;
global $tester;
return $tester->loadModel('story')->getById($storyID);
}
public function updateTest($storyID)
/**
* Test update story.
*
* @param int $storyID
* @param array $params
* @access public
* @return void
*/
public function updateTest($storyID, $params)
{
$objects = $this->objectModel->update($storyID);
$_POST = $params;
$this->objectModel->update($storyID);
unset($_POST);
if(dao::isError()) return dao::getError();
return $objects;
}
public function updateStoryProductTest($storyID, $productID)
{
$objects = $this->objectModel->updateStoryProduct($storyID, $productID);
if(dao::isError()) return dao::getError();
return $objects;
}
public function updateParentStatusTest($storyID, $parentID = 0, $createAction = true)
{
$objects = $this->objectModel->updateParentStatus($storyID, $parentID = 0, $createAction = true);
if(dao::isError()) return dao::getError();
return $objects;
global $tester;
return $tester->loadModel('story')->getById($storyID);
}
public function updateStoryVersionTest($story)
+1 -1
View File
@@ -61,7 +61,7 @@ fields:
- field: activatedCount
range: 0
- field: mailto
range: []
range: admin{100},[]{200}
- field: openedBy
range: admin
- field: openedDate
+7 -7
View File
@@ -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
+54
View File
@@ -0,0 +1,54 @@
title: table zt_casestep
desc: "用例步骤"
author: automated export
version: "1.0"
fields:
- field: id
note: "ID"
range: "1-400"
prefix: ""
postfix: ""
loop: 0
format: ""
- field: parent
note: "上级ID"
range: "0"
prefix: ""
postfix: ""
loop: 0
format: ""
- field: case
note: "所属用例ID"
range: "1-400"
prefix: ""
postfix: ""
loop: 0
format: ""
- field: version
note: "用例版本"
range: "1"
prefix: ""
postfix: ""
loop: 0
format: ""
- field: type
note: "用例类型"
range: "step"
prefix: ""
postfix: ""
loop: 0
format: ""
- field: desc
note: "用例步骤"
range: "1-10000"
prefix: "用例步骤描述"
postfix: ""
loop: 0
format: ""
- field: expect
note: "预期"
range: "1-10000"
prefix: "这是用例预期结果"
postfix: ""
loop: 0
format: ""
+131
View File
@@ -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
+82
View File
@@ -0,0 +1,82 @@
title: table zt_relation
desc: "需求关系"
author: automated export
version: "1.0"
fields:
- field: id
note: "ID"
range: 1-10000
prefix: ""
postfix: ""
loop: 0
format: ""
- field: product
note: "所属产品"
range: 7{4},8{4},9{4}
prefix: ""
postfix: ""
loop: 0
format: ""
- field: project
note: "所属阶段"
range: 0
prefix: ""
postfix: ""
loop: 0
format: ""
- field: AType
note: "需求类型"
range: requirement,story
prefix: ""
postfix: ""
loop: 0
format: ""
- field: AID
note: "自身ID"
range: 25-36
prefix: ""
postfix: ""
loop: 0
format: ""
- field: AVersion
note: "自身版本"
range: 2
prefix: ""
postfix: ""
loop: 0
format: ""
- field: relation
note: "关联关系"
range: subdivideinto,subdividedfrom
prefix: ""
postfix: ""
loop: 0
format: ""
- field: BType
note: "被关联需求类型"
range: story,requirement
prefix: ""
postfix: ""
loop: 0
format: ""
- field: BID
note: "被关联需求ID"
range: 26,25,28,27,30,29,32,31,34,33,36,35
prefix: ""
postfix: ""
loop: 0
format: ""
- field: BVersion
note: "被关联版本"
range: 2
prefix: ""
postfix: ""
loop: 0
format: ""
- field: extra
note: ""
range: 1
prefix: ""
postfix: ""
loop: 0
format: ""
+97
View File
@@ -0,0 +1,97 @@
title: table zt_testresult
desc: "测试结果"
author: automated export
version: "1.0"
fields:
- field: id
note: "ID"
range: 1-40
prefix: ""
postfix: ""
loop: 0
format: ""
- field: run
note: "运行"
range: 1-40
prefix: ""
postfix: ""
loop: 0
format: ""
- field: case
note: "用例ID"
range: 1-400
prefix: ""
postfix: ""
loop: 0
format: ""
- field: version
note: "用例版本"
range: 1
prefix: ""
postfix: ""
loop: 0
format: ""
- field: job
note: "工作"
range: 0
prefix: ""
postfix: ""
loop: 0
format: ""
- field: compile
note: "编译"
range: 0
prefix: ""
postfix: ""
loop: 0
format: ""
- field: caseResult
note: "测试结果"
range: pass,fail
prefix: ""
postfix: ""
loop: 0
format: ""
- field: stepResults
note: "步骤结果"
range: "php处理"
prefix: ""
postfix: ""
loop: 0
format: ""
- field: lastRunner
note: "最后执行人"
range: admin
prefix: ""
postfix: ""
loop: 0
format: ""
- field: date
note: "测试时间"
range: "(M)-(w):60"
type: timestamp
prefix: ""
postfix: ""
loop: 0
format: "YYYY-MM-DD hh:mm:ss"
- field: duration
note: "持续时间"
range: 0
prefix: ""
postfix: ""
loop: 0
format: ""
- field: xml
note: "XMl格式"
range: ""
prefix: ""
postfix: ""
loop: 0
format: ""
- field: deploy
note: "部署"
range: 0
prefix: ""
postfix: ""
loop: 0
format: ""
+69
View File
@@ -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: ""
+126
View File
@@ -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: ""
+8 -1
View File
@@ -19,6 +19,7 @@ $builder->story = array('rows' => 400, 'extends' => array('story'));
$builder->storymodule = array('rows' => 800, 'extends' => array('module','storymodule'));
$builder->storyplan = array('rows' => 400, 'extends' => array('planstory'));
$builder->storyspec = array('rows' => 60, 'extends' => array('storyspec'));
$builder->relation = array('rows' => 12, 'extends' => array('relation'));
$builder->task = array('rows' => 600, 'extends' => array('task','task'));
$builder->taskmore = array('rows' => 300, 'extends' => array('task','moretask'));
$builder->taskspec = array('rows' => 600, 'extends' => array('taskspec'));
@@ -26,7 +27,13 @@ $builder->taskmodule = array('rows' => 1800, 'extends' => array('module','task
$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->casestep = array('rows' => 400, 'extends' => array('casestep'));
$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->testresult = array('rows' => 40, 'extends' => array('testresult'));
$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 +68,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'));
+30
View File
@@ -46,6 +46,8 @@ class Processor
$this->initUserquery();
$this->initUpdateKanban();
$this->initStory();
$this->initBug();
$this->initTest();
$this->dao->commit();
}
@@ -156,6 +158,34 @@ class Processor
$this->dao->update(TABLE_STORY)->set('`status`')->eq('active')->where('id')->le('20')->exec();
}
/**
* Init Test.
*
* @access private
* @return void
*/
private function initBug()
{
$this->dao->update(TABLE_BUG)->set('`issueKey`')->eq('2:AX-W7K3_L7H_36P3H4le')->where('issueKey')->eq('17')->exec();
}
private function initTest()
{
$testResults = $this->dao->select('*')->from(TABLE_TESTRESULT)->fetchAll();
foreach($testResults as $testResult)
{
if($testResult->caseResult == 'fail')
{
$this->dao->update(TABLE_TESTRESULT)->set('`stepResults`')->eq('a:1:{i:'.$testResult->run.';a:2:{s:6:\"result\";s:4:\"fail\";s:4:\"real\";s:0:\"\";}}')->where('id')->eq($testResult->id)->exec();
}
else
{
$this->dao->update(TABLE_TESTRESULT)->set('`stepResults`')->eq('a:1:{i:'.$testResult->run.';a:2:{s:6:\"result\";s:4:\"pass\";s:4:\"real\";s:0:\"\";}}')->where('id')->eq($testResult->id)->exec();
}
}
}
/**
* Init product plan.
*
+32
View File
@@ -0,0 +1,32 @@
#!/usr/bin/env php
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/bug.class.php';
su('admin');
/**
title=测试bugModel->formCustomedBugs();
cid=1
pid=1
获取bug 1 2的module story task case execution名称 >> 产品模块1,软件需求2,0,0,迭代1;产品模块2,软件需求6,0,0,迭代1
获取bug 3 4的module story task case execution名称 >> 产品模块3,软件需求10,0,0,迭代1;产品模块5,软件需求14,0,0,迭代2
获取bug 5 6的module story task case execution名称 >> 产品模块6,软件需求18,0,0,迭代2;产品模块7,软件需求22,0,0,迭代2
获取bug 7 8的module story task case execution名称 >> 产品模块11,软件需求26,0,0,迭代3;产品模块12,软件需求30,0,0,迭代3
获取bug 9 10的module story task case execution名称 >> 产品模块13,软件需求34,0,0,迭代3;0,软件需求38,0,0,迭代4
*/
$bugIDList1 = array('1', '2');
$bugIDList2 = array('3', '4');
$bugIDList3 = array('5', '6');
$bugIDList4 = array('7', '8');
$bugIDList5 = array('9', '10');
$bug = new bugTest();
r($bug->formCustomedBugsTest($bugIDList1)) && p('1:module,story,task,case,execution;2:module,story,task,case,execution') && e('产品模块1,软件需求2,0,0,迭代1;产品模块2,软件需求6,0,0,迭代1'); // 获取bug 1 2的module story task case execution名称
r($bug->formCustomedBugsTest($bugIDList2)) && p('3:module,story,task,case,execution;4:module,story,task,case,execution') && e('产品模块3,软件需求10,0,0,迭代1;产品模块5,软件需求14,0,0,迭代2'); // 获取bug 3 4的module story task case execution名称
r($bug->formCustomedBugsTest($bugIDList3)) && p('5:module,story,task,case,execution;6:module,story,task,case,execution') && e('产品模块6,软件需求18,0,0,迭代2;产品模块7,软件需求22,0,0,迭代2'); // 获取bug 5 6的module story task case execution名称
r($bug->formCustomedBugsTest($bugIDList4)) && p('7:module,story,task,case,execution;8:module,story,task,case,execution') && e('产品模块11,软件需求26,0,0,迭代3;产品模块12,软件需求30,0,0,迭代3'); // 获取bug 7 8的module story task case execution名称
r($bug->formCustomedBugsTest($bugIDList5)) && p('9:module,story,task,case,execution;10:module,story,task,case,execution') && e('产品模块13,软件需求34,0,0,迭代3;0,软件需求38,0,0,迭代'); // 获取bug 9 10的module story task case execution名称
+29
View File
@@ -0,0 +1,29 @@
#!/usr/bin/env php
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php'; su('admin');
include dirname(dirname(dirname(__FILE__))) . '/class/bug.class.php';
/**
title=bugModel->getAllProjectIds();
cid=1
pid=1
测试projectId为11的项目 >> 11
测试projectId为12的项目 >> 12
测试projectId为13的项目 >> 13
测试projectId为41的项目 >> 41
测试projectId为51的项目 >> 51
测试projectId为91的项目 >> 91
*/
$projectIDList = array('11', '12', '13', '41', '51', '91');
$bug=new bugTest();
r($bug->getAllProjectIdsTest()) && p("$projectIDList[0]") && e('11'); // 测试projectId为11的项目
r($bug->getAllProjectIdsTest()) && p("$projectIDList[1]") && e('12'); // 测试projectId为12的项目
r($bug->getAllProjectIdsTest()) && p("$projectIDList[2]") && e('13'); // 测试projectId为13的项目
r($bug->getAllProjectIdsTest()) && p("$projectIDList[3]") && e('41'); // 测试projectId为41的项目
r($bug->getAllProjectIdsTest()) && p("$projectIDList[4]") && e('51'); // 测试projectId为51的项目
r($bug->getAllProjectIdsTest()) && p("$projectIDList[5]") && e('91'); // 测试projectId为91的项目
+28 -16
View File
@@ -5,29 +5,41 @@ include dirname(dirname(dirname(__FILE__))) . '/class/bug.class.php';
/**
title=bugModel->getExecutionBugs();
title=bugModel->getBugInfoFromResult();
cid=1
pid=1
测试获取执行ID为101的bug >> BUG3,BUG2,BUG1
测试获取执行ID为102的bug >> BUG6,BUG5,BUG4
测试获取执行ID为103的bug >> BUG9,bug8,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7
测试获取执行ID为104的bug >> BUG12,BUG11,BUG10
测试获取执行ID为105的bug >> 缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();15,BUG14,BUG13
测试获取执行ID为106的bug >> BUG18,BUG17,bug16
测试获取不存在的执行的bug >> 0
测试获取runID为0 caseID为2的bug >> 这个是测试用例2
测试获取runID为0 caseID为6的bug >> 这个是测试用例6
测试获取runID为0 caseID为10的bug >> 这个是测试用例10
测试获取runID为2 caseID为2的bug >> 这个是测试用例2
测试获取runID为2 caseID为6的bug >> 这个是测试用例6
测试获取runID为2 caseID为10的bug >> 这个是测试用例10
测试获取runID为6 caseID为2的bug >> 这个是测试用例2
测试获取runID为6 caseID为6的bug >> 这个是测试用例6
测试获取runID为6 caseID为10的bug >> 这个是测试用例10
测试获取runID为10 caseID为2的bug >> 这个是测试用例2
测试获取runID为10 caseID为6的bug >> 这个是测试用例6
测试获取runID为10 caseID为10的bug >> 这个是测试用例10
*/
$executionIDList = array('101', '102', '103', '104', '105', '106', '1000001');
$runIDList = array('0', '2', '6', '10');
$caseIDList = array('0', '2', '6', '10');
$bug=new bugTest();
r($bug->getExecutionBugsTest($executionIDList[0])) && p() && e('BUG3,BUG2,BUG1'); // 测试获取执行ID为101的bug
r($bug->getExecutionBugsTest($executionIDList[1])) && p() && e('BUG6,BUG5,BUG4'); // 测试获取执行ID为102的bug
r($bug->getExecutionBugsTest($executionIDList[2])) && p() && e('BUG9,bug8,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7'); // 测试获取执行ID为103的bug
r($bug->getExecutionBugsTest($executionIDList[3])) && p() && e('BUG12,BUG11,BUG10'); // 测试获取执行ID为104的bug
r($bug->getExecutionBugsTest($executionIDList[4])) && p() && e('缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();15,BUG14,BUG13'); // 测试获取执行ID为105的bug
r($bug->getExecutionBugsTest($executionIDList[5])) && p() && e('BUG18,BUG17,bug16'); // 测试获取执行ID为106的bug
r($bug->getExecutionBugsTest($executionIDList[6])) && p() && e('0'); // 测试获取不存在的执行的bug
r($bug->getBugInfoFromResultTest($runIDList[0], $caseIDList[1])) && p() && e('这个是测试用例2'); // 测试获取runID为0 caseID为2的bug
r($bug->getBugInfoFromResultTest($runIDList[0], $caseIDList[2])) && p() && e('这个是测试用例6'); // 测试获取runID为0 caseID为6的bug
r($bug->getBugInfoFromResultTest($runIDList[0], $caseIDList[3])) && p() && e('这个是测试用例10'); // 测试获取runID为0 caseID为10的bug
r($bug->getBugInfoFromResultTest($runIDList[1], $caseIDList[1])) && p() && e('这个是测试用例2'); // 测试获取runID为2 caseID为2的bug
r($bug->getBugInfoFromResultTest($runIDList[1], $caseIDList[2])) && p() && e('这个是测试用例6'); // 测试获取runID为2 caseID为6的bug
r($bug->getBugInfoFromResultTest($runIDList[1], $caseIDList[3])) && p() && e('这个是测试用例10'); // 测试获取runID为2 caseID为10的bug
r($bug->getBugInfoFromResultTest($runIDList[2], $caseIDList[1])) && p() && e('这个是测试用例2'); // 测试获取runID为6 caseID为2的bug
r($bug->getBugInfoFromResultTest($runIDList[2], $caseIDList[2])) && p() && e('这个是测试用例6'); // 测试获取runID为6 caseID为6的bug
r($bug->getBugInfoFromResultTest($runIDList[2], $caseIDList[3])) && p() && e('这个是测试用例10'); // 测试获取runID为6 caseID为10的bug
r($bug->getBugInfoFromResultTest($runIDList[3], $caseIDList[1])) && p() && e('这个是测试用例2'); // 测试获取runID为10 caseID为2的bug
r($bug->getBugInfoFromResultTest($runIDList[3], $caseIDList[2])) && p() && e('这个是测试用例6'); // 测试获取runID为10 caseID为6的bug
r($bug->getBugInfoFromResultTest($runIDList[3], $caseIDList[3])) && p() && e('这个是测试用例10'); // 测试获取runID为10 caseID为10的bug
+23
View File
@@ -0,0 +1,23 @@
#!/usr/bin/env php
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php'; su('admin');
include dirname(dirname(dirname(__FILE__))) . '/class/bug.class.php';
/**
title=bugModel->getBySonarqubeID();
cid=1
pid=1
获取sonarqubeID为0的bug issueKey数量 >> 0
获取sonarqubeID为2的bug issueKey数量 >> 1
*/
$sonarqubeIDList = array('0', '2');
$bug=new bugTest();
r($bug->getBySonarqubeIDTest($sonarqubeIDList[0])) && p() && e('0'); //获取sonarqubeID为0的bug issueKey数量
r($bug->getBySonarqubeIDTest($sonarqubeIDList[1])) && p() && e('1'); //获取sonarqubeID为2的bug issueKey数量
+67
View File
@@ -0,0 +1,67 @@
#!/usr/bin/env php
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php'; su('admin');
include dirname(dirname(dirname(__FILE__))) . '/class/bug.class.php';
/**
title=bugModel->getCaseBugs();
cid=1
pid=1
测试获取runID为0 caseID为2的bug >> 测试单转Bug1,测试单转Bug11
测试获取runID为0 caseID为6的bug >> SonarQube_Bug2,SonarQube_Bug12
测试获取runID为0 caseID为10的bug >> 测试单转Bug3,测试单转Bug13
测试获取runID为0 caseID不存在的bug >> 0
测试获取runID为2 caseID为0的bug >> 测试单转Bug1,测试单转Bug11
测试获取runID为2 caseID为2的bug >> 测试单转Bug1,测试单转Bug11
测试获取runID为2 caseID为6的bug >> 测试单转Bug1,测试单转Bug11
测试获取runID为2 caseID为10的bug >> 测试单转Bug1,测试单转Bug11
测试获取runID为2 caseID不存在的bug >> 测试单转Bug1,测试单转Bug11
测试获取runID为6 caseID为0的bug >> SonarQube_Bug2,SonarQube_Bug12
测试获取runID为6 caseID为2的bug >> SonarQube_Bug2,SonarQube_Bug12
测试获取runID为6 caseID为6的bug >> SonarQube_Bug2,SonarQube_Bug12
测试获取runID为6 caseID为10的bug >> SonarQube_Bug2,SonarQube_Bug12
测试获取runID为6 caseID不存在的bug >> SonarQube_Bug2,SonarQube_Bug12
测试获取runID为10 caseID为0的bug >> 测试单转Bug3,测试单转Bug13
测试获取runID为10 caseID为2的bug >> 测试单转Bug3,测试单转Bug13
测试获取runID为10 caseID为6的bug >> 测试单转Bug3,测试单转Bug13
测试获取runID为10 caseID为10的bug >> 测试单转Bug3,测试单转Bug13
测试获取runID为10 caseID不存在的bug >> 测试单转Bug3,测试单转Bug13
测试获取runID为不存在 caseID为0的bug >> 0
测试获取runID为不存在 caseID为2的bug >> 0
测试获取runID为不存在 caseID为6的bug >> 0
测试获取runID为不存在 caseID为10的bug >> 0
测试获取runID为不存在 caseID不存在的bug >> 0
*/
$runIDList = array('0', '2', '6', '10', '1000001');
$caseIDList = array('0', '2', '6', '10', '1000001');
$bug=new bugTest();
r($bug->getCaseBugsTest($runIDList[0], $caseIDList[1])) && p() && e('测试单转Bug1,测试单转Bug11'); // 测试获取runID为0 caseID为2的bug
r($bug->getCaseBugsTest($runIDList[0], $caseIDList[2])) && p() && e('SonarQube_Bug2,SonarQube_Bug12'); // 测试获取runID为0 caseID为6的bug
r($bug->getCaseBugsTest($runIDList[0], $caseIDList[3])) && p() && e('测试单转Bug3,测试单转Bug13'); // 测试获取runID为0 caseID为10的bug
r($bug->getCaseBugsTest($runIDList[0], $caseIDList[4])) && p() && e('0 '); // 测试获取runID为0 caseID不存在的bug
r($bug->getCaseBugsTest($runIDList[1], $caseIDList[0])) && p() && e('测试单转Bug1,测试单转Bug11'); // 测试获取runID为2 caseID为0的bug
r($bug->getCaseBugsTest($runIDList[1], $caseIDList[1])) && p() && e('测试单转Bug1,测试单转Bug11'); // 测试获取runID为2 caseID为2的bug
r($bug->getCaseBugsTest($runIDList[1], $caseIDList[2])) && p() && e('测试单转Bug1,测试单转Bug11'); // 测试获取runID为2 caseID为6的bug
r($bug->getCaseBugsTest($runIDList[1], $caseIDList[3])) && p() && e('测试单转Bug1,测试单转Bug11'); // 测试获取runID为2 caseID为10的bug
r($bug->getCaseBugsTest($runIDList[1], $caseIDList[4])) && p() && e('测试单转Bug1,测试单转Bug11'); // 测试获取runID为2 caseID不存在的bug
r($bug->getCaseBugsTest($runIDList[2], $caseIDList[0])) && p() && e('SonarQube_Bug2,SonarQube_Bug12'); // 测试获取runID为6 caseID为0的bug
r($bug->getCaseBugsTest($runIDList[2], $caseIDList[1])) && p() && e('SonarQube_Bug2,SonarQube_Bug12'); // 测试获取runID为6 caseID为2的bug
r($bug->getCaseBugsTest($runIDList[2], $caseIDList[2])) && p() && e('SonarQube_Bug2,SonarQube_Bug12'); // 测试获取runID为6 caseID为6的bug
r($bug->getCaseBugsTest($runIDList[2], $caseIDList[3])) && p() && e('SonarQube_Bug2,SonarQube_Bug12'); // 测试获取runID为6 caseID为10的bug
r($bug->getCaseBugsTest($runIDList[2], $caseIDList[4])) && p() && e('SonarQube_Bug2,SonarQube_Bug12'); // 测试获取runID为6 caseID不存在的bug
r($bug->getCaseBugsTest($runIDList[3], $caseIDList[0])) && p() && e('测试单转Bug3,测试单转Bug13'); // 测试获取runID为10 caseID为0的bug
r($bug->getCaseBugsTest($runIDList[3], $caseIDList[1])) && p() && e('测试单转Bug3,测试单转Bug13'); // 测试获取runID为10 caseID为2的bug
r($bug->getCaseBugsTest($runIDList[3], $caseIDList[2])) && p() && e('测试单转Bug3,测试单转Bug13'); // 测试获取runID为10 caseID为6的bug
r($bug->getCaseBugsTest($runIDList[3], $caseIDList[3])) && p() && e('测试单转Bug3,测试单转Bug13'); // 测试获取runID为10 caseID为10的bug
r($bug->getCaseBugsTest($runIDList[3], $caseIDList[4])) && p() && e('测试单转Bug3,测试单转Bug13'); // 测试获取runID为10 caseID不存在的bug
r($bug->getCaseBugsTest($runIDList[4], $caseIDList[0])) && p() && e('0'); // 测试获取runID为不存在 caseID为0的bug
r($bug->getCaseBugsTest($runIDList[4], $caseIDList[1])) && p() && e('0'); // 测试获取runID为不存在 caseID为2的bug
r($bug->getCaseBugsTest($runIDList[4], $caseIDList[2])) && p() && e('0'); // 测试获取runID为不存在 caseID为6的bug
r($bug->getCaseBugsTest($runIDList[4], $caseIDList[3])) && p() && e('0'); // 测试获取runID为不存在 caseID为10的bug
r($bug->getCaseBugsTest($runIDList[4], $caseIDList[4])) && p() && e('0'); // 测试获取runID为不存在 caseID不存在的bug
@@ -9,10 +9,10 @@ title=bugModel->getDataOfBugsPerActivatedCount();
cid=1
pid=1
获取bug激活次数数据 >> 激活次数:0,300
获取bug激活次数数据 >> 激活次数:0,315
*/
$bug=new bugTest();
r($bug->getDataOfBugsPerActivatedCountTest()) && p('0:name,value') && e('激活次数:0,300'); // 获取bug激活次数数据
r($bug->getDataOfBugsPerActivatedCountTest()) && p('0:name,value') && e('激活次数:0,315'); // 获取bug激活次数数据
@@ -9,9 +9,9 @@ title=bugModel->getDataOfBugsPerAssignedTo();
cid=1
pid=1
获取用户admin数据 >> admin,80
获取用户dev1数据 >> 开发1,80
获取用户test1数据 >> 测试1,80
获取用户admin数据 >> admin,85
获取用户dev1数据 >> 开发1,85
获取用户test1数据 >> 测试1,85
获取用户closed数据 >> Closed,20
*/
@@ -19,6 +19,6 @@ pid=1
$bug=new bugTest();
r($bug->getDataOfBugsPerAssignedToTest()) && p('admin:name,value') && e('admin,80'); // 获取用户admin数据
r($bug->getDataOfBugsPerAssignedToTest()) && p('dev1:name,value') && e('dev1,80'); // 获取用户dev1数据
r($bug->getDataOfBugsPerAssignedToTest()) && p('test1:name,value') && e('test1,80'); // 获取用户test1数据
r($bug->getDataOfBugsPerAssignedToTest()) && p('closed:name,value') && e('closed,20'); // 获取用户closed数据
r($bug->getDataOfBugsPerAssignedToTest()) && p('dev1:name,value') && e('开发1,85'); // 获取用户dev1数据
r($bug->getDataOfBugsPerAssignedToTest()) && p('test1:name,value') && e('测试1,85'); // 获取用户test1数据
r($bug->getDataOfBugsPerAssignedToTest()) && p('closed:name,value') && e('Closed,20'); // 获取用户closed数据
+2 -2
View File
@@ -11,7 +11,7 @@ pid=1
获取主干bug数 >> 主干,291
获取bug数 >> ,3
获取迭代版本版本1bug数 >> 迭代版本版本1,6
获取项目版本版本1bug数 >> 项目版本版本1,6
*/
@@ -19,4 +19,4 @@ pid=1
$bug=new bugTest();
r($bug->getDataOfBugsPerBuildTest()) && p('trunk:name,value') && e('主干,291'); // 获取主干bug数
r($bug->getDataOfBugsPerBuildTest()) && p('0:name,value') && e(',3'); // 获取bug数
r($bug->getDataOfBugsPerBuildTest()) && p('1:name,value') && e('迭代版本版本1,6'); // 获取迭代版本版本1bug数
r($bug->getDataOfBugsPerBuildTest()) && p('1:name,value') && e('迭代版本版本1,6'); // 获取项目版本版本1bug数
+6 -6
View File
@@ -9,9 +9,9 @@ title=bugModel->getDataOfBugsPerExecution();
cid=1
pid=1
获取执行101数据 >> 迭代1,3,迭代1
获取执行102数据 >> 迭代2,3,迭代2
获取执行103数据 >> 迭代3,3,迭代3
获取执行101数据 >> 迭代1,4,迭代1
获取执行102数据 >> 迭代2,4,迭代2
获取执行103数据 >> 迭代3,4,迭代3
获取执行131数据 >> 阶段31,3,阶段31
获取执行132数据 >> 阶段32,3,阶段32
获取执行133数据 >> 阶段33,3,阶段33
@@ -23,9 +23,9 @@ pid=1
$bug=new bugTest();
r($bug->getDataOfBugsPerExecutionTest()) && p('101:name,value,title') && e('迭代1,3,迭代1'); // 获取执行101数据
r($bug->getDataOfBugsPerExecutionTest()) && p('102:name,value,title') && e('迭代2,3,迭代2'); // 获取执行102数据
r($bug->getDataOfBugsPerExecutionTest()) && p('103:name,value,title') && e('迭代3,3,迭代3'); // 获取执行103数据
r($bug->getDataOfBugsPerExecutionTest()) && p('101:name,value,title') && e('迭代1,4,迭代1'); // 获取执行101数据
r($bug->getDataOfBugsPerExecutionTest()) && p('102:name,value,title') && e('迭代2,4,迭代2'); // 获取执行102数据
r($bug->getDataOfBugsPerExecutionTest()) && p('103:name,value,title') && e('迭代3,4,迭代3'); // 获取执行103数据
r($bug->getDataOfBugsPerExecutionTest()) && p('131:name,value,title') && e('阶段31,3,阶段31'); // 获取执行131数据
r($bug->getDataOfBugsPerExecutionTest()) && p('132:name,value,title') && e('阶段32,3,阶段32'); // 获取执行132数据
r($bug->getDataOfBugsPerExecutionTest()) && p('133:name,value,title') && e('阶段33,3,阶段33'); // 获取执行133数据
+11 -11
View File
@@ -9,7 +9,7 @@ title=bugModel->getDataOfBugsPerModule();
cid=1
pid=1
获取module0数据 >> /,291
获取module0数据 >> /,306
获取module1821数据 >> /产品模块1,1
获取module1822数据 >> /产品模块2,1
获取module1823数据 >> /产品模块3,1
@@ -25,13 +25,13 @@ pid=1
$bug=new bugTest();
r($bug->getDataOfBugsPerModuleTest()) && p('0:name,value') && e('/,291'); // 获取module0数据
r($bug->getDataOfBugsPerModuleTest()) && p('1821:name,value') && e('/产品模块1821,1'); // 获取module1821数据
r($bug->getDataOfBugsPerModuleTest()) && p('1822:name,value') && e('/产品模块1822,1'); // 获取module1822数据
r($bug->getDataOfBugsPerModuleTest()) && p('1823:name,value') && e('/产品模块1823,1'); // 获取module1823数据
r($bug->getDataOfBugsPerModuleTest()) && p('1825:name,value') && e('/产品模块1825,1'); // 获取module1825数据
r($bug->getDataOfBugsPerModuleTest()) && p('1826:name,value') && e('/产品模块1826,1'); // 获取module1826数据
r($bug->getDataOfBugsPerModuleTest()) && p('1827:name,value') && e('/产品模块1827,1'); // 获取module1827数据
r($bug->getDataOfBugsPerModuleTest()) && p('1831:name,value') && e('/产品模块1831,1'); // 获取module1831数据
r($bug->getDataOfBugsPerModuleTest()) && p('1832:name,value') && e('/产品模块1832,1'); // 获取module1832数据
r($bug->getDataOfBugsPerModuleTest()) && p('1833:name,value') && e('/产品模块1833,1'); // 获取module1833数据
r($bug->getDataOfBugsPerModuleTest()) && p('0:name,value') && e('/,306'); // 获取module0数据
r($bug->getDataOfBugsPerModuleTest()) && p('1821:name,value') && e('/产品模块1,1'); // 获取module1821数据
r($bug->getDataOfBugsPerModuleTest()) && p('1822:name,value') && e('/产品模块2,1'); // 获取module1822数据
r($bug->getDataOfBugsPerModuleTest()) && p('1823:name,value') && e('/产品模块3,1'); // 获取module1823数据
r($bug->getDataOfBugsPerModuleTest()) && p('1825:name,value') && e('/产品模块5,1'); // 获取module1825数据
r($bug->getDataOfBugsPerModuleTest()) && p('1826:name,value') && e('/产品模块6,1'); // 获取module1826数据
r($bug->getDataOfBugsPerModuleTest()) && p('1827:name,value') && e('/产品模块7,1'); // 获取module1827数据
r($bug->getDataOfBugsPerModuleTest()) && p('1831:name,value') && e('/产品模块11,1'); // 获取module1831数据
r($bug->getDataOfBugsPerModuleTest()) && p('1832:name,value') && e('/产品模块12,1'); // 获取module1832数据
r($bug->getDataOfBugsPerModuleTest()) && p('1833:name,value') && e('/产品模块13,1'); // 获取module1833数据
+8 -8
View File
@@ -9,16 +9,16 @@ title=bugModel->getDataOfBugsPerPri();
cid=1
pid=1
获取pri为1的数据 >> 优先级:1,75
获取pri为2的数据 >> 优先级:2,75
获取pri为3的数据 >> 优先级:3,75
获取pri为4的数据 >> 优先级:4,75
获取pri为1的数据 >> 优先级:1,79
获取pri为2的数据 >> 优先级:2,79
获取pri为3的数据 >> 优先级:3,79
获取pri为4的数据 >> 优先级:4,78
*/
$bug=new bugTest();
r($bug->getDataOfBugsPerPriTest()) && p('1:name,value') && e('优先级:1,75'); // 获取pri为1的数据
r($bug->getDataOfBugsPerPriTest()) && p('2:name,value') && e('优先级:2,75'); // 获取pri为2的数据
r($bug->getDataOfBugsPerPriTest()) && p('3:name,value') && e('优先级:3,75'); // 获取pri为3的数据
r($bug->getDataOfBugsPerPriTest()) && p('4:name,value') && e('优先级:4,75'); // 获取pri为4的数据
r($bug->getDataOfBugsPerPriTest()) && p('1:name,value') && e('优先级:1,79'); // 获取pri为1的数据
r($bug->getDataOfBugsPerPriTest()) && p('2:name,value') && e('优先级:2,79'); // 获取pri为2的数据
r($bug->getDataOfBugsPerPriTest()) && p('3:name,value') && e('优先级:3,79'); // 获取pri为3的数据
r($bug->getDataOfBugsPerPriTest()) && p('4:name,value') && e('优先级:4,78'); // 获取pri为4的数据
+8 -8
View File
@@ -9,16 +9,16 @@ title=bugModel->getDataOfBugsPerSeverity();
cid=1
pid=1
获取严重程度1数据 >> 1,75
获取严重程度2数据 >> 2,75
获取严重程度3数据 >> 3,75
获取严重程度4数据 >> 4,75
获取严重程度1数据 >> 1,79
获取严重程度2数据 >> 2,79
获取严重程度3数据 >> 3,79
获取严重程度4数据 >> 4,78
*/
$bug=new bugTest();
r($bug->getDataOfBugsPerSeverityTest()) && p('1:name,value') && e('1,75'); // 获取严重程度1数据
r($bug->getDataOfBugsPerSeverityTest()) && p('2:name,value') && e('2,75'); // 获取严重程度2数据
r($bug->getDataOfBugsPerSeverityTest()) && p('3:name,value') && e('3,75'); // 获取严重程度3数据
r($bug->getDataOfBugsPerSeverityTest()) && p('4:name,value') && e('4,75'); // 获取严重程度4数据
r($bug->getDataOfBugsPerSeverityTest()) && p('1:name,value') && e('1,79'); // 获取严重程度1数据
r($bug->getDataOfBugsPerSeverityTest()) && p('2:name,value') && e('2,79'); // 获取严重程度2数据
r($bug->getDataOfBugsPerSeverityTest()) && p('3:name,value') && e('3,79'); // 获取严重程度3数据
r($bug->getDataOfBugsPerSeverityTest()) && p('4:name,value') && e('4,78'); // 获取严重程度4数据
+2 -2
View File
@@ -9,7 +9,7 @@ title=bugModel->getDataOfBugsPerStatus();
cid=1
pid=1
获取状态为active的数据 >> 激活,150
获取状态为active的数据 >> 激活,165
获取状态为resolved的数据 >> 已解决,90
获取状态为closed的数据 >> 已关闭,60
@@ -17,6 +17,6 @@ pid=1
$bug=new bugTest();
r($bug->getDataOfBugsPerStatusTest()) && p('active:name,value') && e('激活,150'); // 获取状态为active的数据
r($bug->getDataOfBugsPerStatusTest()) && p('active:name,value') && e('激活,165'); // 获取状态为active的数据
r($bug->getDataOfBugsPerStatusTest()) && p('resolved:name,value') && e('已解决,90'); // 获取状态为resolved的数据
r($bug->getDataOfBugsPerStatusTest()) && p('closed:name,value') && e('已关闭,60'); // 获取状态为closed的数据
+2 -2
View File
@@ -9,7 +9,7 @@ title=bugModel->getDataOfBugsPerType();
cid=1
pid=1
获取类型为codeerror的数据 >> 代码错误,34
获取类型为codeerror的数据 >> 代码错误,49
获取类型为config的数据 >> 配置相关,34
获取类型为install的数据 >> 安装部署,34
获取类型为security的数据 >> 安全相关,33
@@ -23,7 +23,7 @@ pid=1
$bug=new bugTest();
r($bug->getDataOfBugsPerTypeTest()) && p('codeerror:name,value') && e('代码错误,34'); // 获取类型为codeerror的数据
r($bug->getDataOfBugsPerTypeTest()) && p('codeerror:name,value') && e('代码错误,49'); // 获取类型为codeerror的数据
r($bug->getDataOfBugsPerTypeTest()) && p('config:name,value') && e('配置相关,34'); // 获取类型为config的数据
r($bug->getDataOfBugsPerTypeTest()) && p('install:name,value') && e('安装部署,34'); // 获取类型为install的数据
r($bug->getDataOfBugsPerTypeTest()) && p('security:name,value') && e('安全相关,33'); // 获取类型为security的数据
+2 -2
View File
@@ -9,10 +9,10 @@ title=bugModel->getDataOfOpenedBugsPerDay();
cid=1
pid=1
获取创建的数据 >> 300
获取创建的数据 >> 315
*/
$bug=new bugTest();
r($bug->getDataOfOpenedBugsPerDayTest()) && p('0:value') && e('300'); // 获取创建的数据
r($bug->getDataOfOpenedBugsPerDayTest()) && p('0:value') && e('315'); // 获取创建的数据
@@ -9,10 +9,10 @@ title=bugModel->getDataOfOpenedBugsPerUser();
cid=1
pid=1
获取admin创建的数据 >> admin,300
获取admin创建的数据 >> admin,315
*/
$bug=new bugTest();
r($bug->getDataOfOpenedBugsPerUserTest()) && p('admin:name,value') && e('admin,300'); // 获取admin创建的数据
r($bug->getDataOfOpenedBugsPerUserTest()) && p('admin:name,value') && e('admin,315'); // 获取admin创建的数据
+18 -18
View File
@@ -9,27 +9,27 @@ title=bugModel->getProductLeftBugs();
cid=1
pid=1
测试获取buildID为11 productID为1的bug >> 0
测试获取buildID为12 productID为41的bug >> 0
测试获取buildID为13 productID为1的bug >> BUG1,BUG2,BUG3
测试获取buildID为14 productID为41的bug >> BUG121,BUG122,BUG123
测试获取buildID为15 productID为1的bug >> BUG1,BUG2,BUG3
测试获取buildID为16 productID为1的bug >> BUG1,BUG2,BUG3
测试获取不存在的build的bug >> 0
测试获取不存在的product的bug >> 0
测试获取buildID为11 productID为1的bug >> BUG1,BUG2,BUG3,测试单转Bug1,测试单转Bug11,SonarQube_Bug12,测试单转Bug13,SonarQube_Bug14,测试单转Bug15
测试获取buildID为12 productID为2的bug >> BUG4,BUG5,BUG6,SonarQube_Bug2
测试获取buildID为13 productID为3的bug >> 缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,bug8,BUG9,测试单转Bug3
测试获取buildID为14 productID为4的bug >> BUG10,BUG11,BUG12,SonarQube_Bug4
测试获取buildID为15 productID为5的bug >> BUG13,BUG14,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();15,测试单转Bug5
测试获取buildID为16 productID为6的bug >> bug16,BUG17,BUG18,SonarQube_Bug6
测试获取不存在的build的bug >> 0
测试获取不存在的product的bug >> 0
*/
$buildIDList = array('1', '2', '3', '4', '5', '6', '1000001');
$productIDList = array('1', '41', '1000001');
$buildIDList = array('11', '12', '13', '14', '15', '16', '1000001');
$productIDList = array('1', '2', '3', '4', '5', '6', '1000001');
$bug=new bugTest();
r($bug->getProductLeftBugsTest($buildIDList[0], $productIDList[0])) && p() && e('0'); // 测试获取buildID为11 productID为1的bug
r($bug->getProductLeftBugsTest($buildIDList[1], $productIDList[1])) && p() && e('0'); // 测试获取buildID为12 productID为41的bug
r($bug->getProductLeftBugsTest($buildIDList[2], $productIDList[0])) && p() && e('BUG1,BUG2,BUG3'); // 测试获取buildID为13 productID为1的bug
r($bug->getProductLeftBugsTest($buildIDList[3], $productIDList[1])) && p() && e('BUG121,BUG122,BUG123'); // 测试获取buildID为14 productID为41的bug
r($bug->getProductLeftBugsTest($buildIDList[4], $productIDList[0])) && p() && e('BUG1,BUG2,BUG3'); // 测试获取buildID为15 productID为1的bug
r($bug->getProductLeftBugsTest($buildIDList[5], $productIDList[0])) && p() && e('BUG1,BUG2,BUG3'); // 测试获取buildID为16 productID为1的bug
r($bug->getProductLeftBugsTest($buildIDList[6], $productIDList[0])) && p() && e('0'); // 测试获取不存在的build的bug
r($bug->getProductLeftBugsTest($buildIDList[0], $productIDList[2])) && p() && e('0'); // 测试获取不存在的product的bug
r($bug->getProductLeftBugsTest($buildIDList[0], $productIDList[0])) && p() && e('BUG1,BUG2,BUG3,测试单转Bug1,测试单转Bug11,SonarQube_Bug12,测试单转Bug13,SonarQube_Bug14,测试单转Bug15'); // 测试获取buildID为11 productID为1的bug
r($bug->getProductLeftBugsTest($buildIDList[1], $productIDList[1])) && p() && e('BUG4,BUG5,BUG6,SonarQube_Bug2'); // 测试获取buildID为12 productID为2的bug
r($bug->getProductLeftBugsTest($buildIDList[2], $productIDList[2])) && p() && e('缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,bug8,BUG9,测试单转Bug3'); // 测试获取buildID为13 productID为3的bug
r($bug->getProductLeftBugsTest($buildIDList[3], $productIDList[3])) && p() && e('BUG10,BUG11,BUG12,SonarQube_Bug4'); // 测试获取buildID为14 productID为4的bug
r($bug->getProductLeftBugsTest($buildIDList[4], $productIDList[4])) && p() && e('BUG13,BUG14,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();15,测试单转Bug5'); // 测试获取buildID为15 productID为5的bug
r($bug->getProductLeftBugsTest($buildIDList[5], $productIDList[5])) && p() && e('bug16,BUG17,BUG18,SonarQube_Bug6'); // 测试获取buildID为16 productID为6的bug
r($bug->getProductLeftBugsTest($buildIDList[6], $productIDList[1])) && p() && e('0'); // 测试获取不存在的build的bug
r($bug->getProductLeftBugsTest($buildIDList[1], $productIDList[6])) && p() && e('0'); // 测试获取不存在的product的bug
+13 -14
View File
@@ -9,25 +9,24 @@ title=bugModel->getProjectBugs();
cid=1
pid=1
测试获取项目ID为11的bug >> BUG3;BUG2;BUG1
测试获取项目ID为12的bug >> BUG6;BUG5;BUG4
测试获取项目ID为13的bug >> BUG9;bug8;缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7
测试获取项目ID为14的bug >> BUG12;BUG11;BUG10
测试获取项目ID为15的bug >> 缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();15;BUG14;BUG13
测试获取项目ID为16的bug >> BUG18;BUG17;bug16
测试获取项目ID为11的bug >> 测试单转Bug1;BUG3;BUG2
测试获取项目ID为12的bug >> SonarQube_Bug2;BUG6;BUG5
测试获取项目ID为13的bug >> 测试单转Bug3;BUG9;bug8
测试获取项目ID为14的bug >> SonarQube_Bug4;BUG12;BUG11
测试获取项目ID为15的bug >> 测试单转Bug5;缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();15;BUG14
测试获取项目ID为16的bug >> SonarQube_Bug6;BUG18;BUG17
测试获取不存在的项目的bug >> 0
*/
$projectIDList = array('11', '12', '13', '14', '15', '16', '1000001');
$bug=new bugTest();
r($bug->getProjectBugsTest($projectIDList[0])) && p('0:title;1:title;2:title') && e('BUG3;BUG2;BUG1'); // 测试获取项目ID为11的bug
r($bug->getProjectBugsTest($projectIDList[1])) && p('0:title;1:title;2:title') && e('BUG6;BUG5;BUG4'); // 测试获取项目ID为12的bug
r($bug->getProjectBugsTest($projectIDList[2])) && p('0:title;1:title;2:title') && e('BUG9;bug8;缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7'); // 测试获取项目ID为13的bug
r($bug->getProjectBugsTest($projectIDList[3])) && p('0:title;1:title;2:title') && e('BUG12;BUG11;BUG10'); // 测试获取项目ID为14的bug
r($bug->getProjectBugsTest($projectIDList[4])) && p('0:title;1:title;2:title') && e('缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();15;BUG14;BUG13'); // 测试获取项目ID为15的bug
r($bug->getProjectBugsTest($projectIDList[5])) && p('0:title;1:title;2:title') && e('BUG18;BUG17;bug16'); // 测试获取项目ID为16的bug
r($bug->getProjectBugsTest($projectIDList[6])) && p('0:title;1:title;2:title') && e('0'); // 测试获取不存在的项目的bug
r($bug->getProjectBugsTest($projectIDList[0])) && p('0:title;1:title;2:title') && e('测试单转Bug1;BUG3;BUG2'); // 测试获取项目ID为11的bug
r($bug->getProjectBugsTest($projectIDList[1])) && p('0:title;1:title;2:title') && e('SonarQube_Bug2;BUG6;BUG5 '); // 测试获取项目ID为12的bug
r($bug->getProjectBugsTest($projectIDList[2])) && p('0:title;1:title;2:title') && e('测试单转Bug3;BUG9;bug8'); // 测试获取项目ID为13的bug
r($bug->getProjectBugsTest($projectIDList[3])) && p('0:title;1:title;2:title') && e('SonarQube_Bug4;BUG12;BUG11'); // 测试获取项目ID为14的bug
r($bug->getProjectBugsTest($projectIDList[4])) && p('0:title;1:title;2:title') && e('测试单转Bug5;缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();15;BUG14'); // 测试获取项目ID为15的bug
r($bug->getProjectBugsTest($projectIDList[5])) && p('0:title;1:title;2:title') && e('SonarQube_Bug6;BUG18;BUG17'); // 测试获取项目ID为16的bug
r($bug->getProjectBugsTest($projectIDList[6])) && p('0:title;1:title;2:title') && e('0'); // 测试获取不存在的项目的bug
+32
View File
@@ -0,0 +1,32 @@
#!/usr/bin/env php
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php'; su('admin');
include dirname(dirname(dirname(__FILE__))) . '/class/bug.class.php';
/**
title=bugModel->getProjects();
cid=1
pid=1
测试获取productID为1的项目 >> 项目1,项目11
测试获取productID为2的项目 >> 项目2,项目12
测试获取productID为3的项目 >> 项目3,项目13
测试获取productID为4的项目 >> 项目4,项目14
测试获取productID为5的项目 >> 项目5,项目15
测试获取productID为6的项目 >> 项目6,项目16
测试获取不存在的product的项目 >> 0
*/
$productIDList = array('1', '2', '3', '4','5', '6', '1000001');
$bug=new bugTest();
r($bug->getProjectsTest($productIDList[0])) && p() && e('项目1,项目11'); // 测试获取productID为1的项目
r($bug->getProjectsTest($productIDList[1])) && p() && e('项目2,项目12'); // 测试获取productID为2的项目
r($bug->getProjectsTest($productIDList[2])) && p() && e('项目3,项目13'); // 测试获取productID为3的项目
r($bug->getProjectsTest($productIDList[3])) && p() && e('项目4,项目14'); // 测试获取productID为4的项目
r($bug->getProjectsTest($productIDList[4])) && p() && e('项目5,项目15'); // 测试获取productID为5的项目
r($bug->getProjectsTest($productIDList[5])) && p() && e('项目6,项目16'); // 测试获取productID为6的项目
r($bug->getProjectsTest($productIDList[6])) && p() && e('0'); // 测试获取不存在的product的项目
+14 -14
View File
@@ -9,23 +9,23 @@ title=bugModel->getReleaseBugs();
cid=1
pid=1
测试获取buildID为11 productID为1的bug >> BUG1,BUG2,BUG3
测试获取buildID为12 productID为41的bug >> 0
测试获取buildID为13 productID为1的bug >> BUG1,BUG2,BUG3
测试获取buildID为14 productID为41的bug >> BUG121,BUG122,BUG123
测试获取buildID为15 productID为1的bug >> BUG1,BUG2,BUG3
测试获取buildID为16 productID为1的bug >> BUG1,BUG2,BUG3
测试获取buildID为11 productID为2的bug >> BUG4,BUG5,BUG6
测试获取buildID为12 productID为2的bug >> 0
测试获取buildID为13 productID为1的bug >> BUG1,BUG2,BUG3
测试获取buildID为14 productID为2的bug >> BUG4,BUG5,BUG6
测试获取buildID为15 productID为1的bug >> BUG1,BUG2,BUG3
测试获取buildID为16 productID为2的bug >> BUG4,BUG5,BUG6
*/
$buildIDList = array('1', '2', '3', '4', '5', '6', '1000001');
$productIDList = array('1', '41');
$buildIDList = array('11', '12', '13', '14', '15', '16');
$productIDList = array('1', '2');
$bug=new bugTest();
r($bug->getReleaseBugsTest($buildIDList[0], $productIDList[0])) && p('') && e('BUG1,BUG2,BUG3'); // 测试获取buildID为11 productID为1的bug
r($bug->getReleaseBugsTest($buildIDList[1], $productIDList[1])) && p('') && e('0'); // 测试获取buildID为12 productID为41的bug
r($bug->getReleaseBugsTest($buildIDList[2], $productIDList[0])) && p('') && e('BUG121,BUG122,BUG123'); // 测试获取buildID为13 productID为1的bug
r($bug->getReleaseBugsTest($buildIDList[3], $productIDList[1])) && p('') && e('BUG1,BUG2,BUG3'); // 测试获取buildID为14 productID为41的bug
r($bug->getReleaseBugsTest($buildIDList[4], $productIDList[0])) && p('') && e('BUG1,BUG2,BUG3'); // 测试获取buildID为15 productID为1的bug
r($bug->getReleaseBugsTest($buildIDList[5], $productIDList[0])) && p('') && e('BUG1,BUG2,BUG3'); // 测试获取buildID为16 productID为1的bug
r($bug->getReleaseBugsTest($buildIDList[0], $productIDList[1])) && p('') && e('BUG4,BUG5,BUG6'); // 测试获取buildID为11 productID为2的bug
r($bug->getReleaseBugsTest($buildIDList[1], $productIDList[1])) && p('') && e('0'); // 测试获取buildID为12 productID为2的bug
r($bug->getReleaseBugsTest($buildIDList[2], $productIDList[0])) && p('') && e('BUG1,BUG2,BUG3'); // 测试获取buildID为13 productID为1的bug
r($bug->getReleaseBugsTest($buildIDList[3], $productIDList[1])) && p('') && e('BUG4,BUG5,BUG6'); // 测试获取buildID为14 productID为2的bug
r($bug->getReleaseBugsTest($buildIDList[4], $productIDList[0])) && p('') && e('BUG1,BUG2,BUG3'); // 测试获取buildID为15 productID为1的bug
r($bug->getReleaseBugsTest($buildIDList[5], $productIDList[1])) && p('') && e('BUG4,BUG5,BUG6'); // 测试获取buildID为16 productID为2的bug
+12 -12
View File
@@ -9,12 +9,12 @@ title=bugModel->getStoryBugCounts();
cid=1
pid=1
测试获取关联storyID为2的bug数量 >> 3
测试获取关联storyID为6的bug数量 >> 3
测试获取关联storyID为10的bug数量 >> 3
测试获取关联storyID为14的bug数量 >> 3
测试获取关联storyID为18的bug数量 >> 3
测试获取关联storyID为22的bug数量 >> 3
测试获取关联storyID为2的bug数量 >> 4
测试获取关联storyID为6的bug数量 >> 4
测试获取关联storyID为10的bug数量 >> 4
测试获取关联storyID为14的bug数量 >> 4
测试获取关联storyID为18的bug数量 >> 4
测试获取关联storyID为22的bug数量 >> 4
测试获取关联storyID不存在的bug数量 >> 0
*/
@@ -23,10 +23,10 @@ pid=1
$storyIDList = array('2', '6', '10', '14', '18', '22', '1000001');
$bug=new bugTest();
r($bug->getStoryBugCountsTest($storyIDList, $storyIDList[0])) && p() && e('3'); // 测试获取关联storyID为2的bug数量
r($bug->getStoryBugCountsTest($storyIDList, $storyIDList[1])) && p() && e('3'); // 测试获取关联storyID为6的bug数量
r($bug->getStoryBugCountsTest($storyIDList, $storyIDList[2])) && p() && e('3'); // 测试获取关联storyID为10的bug数量
r($bug->getStoryBugCountsTest($storyIDList, $storyIDList[3])) && p() && e('3'); // 测试获取关联storyID为14的bug数量
r($bug->getStoryBugCountsTest($storyIDList, $storyIDList[4])) && p() && e('3'); // 测试获取关联storyID为18的bug数量
r($bug->getStoryBugCountsTest($storyIDList, $storyIDList[5])) && p() && e('3'); // 测试获取关联storyID为22的bug数量
r($bug->getStoryBugCountsTest($storyIDList, $storyIDList[0])) && p() && e('4'); // 测试获取关联storyID为2的bug数量
r($bug->getStoryBugCountsTest($storyIDList, $storyIDList[1])) && p() && e('4'); // 测试获取关联storyID为6的bug数量
r($bug->getStoryBugCountsTest($storyIDList, $storyIDList[2])) && p() && e('4'); // 测试获取关联storyID为10的bug数量
r($bug->getStoryBugCountsTest($storyIDList, $storyIDList[3])) && p() && e('4'); // 测试获取关联storyID为14的bug数量
r($bug->getStoryBugCountsTest($storyIDList, $storyIDList[4])) && p() && e('4'); // 测试获取关联storyID为18的bug数量
r($bug->getStoryBugCountsTest($storyIDList, $storyIDList[5])) && p() && e('4'); // 测试获取关联storyID为22的bug数量
r($bug->getStoryBugCountsTest($storyIDList, $storyIDList[6])) && p() && e('0'); // 测试获取关联storyID不存在的bug数量
+28
View File
@@ -0,0 +1,28 @@
#!/usr/bin/env php
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php'; su('admin');
include dirname(dirname(dirname(__FILE__))) . '/class/bug.class.php';
/**
title=bugModel->getToAndCcList();
cid=1
pid=1
测试获取bug1的联系人 >> admin,admin
测试获取bug2的联系人 >> admin,admin
测试获取bug3的联系人 >> admin,admin
测试获取bug51的联系人 >> dev1,admin
测试获取bug81的联系人 >> test1,admin
*/
$bugIDList = array('1', '2', '3', '51', '81');
$bug=new bugTest();
r($bug->getToAndCcListTest($bugIDList[0])) && p() && e('admin,admin'); // 测试获取bug1的联系人
r($bug->getToAndCcListTest($bugIDList[1])) && p() && e('admin,admin'); // 测试获取bug2的联系人
r($bug->getToAndCcListTest($bugIDList[2])) && p() && e('admin,admin'); // 测试获取bug3的联系人
r($bug->getToAndCcListTest($bugIDList[3])) && p() && e('dev1,admin'); // 测试获取bug51的联系人
r($bug->getToAndCcListTest($bugIDList[4])) && p() && e('test1,admin'); // 测试获取bug81的联系人
+6 -6
View File
@@ -9,10 +9,10 @@ title=bugModel->getUserBugPairs();
cid=1
pid=1
测试获取用户admin的bug >> 80
测试获取用户test1的bug >> 80
测试获取用户admin的bug >> 85
测试获取用户test1的bug >> 85
测试获取用户test2的bug >> 0
测试获取用户dev1的bug >> 50
测试获取用户dev1的bug >> 55
测试获取用户po1的bug >> 0
*/
@@ -21,8 +21,8 @@ pid=1
$accountIDList = array('admin', 'test1', 'test2', 'dev1', 'po1');
$bug=new bugTest();
r($bug->getUserBugPairsTest($accountIDList[0])) && p() && e('80'); // 测试获取用户admin的bug
r($bug->getUserBugPairsTest($accountIDList[1])) && p() && e('50'); // 测试获取用户test1的bug
r($bug->getUserBugPairsTest($accountIDList[0])) && p() && e('85'); // 测试获取用户admin的bug
r($bug->getUserBugPairsTest($accountIDList[1])) && p() && e('55'); // 测试获取用户test1的bug
r($bug->getUserBugPairsTest($accountIDList[2])) && p() && e('0'); // 测试获取用户test2的bug
r($bug->getUserBugPairsTest($accountIDList[3])) && p() && e('50'); // 测试获取用户dev1的bug
r($bug->getUserBugPairsTest($accountIDList[3])) && p() && e('55'); // 测试获取用户dev1的bug
r($bug->getUserBugPairsTest($accountIDList[4])) && p() && e('0'); // 测试获取用户po1的bug

Some files were not shown because too many files have changed in this diff Show More