This commit is contained in:
王怡栋
2022-03-22 16:28:26 +08:00
142 changed files with 2336 additions and 369 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,parent,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,comment';
$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 -2
View File
@@ -59,8 +59,9 @@ class userEntry extends Entry
unset($profile->password);
$info->profile = $this->format($profile, 'last:time,locked:time,birthday:date,join:date');
$info->profile->role = array('code' => $info->profile->role, 'name' => $this->lang->user->roleList[$info->profile->role]);
$info->profile->admin = strpos($this->app->company->admins, ",{$profile->account},") !== false;
$info->profile->role = array('code' => $info->profile->role, 'name' => $this->lang->user->roleList[$info->profile->role]);
$info->profile->admin = strpos($this->app->company->admins, ",{$profile->account},") !== false;
$info->profile->superReviewer = strpos(',' . trim(zget($this->config->story, 'superReviewers', ''), ',') . ',', ',' . $this->app->user->account . ',');
if(!$fields) return $this->send(200, $info);
+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';
@@ -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;
+6
View File
@@ -692,6 +692,12 @@ class baseValidater
$methodName = $app->getMethodName();
$params = $app->getParams();
if($moduleName == 'tutorial' and $methodName == 'wizard' and isset($params['module']) and isset($params['method']))
{
$moduleName = $params['module'];
$methodName = $params['method'];
}
if($type == 'cookie')
{
$pagerCookie = 'pager' . ucfirst($moduleName) . ucfirst($methodName);
+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());
+6 -3
View File
@@ -59,7 +59,8 @@ class bug extends control
}
else
{
$products = $this->product->getPairs('', 0, 'program_asc');
$mode = ($this->app->methodName == 'create' and empty($this->config->CRProduct)) ? 'noclosed' : '';
$products = $this->product->getPairs($mode, 0, 'program_asc');
}
if(empty($products) and !helper::isAjaxRequest()) return print($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$tab&activeMenu=bug&objectID=$objectID")));
}
@@ -627,7 +628,7 @@ class bug extends control
$this->view->productName = isset($this->products[$productID]) ? $this->products[$productID] : '';
$this->view->moduleOptionMenu = $moduleOptionMenu;
$this->view->stories = $stories;
$this->view->projects = defined('TUTORIAL') ? $this->loadModel('tutorial')->getProject() : $projects;
$this->view->projects = defined('TUTORIAL') ? $this->loadModel('tutorial')->getProjectPairs() : $projects;
$this->view->project = $project;
$this->view->executions = defined('TUTORIAL') ? $this->loadModel('tutorial')->getExecutionPairs() : $executions;
$this->view->builds = $builds;
@@ -1504,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);
@@ -1535,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;
@@ -1576,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>
+14 -4
View File
@@ -399,7 +399,7 @@ class commonModel extends model
{
$noRole = (!empty($app->user->role) && isset($lang->user->roleList[$app->user->role])) ? '' : ' no-role';
echo '<li class="user-profile-item">';
echo "<a href='" . helper::createLink('my', 'profile', '', '', true) . "' data-width='600' class='iframe $noRole'" . '>';
echo "<a href='" . helper::createLink('my', 'profile', '', '', true) . "' data-width='700' class='iframe $noRole'" . '>';
echo html::avatar($app->user, '', 'avatar-circle', 'id="menu-avatar"');
echo '<div class="user-profile-name">' . (empty($app->user->realname) ? $app->user->account : $app->user->realname) . '</div>';
if(isset($lang->user->roleList[$app->user->role])) echo '<div class="user-profile-role">' . $lang->user->roleList[$app->user->role] . '</div>';
@@ -407,7 +407,7 @@ class commonModel extends model
$vision = $app->config->vision == 'lite' ? 'rnd' : 'lite';
echo '<li>' . html::a(helper::createLink('my', 'profile', '', '', true), "<i class='icon icon-account'></i> " . $lang->profile, '', "class='iframe' data-width='600'") . '</li>';
echo '<li>' . html::a(helper::createLink('my', 'profile', '', '', true), "<i class='icon icon-account'></i> " . $lang->profile, '', "class='iframe' data-width='700'") . '</li>';
if($app->config->vision === 'rnd')
{
@@ -484,7 +484,7 @@ class commonModel extends model
/* The standalone lite version removes the lite interface button */
if(trim($config->visions, ',') == 'lite') return true;
if($app->config->systemMode != 'new') return print("<div>{$lang->visionList['rnd']}</div>");
if(count($userVisions) < 2) return print("<div>{$lang->visionList[$currentVision]}</div>");
@@ -959,7 +959,17 @@ class commonModel extends model
$item->moduleName = $currentModule;
$item->methodName = $currentMethod;
$item->vars = $vars;
$item->url = helper::createLink($currentModule, $currentMethod, $vars, '', 0, 0, 1);
$isTutorialMode = commonModel::isTutorialMode();
if($isTutorialMode && $currentModule == 'project')
{
if(!empty($vars)) $vars = helper::safe64Encode($vars);
$item->url = helper::createLink('tutorial', 'wizard', "module={$currentModule}&method={$currentMethod}&params=$vars", '', 0, 0, 1);
}
else
{
$item->url = helper::createLink($currentModule, $currentMethod, $vars, '', 0, 0, 1);
}
$items[] = $item;
}
+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();
}
+6 -5
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;
@@ -1583,7 +1582,7 @@ class execution extends control
$linkedBranchList = array();
$linkedProducts = $this->product->getProducts($executionID);
$branches = $this->project->getBranchesByProject($executionID);
$plans = $this->productplan->getGroupByProduct(array_keys($linkedProducts), 'skipParent');
$plans = $this->productplan->getGroupByProduct(array_keys($linkedProducts), 'skipParent|unexpired');
$executionStories = $this->project->getStoriesByProject($executionID);
/* If the story of the product which linked the execution, you don't allow to remove the product. */
@@ -1978,6 +1977,8 @@ class execution extends control
$type = $this->config->vision == 'lite' ? 'kanban' : 'stage,sprint,kanban';
if(empty($execution) || strpos($type, $execution->type) === false) return print(js::error($this->lang->notFound) . js::locate('back'));
if($execution->type == 'kanban') return $this->locate(inlink('kanban', "executionID=$executionID"));
$this->app->loadLang('program');
/* Execution not found to prevent searching for .*/
@@ -2044,7 +2045,9 @@ class execution extends control
$this->session->set('execLaneType', $browseType);
$this->lang->execution->menu = new stdclass();
$execution = $this->commonAction($executionID);
$execution = $this->commonAction($executionID);
if($execution->type != 'kanban') return $this->locate(inlink('view', "executionID=$executionID"));
$kanbanData = $this->loadModel('kanban')->getRDKanban($executionID, $browseType, $orderBy, 0, $groupBy);
$executionActions = array();
@@ -3263,8 +3266,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;}
+2
View File
@@ -57,3 +57,5 @@
.c-type {width: 150px !important; overflow: unset;}
.c-group {width: 190px !important; overflow: unset;}
.c-type {margin-left: 0px !important;}
.createButton {margin-right: 5px;}
+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);
}
}
+1 -1
View File
@@ -300,7 +300,7 @@ function renderHeaderCol($col, col, $header, kanban)
if(col.asParent) $col = $col.children('.kanban-header-col');
if($col.children('.actions').context != undefined) return;
var $actions = $('<div class="actions" />');
var $actions = $('<div class="actions createButton" />');
var printStoryButton = printTaskButton = printBugButton = false;
if(priv.canCreateStory || priv.canBatchCreateStory || priv.canLinkStory || priv.canLinkStoryByPlan) printStoryButton = true;
if(priv.canCreateTask || priv.canBatchCreateTask) printTaskButton = true;
+3 -1
View File
@@ -44,7 +44,7 @@
<?php if(common::hasPriv('programplan', 'create') and $isStage):?>
<?php echo html::a($this->createLink('programplan', 'create', "projectID=$projectID&productID=$productID"), "<i class='icon icon-plus'></i> " . $lang->programplan->create, '', "class='btn btn-primary'");?>
<?php else: ?>
<?php if(common::hasPriv('execution', 'create')) echo html::a($this->createLink('execution', 'create', "projectID=$projectID"), "<i class='icon icon-sm icon-plus'></i> " . ((($from == 'execution') and ($config->systemMode == 'new')) ? $lang->execution->createExec : $lang->execution->create), '', "class='btn btn-primary create-execution-btn' data-app='execution'");?>
<?php if(common::hasPriv('execution', 'create')) echo html::a($this->createLink('execution', 'create', "projectID=$projectID"), "<i class='icon icon-sm icon-plus'></i> " . ((($from == 'execution') and ($config->systemMode == 'new')) ? $lang->execution->createExec : $lang->execution->create), '', "class='btn btn-primary create-execution-btn' data-app='execution' onclick='$(this).removeAttr(\"data-toggle\")'");?>
<?php endif;?>
</div>
</div>
@@ -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
+9 -1
View File
@@ -149,7 +149,15 @@ body {margin-bottom: 25px;}
<?php if($canBeChanged and (common::hasPriv('task', 'batchCreate', $checkObject) or common::hasPriv('task', 'create', $checkObject))):?>
<div class='btn-group dropdown'>
<?php
$actionLink = $this->createLink('task', 'create', "executionID=$executionID" . (isset($moduleID) ? "&storyID=0&moduleID=$moduleID" : ""));
if(commonModel::isTutorialMode())
{
$wizardParams = helper::safe64Encode("executionID=$executionID" . (isset($moduleID) ? "&storyID=0&moduleID=$moduleID" : ""));
$actionLink = $this->createLink('tutorial', 'wizard', "module=task&method=create&params=$wizardParams");
}
else
{
$actionLink = $this->createLink('task', 'create', "executionID=$executionID" . (isset($moduleID) ? "&storyID=0&moduleID=$moduleID" : ""));
}
echo html::a($actionLink, "<i class='icon icon-plus'></i> {$lang->task->create}", '', "class='btn btn-primary'");
?>
<button type='button' class='btn btn-primary dropdown-toggle' data-toggle='dropdown'><span class='caret'></span></button>
+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();
}
}
+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;}
+1 -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;}
+4
View File
@@ -946,6 +946,7 @@ class kanbanModel extends model
foreach($lanes as $lane)
{
$lane->actions = array();
$lane->name = htmlspecialchars_decode($lane->name);
foreach($actions as $action)
{
if($this->isClickable($lane, $action)) $lane->actions[] = $action;
@@ -998,7 +999,9 @@ class kanbanModel extends model
{
foreach($columns as $column)
{
$column->name = htmlspecialchars_decode($column->name);
$column->actions = array();
/* Judge column action priv. */
foreach($actions as $action)
{
@@ -1075,6 +1078,7 @@ class kanbanModel extends model
$card = zget($cards, $cardID);
$card->column = $cell->column;
$card->lane = $cell->lane;
$card->name = htmlspecialchars_decode($card->name);
$card->actions = array();
foreach($actions as $action)
+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;?>
+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);
+2 -2
View File
@@ -989,7 +989,7 @@ class product extends control
if($execution->type == 'kanban') $projectID = $execution->project;
}
$executions = $this->product->getExecutionPairsByProduct($productID, $branch, 'id_desc', $projectID);
$executions = $this->product->getExecutionPairsByProduct($productID, $branch, 'id_desc', $projectID, empty($this->config->CRExecution) ? 'noclosed' : '');
if($this->app->getViewType() == 'json') return print(json_encode($executions));
if($number === '')
@@ -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
View File
@@ -8,3 +8,4 @@ td.acl {white-space: nowrap;}
.c-product ,.c-release ,.c-code {width: 100px !important;}
.c-openedBy ,.c-acl ,.c-prs ,.c-common {width:110px !important;}
.c-bugs ,.c-type {width:120px !important;}
.c-release {padding-right: 20px !important;}
+1
View File
@@ -1184,6 +1184,7 @@ class productModel extends model
->andWhere('t2.project')->eq($projectID)
->beginIF($branch !== '')->andWhere('t1.branch')->in($branch)->fi()
->beginIF(!$this->app->user->admin)->andWhere('t2.id')->in($this->app->user->view->sprints)->fi()
->beginIF(strpos($mode, 'noclosed') !== false)->andWhere('t2.status')->ne('closed')->fi()
->andWhere('t2.deleted')->eq('0')
->orderBy($orderBy)
->fetchAll('id');
+14 -5
View File
@@ -89,16 +89,25 @@ class productplan extends control
}
$this->view->begin = $lastPlan ? $begin : date('Y-m-d');
if($parent) $this->view->parentPlan = $this->productplan->getById($parent);
$branchPairs = $product->type == 'normal' ? array() : $this->loadModel('branch')->getPairs($productID, 'active');
/*Get default branch.*/
$branchList = $this->loadModel('branch')->getList($productID);
foreach($branchList as $branch)
{
if($branch->default) $defaultBranch = $branch->id;
}
$this->view->title = $this->view->product->name . $this->lang->colon . $this->lang->productplan->create;
$this->view->position[] = $this->lang->productplan->common;
$this->view->position[] = $this->lang->productplan->create;
$this->view->productID = $productID;
$this->view->lastPlan = $lastPlan;
$this->view->branch = $branchID;
$this->view->branches = $product->type == 'normal' ? array() : $this->loadModel('branch')->getPairs($productID, 'active');
$this->view->parent = $parent;
$this->view->productID = $productID;
$this->view->lastPlan = $lastPlan;
$this->view->branch = $branchID;
$this->view->branches = $branchPairs;
$this->view->defaultBranch = $defaultBranch;
$this->view->parent = $parent;
$this->display();
}
+2 -1
View File
@@ -449,8 +449,9 @@ class productplanModel extends model
$stories = $this->dao->select('*')->from(TABLE_STORY)->where("CONCAT(',', plan, ',')")->like("%,{$plan->parent},%")->fetchAll('id');
foreach($stories as $storyID => $story)
{
$storyPlan = trim($story->plan, ',');
$storyPlan = str_replace(",{$plan->parent},", ",$planID,", ",$storyPlan,");
$storyPlan = trim($storyPlan, ',');
$this->dao->update(TABLE_STORY)->set('plan')->eq($storyPlan)->where('id')->eq($storyID)->exec();
}
}
+2 -2
View File
@@ -22,7 +22,7 @@
<h2> <?php echo $parent ? $lang->productplan->createChildren : $lang->productplan->create;?></h2>
</div>
<form class='load-indicator main-form form-ajax' method='post' target='hiddenwin' id='dataform'>
<table class='table table-form'>
<table class='table table-form'>
<tbody>
<?php if($parent):?>
<tr>
@@ -40,7 +40,7 @@
<?php if($product->type != 'normal'):?>
<tr>
<th><?php echo $lang->product->branch;?></th>
<td><?php echo html::select('branch', $branches, $branch, "class='form-control chosen'");?></td><td></td><td></td>
<td><?php echo html::select('branch', $branches, $defaultBranch, "class='form-control chosen'");?></td><td></td><td></td>
</tr>
<?php endif;?>
<?php endif;?>
+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;
}
+1 -1
View File
@@ -578,7 +578,7 @@ class project extends control
$linkedProducts = $this->loadModel('product')->getProducts($projectID);
$parentProject = $this->program->getByID($project->parent);
$branches = $this->project->getBranchesByProject($projectID);
$plans = $this->productplan->getGroupByProduct(array_keys($linkedProducts), 'skipParent');
$plans = $this->productplan->getGroupByProduct(array_keys($linkedProducts), 'skipParent|unexpired');
$projectStories = $this->project->getStoriesByProject($projectID);
$projectBranches = $this->project->getBranchGroupByProject($projectID, array_keys($linkedProducts));
+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">
+20 -5
View File
@@ -211,6 +211,21 @@ class projectreleaseModel extends model
$this->file->saveUpload('release', $releaseID);
$this->loadModel('score')->create('release', 'create', $releaseID);
/* Set stage to released. */
if($release->stories)
{
$this->loadModel('story');
$this->loadModel('action');
$storyIDList = array_filter(explode(',', $release->stories));
foreach($storyIDList as $storyID)
{
$this->story->setStage($storyID);
$this->action->create('story', $storyID, 'linked2release', '', $releaseID);
}
}
return $releaseID;
}
@@ -333,13 +348,13 @@ class projectreleaseModel extends model
}
/**
* Judge btn is clickable or not.
*
* @param int $release
* @param string $action
* Judge btn is clickable or not.
*
* @param int $release
* @param string $action
* @static
* @access public
* @return bool
* @return bool
*/
public static function isClickable($release, $action)
{
+15
View File
@@ -210,6 +210,21 @@ class releaseModel extends model
$this->file->saveUpload('release', $releaseID);
$this->loadModel('score')->create('release', 'create', $releaseID);
/* Set stage to released. */
if($release->stories)
{
$this->loadModel('story');
$this->loadModel('action');
$storyIDList = array_filter(explode(',', $release->stories));
foreach($storyIDList as $storyID)
{
$this->story->setStage($storyID);
$this->action->create('story', $storyID, 'linked2release', '', $releaseID);
}
}
return $releaseID;
}
+1
View File
@@ -1262,6 +1262,7 @@ class story extends control
if(isonlybody()) return print(js::reload('parent.parent'));
$module = $from == 'project' ? 'projectstory' : 'story';
if(defined('RUN_MODE') and RUN_MODE == 'api') return $this->send(array('status' => 'success', 'data' => $storyID));
return print(js::locate($this->createLink($module, 'view', "storyID=$storyID"), 'parent'));
}
+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 -2
View File
@@ -485,14 +485,16 @@
$taskInfo = $task->id . '&nbsp<span class="label label-success label-outline">' . $this->lang->task->statusList[$task->status] . '</span>&nbsp' . $task->name;
$class = isonlybody() ? 'showinonlybody' : 'iframe';
echo "<li title='$task->name'>" . html::a($this->createLink('task', 'view', "taskID=$task->id", '', true), $taskInfo, '', "class=$class data-width='80%'");
echo html::a($this->createLink('execution', 'browse', "executionID=$task->execution"), $executionName, '', "class='text-muted'") . '</li>';
$execution = isset($story->executions[$task->execution]) ? $story->executions[$task->execution] : '';
$execName = (isset($execution->type) and $execution->type == 'kanban' and isonlybody()) ? $executionName : html::a($this->createLink('execution', 'view', "executionID=$executionID"), $executionName, '', "class='text-muted'");
echo $execName . '</li>';
}
}
if(count($story->tasks) == 0)
{
foreach($story->executions as $executionID => $execution)
{
$execName = ($execution->type == 'kanban' and isonlybody()) ? $execution->name : html::a($this->createLink('execution', 'browse', "executionID=$executionID"), $execution->name, '', "class='text-muted'");
$execName = ($execution->type == 'kanban' and isonlybody()) ? $execution->name : html::a($this->createLink('execution', 'view', "executionID=$executionID"), $execution->name, '', "class='text-muted'");
echo "<li title='$execution->name'>" . $execName . '</li>';
}
}
+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);
+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;
}
+1 -1
View File
@@ -98,7 +98,7 @@
<td colspan='3'>
<span id='storyBox' class="<?php if(!empty($stories)) echo 'hidden';?> "><?php printf($lang->task->noticeLinkStory, html::a($this->createLink('execution', 'linkStory', "executionID=$execution->id"), $lang->execution->linkStory, '_blank', 'class="text-primary"'), html::a("javascript:loadStories($execution->id)", $lang->refresh, '', 'class="text-primary"'));?></span>
<div class='input-group <?php if(empty($stories)) echo "hidden";?>'>
<?php echo html::select('story', array($task->story => empty($stories) ? '': $stories[$task->story]), $task->story, "class='form-control chosen' onchange='setStoryRelated();'");?>
<?php echo html::select('story', array($task->story => (empty($stories) or !isset($stories[$task->story])) ? '': $stories[$task->story]), $task->story, "class='form-control chosen' onchange='setStoryRelated();'");?>
<span class='input-group-btn' id='preview'><a href='#' class='btn iframe'><?php echo $lang->preview;?></a></span>
</div>
</td>
+2 -1
View File
@@ -59,7 +59,8 @@ class testcase extends control
}
else
{
$products = $this->product->getPairs();
$mode = ($this->app->methodName == 'create' and empty($this->config->CRProduct)) ? 'noclosed' : '';
$products = $this->product->getPairs($mode);
}
if(empty($products) and !helper::isAjaxRequest()) return print($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$tab&activeMenu=testcase&objectID=$objectID")));
}
+6 -1
View File
@@ -198,7 +198,7 @@ $(function()
if($e.css('display') !== 'none')
{
if(!$e.data('zui.tooltip')) $e.addClass('tooltip-tutorial').attr('data-toggle', 'tooltip').tooltip(options);
$e.tooltip('show');
$e.tooltip('show', text);
if($e[0].getBoundingClientRect().top > $(window).height() || $e[0].getBoundingClientRect().top < 0) $e[0].scrollIntoView();
}
else if($e.parent().is('#menuMainNav'))
@@ -303,6 +303,7 @@ $(function()
{
if(status.waitField)
{
if(status.waitField.hasClass("chosen-controled")) status.waitField = status.waitField.next();
var fieldName = status.waitField.closest('td').prev('th').text();
if(!fieldName) fieldName = status.waitField.closest('.input-group').find('.input-group-addon:first').text();
if(fieldName) showToolTip(status.waitField, lang.requiredTip.replace('%s', fieldName));
@@ -544,6 +545,10 @@ $(function()
$(document).on('click', '.btn-task', function()
{
showTask($(this).data('name'));
/* Code for task #51133. */
var status = checkTask();
if(status.submitOK) window.location.reload();
}).on('click', '.btn-open-target-page', function()
{
appsWindow.$.apps.open(tasks[current].url);
+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);
+69
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.
*
@@ -1911,6 +1954,32 @@ class bugTest
}
}
/**
* 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.
*
+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.
*
+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的数据

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