Merge branch 'master' into 'sprint/autoTest_liumengyi_product'

# Conflicts:
#   module/product/model.php
This commit is contained in:
孙广明
2022-03-24 09:04:36 +00:00
58 changed files with 661 additions and 154 deletions
@@ -2,11 +2,12 @@
/**
* Get product pairs for lite.
*
* @param string $mode
* @param string $programID
* @param string $mode
* @param string $programID
* @param string|array $append
* @return array
*/
public function getPairs($mode = '', $programID = 0)
public function getPairs($mode = '', $programID = 0, $append = '')
{
if(defined('TUTORIAL')) return $this->loadModel('tutorial')->getProductPairs();
+4
View File
@@ -76,6 +76,10 @@
{
echo $action->objectName;
}
elseif($action->objectType == 'program')
{
echo $action->objectName;
}
else
{
$tab = '';
+1 -2
View File
@@ -256,9 +256,8 @@ class branch extends control
* @access public
* @return void
*/
public function ajaxGetBranches($productID, $oldBranch = 0, $param = '', $projectID = 0)
public function ajaxGetBranches($productID, $oldBranch = 0, $param = 'all', $projectID = 0)
{
$param = $param ? $param : 'all';
$product = $this->loadModel('product')->getById($productID);
if(empty($product) or $product->type == 'normal') return;
+1 -1
View File
@@ -416,7 +416,7 @@ class commonModel extends model
echo '<li>' . html::a(helper::createLink('tutorial', 'start'), "<i class='icon icon-guide'></i> " . $lang->tutorialAB, '', "class='iframe' data-class-name='modal-inverse' data-width='800' data-headerless='true' data-backdrop='true' data-keyboard='true'") . '</li>';
}
echo '<li>' . html::a(helper::createLink('my', 'preference', '', '', true), "<i class='icon icon-controls'></i> " . $lang->preference, '', "class='iframe' data-width='650'") . '</li>';
echo '<li>' . html::a(helper::createLink('my', 'preference', '', '', true), "<i class='icon icon-controls'></i> " . $lang->preference, '', "class='iframe' data-width='700'") . '</li>';
}
echo '<li>' . html::a(helper::createLink('my', 'changepassword', '', '', true), "<i class='icon icon-cog-outline'></i> " . $lang->changePassword, '', "class='iframe' data-width='600'") . '</li>';
+1 -1
View File
@@ -54,7 +54,7 @@
/* Show project and execution in one row */
#kanbanList .kanban-lane-col[data-type="doingProject"] + .kanban-lane-col {border-left: none; box-shadow: inset 2px 0 0 #fff;}
#kanbanList .kanban-lane-col[data-type="doingProject"] > .kanban-lane-items {padding: 0!important; overflow: visible; max-height: none!important;}
#kanbanList .kanban-lane-col[data-type="doingProject"] > .kanban-lane-items {padding: 0!important; overflow: visible!important; max-height: none!important;}
#kanbanList .kanban-item-span {padding: 0!important;}
#kanbanList .project-row {position: relative; width: 200%; width: calc(200% + 2px); height: 62px!important;}
#kanbanList .kanban-item-span + .kanban-item-span > .project-row {border-top: 2px solid #fff;}
+1 -1
View File
@@ -89,7 +89,7 @@ $lang->doc->diffAction = 'Diff Document';
$lang->doc->sort = 'Rank Document';
$lang->doc->manageType = 'Manage Category';
$lang->doc->editType = 'Edit';
$lang->doc->editChildType = 'Edit';
$lang->doc->editChildType = 'Manage';
$lang->doc->deleteType = 'Delete';
$lang->doc->addType = 'Add';
$lang->doc->childType = 'Directory';
+1 -1
View File
@@ -89,7 +89,7 @@ $lang->doc->diffAction = '对比文档';
$lang->doc->sort = '文档排序';
$lang->doc->manageType = '维护目录';
$lang->doc->editType = '编辑目录';
$lang->doc->editChildType = '编辑子目录';
$lang->doc->editChildType = '维护子目录';
$lang->doc->deleteType = '删除目录';
$lang->doc->addType = '增加目录';
$lang->doc->childType = '子目录';
+12 -10
View File
@@ -1501,6 +1501,8 @@ class execution extends control
$this->app->loadLang('programplan');
$browseExecutionLink = $this->createLink('execution', 'browse', "executionID=$executionID");
$execution = $this->execution->getById($executionID);
$branches = $this->project->getBranchesByProject($executionID);
$linkedProductIdList = empty($branches) ? '' : array_keys($branches);
if($execution->type == 'kanban')
{
@@ -1512,7 +1514,7 @@ class execution extends control
if(!empty($_POST))
{
$oldPlans = $this->dao->select('plan')->from(TABLE_PROJECTPRODUCT)->where('project')->eq($executionID)->andWhere('plan')->ne(0)->fetchPairs('plan');
$oldProducts = $this->product->getProducts($executionID);
$oldProducts = $this->product->getProducts($executionID, 'all', '', true, $linkedProductIdList);
$changes = $this->execution->update($executionID);
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
@@ -1527,7 +1529,7 @@ class execution extends control
}
$oldProducts = array_keys($oldProducts);
$newProducts = $this->product->getProducts($executionID);
$newProducts = $this->product->getProducts($executionID, 'all', '', true, $linkedProductIdList);
$newProducts = array_keys($newProducts);
$diffProducts = array_merge(array_diff($oldProducts, $newProducts), array_diff($newProducts, $oldProducts));
$products = $diffProducts ? join(',', $newProducts) : '';
@@ -1576,15 +1578,14 @@ class execution extends control
$position[] = html::a($browseExecutionLink, $execution->name);
$position[] = $this->lang->execution->edit;
$allProducts = $this->config->systemMode == 'classic' ? $this->product->getPairs('noclosed') : $this->product->getProducts($execution->project, 'noclosed', '', false);
$allProducts = $this->config->systemMode == 'classic' ? $this->product->getPairs('noclosed', 0, $linkedProductIdList) : $this->product->getProducts($execution->project, 'noclosed', '', false, $linkedProductIdList);
$allProducts = array(0 => '') + $allProducts;
$this->loadModel('productplan');
$productPlans = array(0 => '');
$linkedBranches = array();
$linkedBranchList = array();
$linkedProducts = $this->product->getProducts($executionID);
$branches = $this->project->getBranchesByProject($executionID);
$linkedProducts = $this->product->getProducts($executionID, 'all', '', true, $linkedProductIdList);
$plans = $this->productplan->getGroupByProduct(array_keys($linkedProducts), 'skipParent|unexpired');
$executionStories = $this->project->getStoriesByProject($executionID);
@@ -2583,11 +2584,12 @@ class execution extends control
$position[] = html::a($browseExecutionLink, $execution->name);
$position[] = $this->lang->execution->manageProducts;
$allProducts = $this->config->systemMode == 'classic' ? $this->product->getPairs('noclosed') : $this->product->getProductPairsByProject($execution->project);
$linkedProducts = $this->product->getProducts($execution->id);
$linkedBranches = array();
$branches = $this->project->getBranchesByProject($executionID);
$executionStories = $this->project->getStoriesByProject($executionID);
$branches = $this->project->getBranchesByProject($executionID);
$linkedProductIdList = empty($branches) ? '' : array_keys($branches);
$allProducts = $this->config->systemMode == 'classic' ? $this->product->getPairs('noclosed', 0, $linkedProductIdList) : $this->product->getProductPairsByProject($execution->project, 'all', $linkedProductIdList);
$linkedProducts = $this->product->getProducts($execution->id, 'all', '', true, $linkedProductIdList);
$linkedBranches = array();
$executionStories = $this->project->getStoriesByProject($executionID);
/* If the story of the product which linked the execution, you don't allow to remove the product. */
$unmodifiableProducts = array();
+3 -3
View File
@@ -15,14 +15,15 @@
.region {border: 1px solid #dcdcdc; background-color: #fff;}
.region + .region {margin-top: 20px;}
.region .region-header {padding: 10px;}
.region .region-header span {font-size: 14px; color: #999EAB}
.region .region-header strong {font-size: 14px; color: #999EAB}
.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-actions {float: right; position: relative; top: -6px; right: -6px;}
.region .region-header .icon-double-angle-up,.icon-double-angle-down {cursor: pointer;}
.region .kanban-header-sub-cols .kanban-header-col > .title {max-width: 100% !important;min-width:240px;}
.region .sort .region-header {cursor: move;}
.region .kanban {padding: 0px 10px 10px 10px; min-height: unset; overflow: auto}
.region .kanban {padding: 0px 10px 10px 10px; min-height: unset; overflow: auto; width: 100%;}
.region .kanban .form-actions {margin: 0;}
.region .kanban .form-actions .btn {margin-right: 10px; min-width: 50px;}
@@ -107,5 +108,4 @@
#mainMenu .divider {margin: 10px}
.kanbanRegion {margin: 5px}
.modal-header {padding: 15px 0;}
+7 -7
View File
@@ -1197,7 +1197,7 @@ function initKanban($kanban)
onRenderLaneName: renderLaneName,
onRenderHeaderCol: renderHeaderCol,
onRenderCount: renderCount,
droppable: groupBy == 'default' ? {target: findDropColumns, finish:handleFinishDrop, mouseButton: 'left'} : false,
droppable: groupBy == 'default' ? {target: findDropColumns, finish:handleFinishDrop} : false,
});
$kanban.on('click', '.action-cancel', hideKanbanAction);
@@ -1493,28 +1493,28 @@ function calcColHeight(col, lane, colCards, colHeight, kanban)
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')
{
@@ -1526,7 +1526,7 @@ function calcColHeight(col, lane, colCards, colHeight, kanban)
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);
}
+1 -2
View File
@@ -1013,8 +1013,7 @@ $(function()
droppable:
{
target: findDropColumns,
finish: handleFinishDrop,
mouseButton: 'left'
finish: handleFinishDrop
},
onRenderHeaderCol: renderHeaderCol,
onRenderLaneName: renderLaneName,
+7 -3
View File
@@ -57,7 +57,7 @@
<?php echo html::a($this->createLink('programplan', 'create', "projectID=$projectID&productID=$productID"), "<i class='icon icon-plus'></i> " . $lang->programplan->create, '', "class='btn btn-info'");?>
<?php else: ?>
<?php if(common::hasPriv('execution', 'create')):?>
<?php echo html::a($this->createLink('execution', 'create', "projectID=$projectID"), "<i class='icon icon-plus'></i> " . ((($from == 'execution') and ($config->systemMode == 'new')) ? $lang->execution->createExec : $lang->execution->create), '', "class='btn btn-info' data-app='execution'");?>
<?php echo html::a($this->createLink('execution', 'create', "projectID=$projectID"), "<i class='icon icon-plus'></i> " . (($from == 'execution' and $config->systemMode == 'new') ? $lang->execution->createExec : $lang->execution->create), '', "class='btn btn-info' data-app='execution'");?>
<?php endif;?>
<?php endif;?>
</p>
@@ -77,8 +77,10 @@
<?php endif;?>
<?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>
<th><?php common::printOrderLink('name', $orderBy, $vars, ($from == 'execution' and $config->systemMode == 'new') ? $lang->execution->execName : $lang->execution->name);?></th>
<?php if(!$isStage):?>
<th class='c-code'><?php common::printOrderLink('code', $orderBy, $vars, ($from == 'execution' and $config->systemMode == 'new') ? $lang->execution->execCode : $lang->execution->code);?></th>
<?php endif;?>
<?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;?>
@@ -135,7 +137,9 @@
<a class="plan-toggle" data-id="<?php echo $execution->id;?>"><i class="icon icon-angle-double-right"></i></a>
<?php endif;?>
</td>
<?php if(!$isStage):?>
<td title='<?php echo $execution->code;?>'><?php echo $execution->code;?></td>
<?php endif;?>
<?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>
+5 -5
View File
@@ -209,9 +209,9 @@ js::set('hasTaskButton', $hasTaskButton);
<?php foreach($regions as $region):?>
<div class="region<?php if($canSortRegion) echo ' sort';?>" data-id="<?php echo $region->id;?>">
<div class="region-header dropdown">
<span class="strong"><?php echo $region->name;?></span>
<span><i class="icon icon-chevron-double-up" data-id="<?php echo $region->id;?>"></i></span>
<span class='regionActions'>
<strong><?php echo $region->name;?></strong>
<a class="text-muted"><i class="icon icon-chevron-double-up" data-id="<?php echo $region->id;?>"></i></a>
<div class='region-actions'>
<?php if($canEditRegion || $canCreateLane || $canDeleteRegion):?>
<button class="btn btn-link action" type="button" data-toggle="dropdown"><i class="icon icon-ellipsis-v"></i></button>
<ul class="dropdown-menu pull-right">
@@ -220,9 +220,9 @@ js::set('hasTaskButton', $hasTaskButton);
<?php if($canDeleteRegion and count($regions) > 1) echo '<li>' . html::a(helper::createLink('kanban', 'deleteRegion', "regionID={$region->id}"), '<i class="icon icon-trash"></i>' . $this->lang->kanban->deleteRegion, "hiddenwin") . '</li>';?>
</ul>
<?php endif;?>
</span>
</div>
</div>
<div id='kanban<?php echo $region->id;?>' data-id='<?php echo $region->id;?>' class='kanban kanbanRegion'></div>
<div id='kanban<?php echo $region->id;?>' data-id='<?php echo $region->id;?>' class='kanban'></div>
</div>
<?php endforeach;?>
</div>
+6 -6
View File
@@ -151,18 +151,18 @@ body {margin-bottom: 25px;}
<?php
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");
$wizardParams = helper::safe64Encode("executionID=$executionID" . (isset($moduleID) ? "&storyID=0&moduleID=$moduleID" : ""));
$taskCreateLink = $this->createLink('tutorial', 'wizard', "module=task&method=create&params=$wizardParams");
}
else
{
$actionLink = $this->createLink('task', 'create', "executionID=$executionID" . (isset($moduleID) ? "&storyID=0&moduleID=$moduleID" : ""));
$taskCreateLink = $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'");
echo html::a($taskCreateLink, "<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>
<ul class='dropdown-menu pull-right'>
<li><?php echo html::a($actionLink, $lang->task->create);?></li>
<li><?php echo html::a($taskCreateLink, $lang->task->create);?></li>
<li><?php echo html::a($this->createLink('task', 'batchCreate', "executionID=$executionID" . (isset($moduleID) ? "&storyID=0&moduleID=$moduleID" : "")), $lang->task->batchCreate);?></li>
</ul>
</div>
@@ -217,7 +217,7 @@ body {margin-bottom: 25px;}
<p>
<span class="text-muted"><?php echo $lang->task->noTask;?></span>
<?php if($canBeChanged and common::hasPriv('task', 'create')):?>
<?php echo html::a($this->createLink('task', 'create', "execution=$executionID" . (isset($moduleID) ? "&storyID=0&moduleID=$moduleID" : "")), "<i class='icon icon-plus'></i> " . $lang->task->create, '', "class='btn btn-info'");?>
<?php echo html::a($taskCreateLink, "<i class='icon icon-plus'></i> " . $lang->task->create, '', "class='btn btn-info'");?>
<?php endif;?>
</p>
</div>
+2 -1
View File
@@ -15,9 +15,10 @@
.region {border: 1px solid #dcdcdc; background-color: #fff;}
.region + .region {margin-top: 20px;}
.region .region-header {padding: 10px;}
.region .region-header span {font-size: 14px; color: #999EAB}
.region .region-header strong {font-size: 14px; color: #999EAB}
.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-actions {float: right; position: relative; top: -6px; right: -6px;}
.region .region-header .icon-double-angle-up,.icon-double-angle-down {cursor: pointer;}
.region .kanban-header-sub-cols {margin-left:0;}
.region .kanban-header-sub-cols .kanban-header-col > .title {max-width: 100% !important;min-width:240px;}
+3 -3
View File
@@ -822,8 +822,9 @@ function finishCard(cardID, kanbanID, regionID)
* @access public
* @return boolean
*/
function updateRegion(regionID, regionData = [])
function updateRegion(regionID, regionData)
{
if(typeof(regionData) == 'undefined') regionData = [];
if(!regionID) return false;
var $region = $('#kanban'+ regionID).kanban();
@@ -1251,8 +1252,7 @@ function initKanban($kanban)
droppable:
{
target: findDropColumns,
finish: handleFinishDrop,
mouseButton: 'left'
finish: handleFinishDrop
},
});
+1
View File
@@ -755,6 +755,7 @@ class kanbanModel extends model
$plan->title = htmlspecialchars_decode($plan->title);
$plan->desc = strip_tags(htmlspecialchars_decode($plan->desc));
$plan->delay = helper::today() > $plan->end ? true : false;
$plan->actions = array();
foreach($cardActions as $action)
{
+8 -8
View File
@@ -53,9 +53,9 @@ $canCreateLane = commonModel::hasPriv('kanban', 'createLane');
<?php foreach($regions as $region):?>
<div class="region<?php if($canSortRegion) echo ' sort';?>" data-id="<?php echo $region->id;?>">
<div class="region-header dropdown">
<span class="strong"><?php echo $region->name;?></span>
<span><i class="icon icon-chevron-double-up" data-id="<?php echo $region->id;?>"></i></span>
<span class='regionActions'>
<strong><?php echo $region->name;?></strong>
<a class="text-muted"><i class="icon icon-chevron-double-up" data-id="<?php echo $region->id;?>"></i></a>
<div class='region-actions'>
<?php if($canEditRegion || $canCreateLane || $canDeleteRegion):?>
<button class="btn btn-link action" type="button" data-toggle="dropdown"><i class="icon icon-ellipsis-v"></i></button>
<ul class="dropdown-menu pull-right">
@@ -64,12 +64,12 @@ $canCreateLane = commonModel::hasPriv('kanban', 'createLane');
<?php if($canDeleteRegion and count($regions) > 1) echo '<li>' . html::a(inlink('deleteRegion', "regionID={$region->id}"), '<i class="icon icon-trash"></i>' . $this->lang->kanban->deleteRegion, "hiddenwin") . '</li>';?>
</ul>
<?php endif;?>
</span>
<span class='regionActions'>
</div>
<div class='region-actions'>
<?php $canViewArchivedCard = commonModel::hasPriv('kanban', 'viewArchivedCard');?>
<?php $canViewArchivedColumn = commonModel::hasPriv('kanban', 'viewArchivedColumn');?>
<?php if(($canViewArchivedCard or $canViewArchivedColumn) and $kanban->archived):?>
<span>
<div>
<button data-toggle="dropdown" class="btn btn-link action" type="button" title=<?php echo $this->lang->kanban->archived;?>>
<span><?php echo $this->lang->kanban->archived;?></span>
<span class="caret"></span>
@@ -78,13 +78,13 @@ $canCreateLane = commonModel::hasPriv('kanban', 'createLane');
<?php if($canViewArchivedCard) echo '<li>' . html::a("javascript:loadMore(\"Card\", $region->id)", '<i class="icon icon-card-archive"></i>' . $this->lang->kanban->viewArchivedCard) . '</li>';?>
<?php if($canViewArchivedColumn) echo '<li>' . html::a("javascript:loadMore(\"Column\", $region->id)", '<i class="icon icon-col-archive"></i>' . $this->lang->kanban->viewArchivedColumn) . '</li>';?>
</ul>
</span>
</div>
<?php endif;?>
<ul class="dropdown-menu pull-right">
<?php echo '<li>' . html::a(inlink('viewArchivedCard', "", '', 1), '<i class="icon icon-card-archive"></i>' . $this->lang->kanban->viewArchivedCard, '', 'class="iframe" data-toggle="modal" data-width="600px"') . '</li>';?>
<?php echo '<li>' . html::a(inlink('viewArchivedColumn', "", '', 1), '<i class="icon icon-col-archive"></i>' . $this->lang->kanban->viewArchivedColumn, '', 'class="iframe" data-toggle="modal" data-width="600px"') . '</li>';?>
</ul>
</span>
</div>
</div>
<div id='kanban<?php echo $region->id;?>' data-id='<?php echo $region->id;?>' class='kanban'></div>
</div>
+23 -14
View File
@@ -273,14 +273,18 @@ class productModel extends model
/**
* Get product pairs.
*
* @param string $mode
* @param string $programID
* @param string $mode
* @param string $programID
* @param string|array $append
* @return array
*/
public function getPairs($mode = '', $programID = 0)
public function getPairs($mode = '', $programID = 0, $append = '')
{
if(defined('TUTORIAL')) return $this->loadModel('tutorial')->getProductPairs();
if(!empty($append) and is_array($append)) $append = implode($append, ',');
$views = empty($append) ? $this->app->user->view->products : $this->app->user->view->products . ",$append";
$orderBy = !empty($this->config->product->orderBy) ? $this->config->product->orderBy : 'isClosed';
$products = $this->dao->select('*, IF(INSTR(" closed", status) < 2, 0, 1) AS isClosed')
->from(TABLE_PRODUCT)
@@ -288,7 +292,7 @@ class productModel extends model
->beginIF(strpos($mode, 'all') === false)->andWhere('deleted')->eq(0)->fi()
->beginIF($programID)->andWhere('program')->eq($programID)->fi()
->beginIF(strpos($mode, 'noclosed') !== false)->andWhere('status')->ne('closed')->fi()
->beginIF(!$this->app->user->admin and $this->config->vision == 'rnd')->andWhere('id')->in($this->app->user->view->products)->fi()
->beginIF(!$this->app->user->admin and $this->config->vision == 'rnd')->andWhere('id')->in($views)->fi()
->andWhere('vision')->eq($this->config->vision)
->orderBy($orderBy)
->fetchPairs('id', 'name');
@@ -298,14 +302,15 @@ class productModel extends model
/**
* Get product pairs by project.
*
* @param int $projectID
* @param string $status all|noclosed
* @param int $projectID
* @param string $status all|noclosed
* @param string|array $append
* @access public
* @return array
*/
public function getProductPairsByProject($projectID = 0, $status = 'all')
public function getProductPairsByProject($projectID = 0, $status = 'all', $append = '')
{
$products = empty($projectID) ? $this->getList() : $this->getProducts($projectID, $status);
$products = empty($projectID) ? $this->getList() : $this->getProducts($projectID, $status, '', true, $append);
$pairs = array();
if(!empty($products))
{
@@ -337,14 +342,15 @@ class productModel extends model
/**
* Get products by project.
*
* @param int $projectID
* @param int $status all|noclosed
* @param string $orderBy
* @param bool $withBranch
* @param int $projectID
* @param string $status all|noclosed
* @param string $orderBy
* @param bool $withBranch
* @param string|array $append
* @access public
* @return array
*/
public function getProducts($projectID = 0, $status = 'all', $orderBy = '', $withBranch = true)
public function getProducts($projectID = 0, $status = 'all', $orderBy = '', $withBranch = true, $append = '')
{
if(defined('TUTORIAL'))
{
@@ -352,13 +358,16 @@ class productModel extends model
return $this->loadModel('tutorial')->getExecutionProducts();
}
if(!empty($append) and is_array($append)) $append = implode($append, ',');
$views = empty($append) ? $this->app->user->view->products : $this->app->user->view->products . ",$append";
$projectProducts = $this->dao->select('t1.branch, t1.plan, t2.*')
->from(TABLE_PROJECTPRODUCT)->alias('t1')
->leftJoin(TABLE_PRODUCT)->alias('t2')
->on('t1.product = t2.id')
->where('t2.deleted')->eq(0)
->beginIF(!empty($projectID))->andWhere('t1.project')->eq($projectID)->fi()
->beginIF(!$this->app->user->admin and $this->config->vision == 'rnd')->andWhere('t2.id')->in($this->app->user->view->products)->fi()
->beginIF(!$this->app->user->admin and $this->config->vision == 'rnd')->andWhere('t2.id')->in($views)->fi()
->andWhere('t2.vision')->eq($this->config->vision)
->beginIF(strpos($status, 'noclosed') !== false)->andWhere('t2.status')->ne('closed')->fi()
->orderBy($orderBy . 't2.order asc')
+2 -3
View File
@@ -67,8 +67,7 @@ $(function()
droppable:
{
target: findDropColumns,
finish: handleFinishDrop,
mouseButton: 'left'
finish: handleFinishDrop
}
});
@@ -356,7 +355,7 @@ function renderKanbanItem(item, $item)
var today = new Date();
var begin = $.zui.createDate(item.begin);
var end = $.zui.createDate(item.end);
if(end.getTime() < today.getTime() && (item.status == 'wait' || item.status == 'doing'))
if(item.delay && (item.status == 'wait' || item.status == 'doing'))
{
$expired = $titleBox.children('.expired');
if(!$expired.length)
+9 -5
View File
@@ -62,13 +62,14 @@ class programModel extends model
/**
* Get the product associated with the program.
*
* @param int $programID
* @param string $mode all|assign
* @param string $status all|noclosed
* @param int $programID
* @param string $mode all|assign
* @param string $status all|noclosed
* @param string|array $append
* @access public
* @return array
*/
public function getProductPairs($programID = 0, $mode = 'assign', $status = 'all')
public function getProductPairs($programID = 0, $mode = 'assign', $status = 'all', $append = '')
{
/* Get the top programID. */
if($programID)
@@ -80,12 +81,15 @@ class programModel extends model
}
/* When mode equals assign and programID equals 0, you can query the standalone product. */
if(!empty($append) and is_array($append)) $append = implode($append, ',');
$views = empty($append) ? $this->app->user->view->products : $this->app->user->view->products . ",$append";
$products = $this->dao->select('*')->from(TABLE_PRODUCT)
->where('deleted')->eq(0)
->andWhere('vision')->eq($this->config->vision)
->beginIF($mode == 'assign')->andWhere('program')->eq($programID)->fi()
->beginIF(strpos($status, 'noclosed') !== false)->andWhere('status')->ne('closed')->fi()
->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->products)->fi()
->beginIF(!$this->app->user->admin)->andWhere('id')->in($views)->fi()
->fetchPairs('id', 'name');
return $products;
}
+18 -16
View File
@@ -571,16 +571,17 @@ class project extends control
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $locateLink));
}
$linkedBranches = array();
$linkedBranchList = array();
$productPlans = array(0 => '');
$allProducts = $this->program->getProductPairs($project->parent, 'assign', 'noclosed');
$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|unexpired');
$projectStories = $this->project->getStoriesByProject($projectID);
$projectBranches = $this->project->getBranchGroupByProject($projectID, array_keys($linkedProducts));
$linkedBranches = array();
$linkedBranchList = array();
$productPlans = array(0 => '');
$branches = $this->project->getBranchesByProject($projectID);
$linkedProductIdList = empty($branches) ? '' : array_keys($branches);
$allProducts = $this->program->getProductPairs($project->parent, 'assign', 'noclosed', $linkedProductIdList);
$linkedProducts = $this->loadModel('product')->getProducts($projectID, 'all', '', true, $linkedProductIdList);
$parentProject = $this->program->getByID($project->parent);
$plans = $this->productplan->getGroupByProduct(array_keys($linkedProducts), 'skipParent|unexpired');
$projectStories = $this->project->getStoriesByProject($projectID);
$projectBranches = $this->project->getBranchGroupByProject($projectID, array_keys($linkedProducts));
/* If the story of the product which linked the project, you don't allow to remove the product. */
$unmodifiableProducts = array();
@@ -1805,12 +1806,13 @@ class project extends control
$this->project->setMenu($projectID);
}
$linkedBranches = array();
$allProducts = $this->program->getProductPairs($project->parent, 'assign', 'noclosed');
$linkedProducts = $this->product->getProducts($projectID);
$branches = $this->project->getBranchesByProject($projectID);
$projectStories = $this->project->getStoriesByProject($projectID);
$projectBranches = $this->project->getBranchGroupByProject($projectID, array_keys($linkedProducts));
$linkedBranches = array();
$branches = $this->project->getBranchesByProject($projectID);
$linkedProductIdList = empty($branches) ? '' : array_keys($branches);
$allProducts = $this->program->getProductPairs($project->parent, 'assign', 'noclosed', $linkedProductIdList);
$linkedProducts = $this->product->getProducts($projectID, 'all', '', true, $linkedProductIdList);
$projectStories = $this->project->getStoriesByProject($projectID);
$projectBranches = $this->project->getBranchGroupByProject($projectID, array_keys($linkedProducts));
/* If the story of the product which linked the project, you don't allow to remove the product. */
$unmodifiableProducts = array();
+1 -2
View File
@@ -208,8 +208,7 @@ $(function()
{
selector: '.kanban-card:not(.execution-item)',
target: findDropColumns,
finish: handleFinishDrop,
mouseButton: 'left'
finish: handleFinishDrop
},
});
});
@@ -22,6 +22,7 @@
#projectTableList .project-name.has-suffix > a {max-width: calc(100% - 100px);}
#projectTableList .project-name.has-prefix > a {padding-left: 5px;}
#projectTableList .project-name.has-suffix > a {padding-right: 5px;}
.table-footer {z-index: 1;}
</style>
<div id="mainMenu" class="clearfix">
<?php if($this->config->systemMode == 'new'):?>
+1 -1
View File
@@ -33,7 +33,7 @@ $lang->story->link = 'Link';
$lang->story->unlink = 'Unlink';
$lang->story->track = 'Track';
$lang->story->trackAB = 'Track';
$lang->story->processStoryChange = 'Process Story Change';
$lang->story->processStoryChange = 'Confirm Story Change';
$lang->story->splitRequirent = 'Decompose';
$lang->story->close = 'Close';
$lang->story->batchClose = 'Batch Close';
+1 -1
View File
@@ -33,7 +33,7 @@ $lang->story->link = '关联';
$lang->story->unlink = '移除';
$lang->story->track = '跟踪矩阵';
$lang->story->trackAB = '矩阵';
$lang->story->processStoryChange = '处理需求变更';
$lang->story->processStoryChange = '确认需求变动';
$lang->story->splitRequirent = '拆分';
$lang->story->close = '关闭';
$lang->story->batchClose = '批量关闭';
-8
View File
@@ -173,14 +173,6 @@ $lang->testtask->report->charts['testTaskPerRunResult'] = 'Ergebnisbericht';
$lang->testtask->report->charts['testTaskPerType'] = 'Berichttyp';
$lang->testtask->report->charts['testTaskPerModule'] = 'Modulbericht';
$lang->testtask->report->charts['testTaskPerRunner'] = 'Ausgeführt von Bericht';
$lang->testtask->report->charts['bugSeverityGroups'] = 'Dringlichkeitsbericht';
$lang->testtask->report->charts['bugStatusGroups'] = 'Status Bericht';
$lang->testtask->report->charts['bugOpenedByGroups'] = 'Bugersteller Bericht';
$lang->testtask->report->charts['bugResolvedByGroups'] = 'Gelöst von Bericht';
$lang->testtask->report->charts['bugResolutionGroups'] = 'Lösungsbersicht';
$lang->testtask->report->charts['bugModuleGroups'] = 'Bug Modul Bericht';
$lang->testtask->report->charts['bugStageGroups'] = 'Bug Priority Distribution';
$lang->testtask->report->charts['bugHandleGroups'] = 'Distribution of daily bug processing';
$lang->testtask->report->options = new stdclass();
$lang->testtask->report->options->graph = new stdclass();
-8
View File
@@ -183,14 +183,6 @@ $lang->testtask->report->charts['testTaskPerRunResult'] = 'Test Case Result';
$lang->testtask->report->charts['testTaskPerType'] = 'Test Case Type';
$lang->testtask->report->charts['testTaskPerModule'] = 'Test Case Module';
$lang->testtask->report->charts['testTaskPerRunner'] = 'Test Case RunBy';
$lang->testtask->report->charts['bugSeverityGroups'] = 'Bug Severity Distribution';
$lang->testtask->report->charts['bugStatusGroups'] = 'Bug Status Distribution';
$lang->testtask->report->charts['bugOpenedByGroups'] = 'Bug ReportedBy Distribution';
$lang->testtask->report->charts['bugResolvedByGroups'] = 'Bug ResolvedBy Distribution';
$lang->testtask->report->charts['bugResolutionGroups'] = 'Bug Resolution Distribution';
$lang->testtask->report->charts['bugModuleGroups'] = 'Bug Module Distribution';
$lang->testtask->report->charts['bugStageGroups'] = 'Bug Priority Distribution';
$lang->testtask->report->charts['bugHandleGroups'] = 'Distribution of daily bug processing';
$lang->testtask->report->options = new stdclass();
$lang->testtask->report->options->graph = new stdclass();
-8
View File
@@ -173,14 +173,6 @@ $lang->testtask->report->charts['testTaskPerRunResult'] = 'Résultat des CasTest
$lang->testtask->report->charts['testTaskPerType'] = 'Type de CasTests';
$lang->testtask->report->charts['testTaskPerModule'] = 'Module CasTests';
$lang->testtask->report->charts['testTaskPerRunner'] = 'CasTests joués par';
$lang->testtask->report->charts['bugSeverityGroups'] = 'Distribution Bug Sévérité';
$lang->testtask->report->charts['bugStatusGroups'] = 'Distribution Bug Statuts';
$lang->testtask->report->charts['bugOpenedByGroups'] = 'Distribution signalement de Bug';
$lang->testtask->report->charts['bugResolvedByGroups'] = 'Distribution Résolus par';
$lang->testtask->report->charts['bugResolutionGroups'] = 'Distribution Résolution';
$lang->testtask->report->charts['bugModuleGroups'] = 'Distribution Bug Module';
$lang->testtask->report->charts['bugStageGroups'] = 'Bug Priority Distribution';
$lang->testtask->report->charts['bugHandleGroups'] = 'Distribution of daily bug processing';
$lang->testtask->report->options = new stdclass();
$lang->testtask->report->options->graph = new stdclass();
-8
View File
@@ -173,14 +173,6 @@ $lang->testtask->report->charts['testTaskPerRunResult'] = 'Test Kết quả tìn
$lang->testtask->report->charts['testTaskPerType'] = 'Test Loại tình huống';
$lang->testtask->report->charts['testTaskPerModule'] = 'Test Case Module';
$lang->testtask->report->charts['testTaskPerRunner'] = 'Test Case RunBy';
$lang->testtask->report->charts['bugSeverityGroups'] = 'Phân chia mức độ Bug';
$lang->testtask->report->charts['bugStatusGroups'] = 'Phân chia tình trạng Bug';
$lang->testtask->report->charts['bugOpenedByGroups'] = 'Phân chia người báo cáo Bug';
$lang->testtask->report->charts['bugResolvedByGroups'] = 'Phân chia người giải quyết Bug';
$lang->testtask->report->charts['bugResolutionGroups'] = 'Phân chia giải pháp Bug';
$lang->testtask->report->charts['bugModuleGroups'] = 'Phân chia Module Bug';
$lang->testtask->report->charts['bugStageGroups'] = 'Bug Priority Distribution';
$lang->testtask->report->charts['bugHandleGroups'] = 'Distribution of daily bug processing';
$lang->testtask->report->options = new stdclass();
$lang->testtask->report->options->graph = new stdclass();
-8
View File
@@ -183,14 +183,6 @@ $lang->testtask->report->charts['testTaskPerRunResult'] = '按用例结果统计
$lang->testtask->report->charts['testTaskPerType'] = '按用例类型统计';
$lang->testtask->report->charts['testTaskPerModule'] = '按用例模块统计';
$lang->testtask->report->charts['testTaskPerRunner'] = '按用例执行人统计';
$lang->testtask->report->charts['bugSeverityGroups'] = 'Bug严重级别分布';
$lang->testtask->report->charts['bugStatusGroups'] = 'Bug状态分布';
$lang->testtask->report->charts['bugOpenedByGroups'] = 'Bug创建者分布';
$lang->testtask->report->charts['bugResolvedByGroups'] = 'Bug解决者分布';
$lang->testtask->report->charts['bugResolutionGroups'] = 'Bug解决方案分布';
$lang->testtask->report->charts['bugModuleGroups'] = 'Bug模块分布';
$lang->testtask->report->charts['bugStageGroups'] = 'Bug重要程度阶段分布';
$lang->testtask->report->charts['bugHandleGroups'] = 'Bug每日处理情况分布';
$lang->testtask->report->options = new stdclass();
$lang->testtask->report->options->graph = new stdclass();
-8
View File
@@ -183,14 +183,6 @@ $lang->testtask->report->charts['testTaskPerRunResult'] = '按用例結果統計
$lang->testtask->report->charts['testTaskPerType'] = '按用例類型統計';
$lang->testtask->report->charts['testTaskPerModule'] = '按用例模組統計';
$lang->testtask->report->charts['testTaskPerRunner'] = '按用例執行人統計';
$lang->testtask->report->charts['bugSeverityGroups'] = 'Bug嚴重級別分佈';
$lang->testtask->report->charts['bugStatusGroups'] = 'Bug狀態分佈';
$lang->testtask->report->charts['bugOpenedByGroups'] = 'Bug創建者分佈';
$lang->testtask->report->charts['bugResolvedByGroups'] = 'Bug解決者分佈';
$lang->testtask->report->charts['bugResolutionGroups'] = 'Bug解決方案分佈';
$lang->testtask->report->charts['bugModuleGroups'] = 'Bug模組分佈';
$lang->testtask->report->charts['bugStageGroups'] = 'Bug重要程度階段分佈';
$lang->testtask->report->charts['bugHandleGroups'] = 'Bug每日處理情況分佈';
$lang->testtask->report->options = new stdclass();
$lang->testtask->report->options->graph = new stdclass();
+179
View File
@@ -0,0 +1,179 @@
<?php
class buildTest
{
public function __construct()
{
global $tester;
$this->objectModel = $tester->loadModel('build');
}
/**
* function getByID by test
*
* @param string $buildID
* @param beel $setImgSize
* @access public
* @return object
*/
public function getByIDTest($buildID, $setImgSize = false)
{
$objects = $this->objectModel->getByID($buildID);
if(dao::isError()) return dao::getError();
return $objects;
}
/**
* function getByList test by build
*
* @param array $idList
* @param string $count
* @access public
* @return array
*/
public function getByListTest($idList, $count)
{
$objects = $this->objectModel->getByList($idList);
if(dao::isError()) return dao::getError();
if($count == '1') return count($objects);
return $objects;
}
public function getProjectBuildsTest($projectID = 0, $type = 'all', $param = 0, $orderBy = 't1.date_desc,t1.id_desc', $pager = null)
{
$objects = $this->objectModel->getProjectBuilds($projectID = 0, $type = 'all', $param = 0, $orderBy = 't1.date_desc,t1.id_desc', $pager = null);
if(dao::isError()) return dao::getError();
return $objects;
}
public function getProjectBuildsBySearchTest($projectID, $queryID)
{
$objects = $this->objectModel->getProjectBuildsBySearch($projectID, $queryID);
if(dao::isError()) return dao::getError();
return $objects;
}
public function getExecutionBuildsTest($executionID, $type = '', $param = '', $orderBy = 't1.date_desc,t1.id_desc', $pager = null)
{
$objects = $this->objectModel->getExecutionBuilds($executionID, $type = '', $param = '', $orderBy = 't1.date_desc,t1.id_desc', $pager = null);
if(dao::isError()) return dao::getError();
return $objects;
}
public function getExecutionBuildsBySearchTest($executionID, $queryID)
{
$objects = $this->objectModel->getExecutionBuildsBySearch($executionID, $queryID);
if(dao::isError()) return dao::getError();
return $objects;
}
public function getBuildPairsTest($products, $branch = 'all', $params = 'noterminate, nodone', $objectID = 0, $objectType = 'execution', $buildIdList = '', $replace = true)
{
$objects = $this->objectModel->getBuildPairs($products, $branch = 'all', $params = 'noterminate, nodone', $objectID = 0, $objectType = 'execution', $buildIdList = '', $replace = true);
if(dao::isError()) return dao::getError();
return $objects;
}
public function getLastTest($executionID)
{
$objects = $this->objectModel->getLast($executionID);
if(dao::isError()) return dao::getError();
return $objects;
}
public function createTest($executionID)
{
$objects = $this->objectModel->create($executionID);
if(dao::isError()) return dao::getError();
return $objects;
}
public function updateTest($buildID)
{
$objects = $this->objectModel->update($buildID);
if(dao::isError()) return dao::getError();
return $objects;
}
public function updateLinkedBugTest($build)
{
$objects = $this->objectModel->updateLinkedBug($build);
if(dao::isError()) return dao::getError();
return $objects;
}
public function linkStoryTest($buildID)
{
$objects = $this->objectModel->linkStory($buildID);
if(dao::isError()) return dao::getError();
return $objects;
}
public function unlinkStoryTest($buildID, $storyID)
{
$objects = $this->objectModel->unlinkStory($buildID, $storyID);
if(dao::isError()) return dao::getError();
return $objects;
}
public function batchUnlinkStoryTest($buildID)
{
$objects = $this->objectModel->batchUnlinkStory($buildID);
if(dao::isError()) return dao::getError();
return $objects;
}
public function linkBugTest($buildID)
{
$objects = $this->objectModel->linkBug($buildID);
if(dao::isError()) return dao::getError();
return $objects;
}
public function unlinkBugTest($buildID, $bugID)
{
$objects = $this->objectModel->unlinkBug($buildID, $bugID);
if(dao::isError()) return dao::getError();
return $objects;
}
public function batchUnlinkBugTest($buildID)
{
$objects = $this->objectModel->batchUnlinkBug($buildID);
if(dao::isError()) return dao::getError();
return $objects;
}
}
+15
View File
@@ -0,0 +1,15 @@
title: table zt_storyreview
desc: ""
author: automated export
version: "1.0"
fields:
- field: story
range: 301-400
- field: version
range: "1"
- field: reviewer
range: admin{50},dev3{50}
- field: result
range: ""
- field: reviewDate
range: ""
+2 -2
View File
@@ -5,14 +5,14 @@ version: "1.0"
fields:
- field: story
note: "需求ID"
range: 1-30
range: 1-450,1-100,1-20
prefix: ""
postfix: ""
loop: 0
format: ""
- field: version
note: "版本"
range: 1{30},2{30},3{20}
range: 1{450},2{100},3{20}
prefix: ""
postfix: ""
loop: 0
+32
View File
@@ -0,0 +1,32 @@
title: table zt_storystage
desc: "需求阶段"
author: automated export
version: "1.0"
fields:
- field: story
note: "需求ID"
range: 1-450
prefix: ""
postfix: ""
loop: 0
format: ""
- field: branch
note: "分支"
range: 0
prefix: ""
postfix: ""
loop: 0
format: ""
- field: stage
note: "所处阶段"
range: wait,planned,projected,developing,developed,testing,tested,verified,released,closed
prefix: ""
postfix: ""
loop: 0
format: ""
- field: stagedBy
note: "设置阶段者"
prefix: ""
postfix: ""
loop: 0
format: ""
+3 -1
View File
@@ -18,9 +18,11 @@ $builder->sprint = array('rows' => 600, 'extends' => array('project', 'ex
$builder->story = array('rows' => 400, 'extends' => array('story'));
$builder->childstory = array('rows' => 50, 'extends' => array('story','childstory'));
$builder->storyreview = array('rows' => 100, 'extends' => array('storyreview'));
$builder->storymodule = array('rows' => 800, 'extends' => array('module','storymodule'));
$builder->storyplan = array('rows' => 400, 'extends' => array('planstory'));
$builder->storyspec = array('rows' => 80, 'extends' => array('storyspec'));
$builder->storystage = array('rows' => 450, 'extends' => array('storystage'));
$builder->storyspec = array('rows' => 570, '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'));
+1
View File
@@ -157,6 +157,7 @@ class Processor
private function initStory()
{
$this->dao->update(TABLE_STORY)->set('`status`')->eq('active')->where('id')->le('20')->exec();
$this->dao->update(TABLE_STORY)->set('`status`')->eq('draft')->where('id')->ge('300')->andwhere('id')->le('400')->exec();
}
/**
+17
View File
@@ -0,0 +1,17 @@
#!/usr/bin/env php
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/build.class.php';
su('admin');
/**
title=测试 buildModel->batchUnlinkBug();
cid=1
pid=1
*/
$build = new buildTest();
r($build->batchUnlinkBugTest()) && p() && e();
+17
View File
@@ -0,0 +1,17 @@
#!/usr/bin/env php
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/build.class.php';
su('admin');
/**
title=测试 buildModel->batchUnlinkStory();
cid=1
pid=1
*/
$build = new buildTest();
r($build->batchUnlinkStoryTest()) && p() && e();
+17
View File
@@ -0,0 +1,17 @@
#!/usr/bin/env php
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/build.class.php';
su('admin');
/**
title=测试 buildModel->create();
cid=1
pid=1
*/
$build = new buildTest();
r($build->createTest()) && p() && e();
+17
View File
@@ -0,0 +1,17 @@
#!/usr/bin/env php
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/build.class.php';
su('admin');
/**
title=测试 buildModel->getBuildPairs();
cid=1
pid=1
*/
$build = new buildTest();
r($build->getBuildPairsTest()) && p() && e();
+22
View File
@@ -0,0 +1,22 @@
#!/usr/bin/env php
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/build.class.php';
su('admin');
/**
title=测试 buildModel->getByID();
cid=1
pid=1
*/
$buildID = array('7', '17');
$build = new buildTest();
r($build->getByIDTest($buildID[0], true)) && p('name') && e('项目版本版本7'); //项目版本查询
r($build->getByIDTest($buildID[1], false)) && p('name') && e('执行版本版本17'); //执行版本查询
r($build->getByIDTest('', true)) && p() && e('0'); //无id查询
r($build->getByIDTest($buildID[0], 'test')) && p('project') && e('17'); //图片字段传字符串测试
+24
View File
@@ -0,0 +1,24 @@
#!/usr/bin/env php
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/build.class.php';
su('admin');
/**
title=测试 buildModel->getByList();
cid=1
pid=1
*/
$buildIDList = array('7', '17');
$count = array('0', '1');
$build = new buildTest();
r($build->getByListTest($buildIDList, $count[0])) && p('7:project,name') && e('17,项目版本版本7'); //buildid列表查询
r($build->getByListTest($buildIDList[1], $count[0])) && p('17:execution,name') && e('107,项目版本版本7'); //单独id查询
r($build->getByListTest($buildIDList, $count[1])) && p() && e('2'); //buildid列表查询统计
r($build->getByListTest($buildIDList[1], $count[1])) && p() && e('1'); //单独id查询统计
r($build->getByListTest('', $count[0])) && p() && e('0'); //不输入id列表查询
+17
View File
@@ -0,0 +1,17 @@
#!/usr/bin/env php
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/build.class.php';
su('admin');
/**
title=测试 buildModel->getExecutionBuilds();
cid=1
pid=1
*/
$build = new buildTest();
r($build->getExecutionBuildsTest()) && p() && e();
@@ -0,0 +1,17 @@
#!/usr/bin/env php
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/build.class.php';
su('admin');
/**
title=测试 buildModel->getExecutionBuildsBySearch();
cid=1
pid=1
*/
$build = new buildTest();
r($build->getExecutionBuildsBySearchTest()) && p() && e();
+17
View File
@@ -0,0 +1,17 @@
#!/usr/bin/env php
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/build.class.php';
su('admin');
/**
title=测试 buildModel->getLast();
cid=1
pid=1
*/
$build = new buildTest();
r($build->getLastTest()) && p() && e();
+17
View File
@@ -0,0 +1,17 @@
#!/usr/bin/env php
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/build.class.php';
su('admin');
/**
title=测试 buildModel->getProjectBuilds();
cid=1
pid=1
*/
$build = new buildTest();
r($build->getProjectBuildsTest()) && p() && e();
@@ -0,0 +1,17 @@
#!/usr/bin/env php
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/build.class.php';
su('admin');
/**
title=测试 buildModel->getProjectBuildsBySearch();
cid=1
pid=1
*/
$build = new buildTest();
r($build->getProjectBuildsBySearchTest()) && p() && e();
+17
View File
@@ -0,0 +1,17 @@
#!/usr/bin/env php
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/build.class.php';
su('admin');
/**
title=测试 buildModel->linkBug();
cid=1
pid=1
*/
$build = new buildTest();
r($build->linkBugTest()) && p() && e();
+17
View File
@@ -0,0 +1,17 @@
#!/usr/bin/env php
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/build.class.php';
su('admin');
/**
title=测试 buildModel->linkStory();
cid=1
pid=1
*/
$build = new buildTest();
r($build->linkStoryTest()) && p() && e();
+17
View File
@@ -0,0 +1,17 @@
#!/usr/bin/env php
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/build.class.php';
su('admin');
/**
title=测试 buildModel->unlinkBug();
cid=1
pid=1
*/
$build = new buildTest();
r($build->unlinkBugTest()) && p() && e();
+17
View File
@@ -0,0 +1,17 @@
#!/usr/bin/env php
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/build.class.php';
su('admin');
/**
title=测试 buildModel->unlinkStory();
cid=1
pid=1
*/
$build = new buildTest();
r($build->unlinkStoryTest()) && p() && e();
+17
View File
@@ -0,0 +1,17 @@
#!/usr/bin/env php
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/build.class.php';
su('admin');
/**
title=测试 buildModel->update();
cid=1
pid=1
*/
$build = new buildTest();
r($build->updateTest()) && p() && e();
+17
View File
@@ -0,0 +1,17 @@
#!/usr/bin/env php
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/build.class.php';
su('admin');
/**
title=测试 buildModel->updateLinkedBug();
cid=1
pid=1
*/
$build = new buildTest();
r($build->updateLinkedBugTest()) && p() && e();
+1 -1
View File
@@ -1,5 +1,5 @@
/*!
* ZUI: ZUI Kanban View - v1.10.0 - 2022-03-23
* ZUI: ZUI Kanban View - v1.10.0 - 2022-03-24
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long