Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms into sprint/master_lanzongjun_fixbug
This commit is contained in:
@@ -378,3 +378,5 @@ $config->newFeatures = array('introduction', 'tutorial', 'youngBlueTheme', 'visi
|
||||
$config->programPriv = new stdclass();
|
||||
$config->programPriv->scrum = array('story', 'projectstory', 'projectrelease', 'project', 'execution', 'build', 'bug', 'testcase', 'testreport', 'doc', 'repo', 'meeting', 'stakeholder', 'testtask');
|
||||
$config->programPriv->waterfall = array_merge($config->programPriv->scrum, array('task', 'workestimation', 'durationestimation', 'budget', 'programplan', 'review', 'reviewissue', 'weekly', 'cm', 'milestone', 'design', 'issue', 'risk', 'opportunity', 'measrecord', 'auditplan', 'trainplan', 'gapanalysis', 'pssp', 'researchplan', 'researchreport'));
|
||||
|
||||
$config->waterfallModules = array('workestimation', 'durationestimation', 'budget', 'programplan', 'review', 'reviewissue', 'weekly', 'cm', 'milestone', 'design', 'opportunity', 'auditplan', 'trainplan', 'gapanalysis', 'pssp', 'researchplan', 'researchreport');
|
||||
|
||||
+38
-38
@@ -9,14 +9,14 @@
|
||||
* @version $Id: date.class.php 2605 2013-01-09 07:22:58Z wwccss $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class date
|
||||
class date
|
||||
{
|
||||
/**
|
||||
* Build hour time list.
|
||||
*
|
||||
* @param int $begin
|
||||
* @param int $end
|
||||
* @param int $delta
|
||||
*
|
||||
* @param int $begin
|
||||
* @param int $end
|
||||
* @param int $delta
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
@@ -37,7 +37,7 @@ class date
|
||||
|
||||
/**
|
||||
* Get today.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return date
|
||||
*/
|
||||
@@ -47,8 +47,8 @@ class date
|
||||
}
|
||||
|
||||
/**
|
||||
* Get yesterday
|
||||
*
|
||||
* Get yesterday
|
||||
*
|
||||
* @access public
|
||||
* @return date
|
||||
*/
|
||||
@@ -59,7 +59,7 @@ class date
|
||||
|
||||
/**
|
||||
* Get tomorrow.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return date
|
||||
*/
|
||||
@@ -70,7 +70,7 @@ class date
|
||||
|
||||
/**
|
||||
* Get the day before yesterday.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return date
|
||||
*/
|
||||
@@ -81,8 +81,8 @@ class date
|
||||
|
||||
/**
|
||||
* Get now time period.
|
||||
*
|
||||
* @param int $delta
|
||||
*
|
||||
* @param int $delta
|
||||
* @access public
|
||||
* @return string the current time period, like 0915
|
||||
*/
|
||||
@@ -114,8 +114,8 @@ class date
|
||||
|
||||
/**
|
||||
* Format time 0915 to 09:15
|
||||
*
|
||||
* @param string $time
|
||||
*
|
||||
* @param string $time
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
@@ -127,7 +127,7 @@ class date
|
||||
|
||||
/**
|
||||
* Get the begin and end date of this week.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
@@ -141,7 +141,7 @@ class date
|
||||
|
||||
/**
|
||||
* Get the begin and end date of last week.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
@@ -155,7 +155,7 @@ class date
|
||||
|
||||
/**
|
||||
* Get the time at the middle of this week.
|
||||
*
|
||||
*
|
||||
* If today in week is 1, move it one day in future. Else is 7, move it back one day. To keep the time geted in this week.
|
||||
*
|
||||
* @access public
|
||||
@@ -172,7 +172,7 @@ class date
|
||||
|
||||
/**
|
||||
* Get middle of last week.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return time
|
||||
*/
|
||||
@@ -188,7 +188,7 @@ class date
|
||||
|
||||
/**
|
||||
* Get begin and end time of this month.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
@@ -201,7 +201,7 @@ class date
|
||||
|
||||
/**
|
||||
* Get begin and end time of last month.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
@@ -213,11 +213,11 @@ class date
|
||||
}
|
||||
|
||||
/**
|
||||
* Get begin and end time of this season.
|
||||
*
|
||||
* Get begin and end time of this season.
|
||||
*
|
||||
* @static
|
||||
* @access public
|
||||
* @return array
|
||||
* @return array
|
||||
*/
|
||||
public static function getThisSeason()
|
||||
{
|
||||
@@ -230,11 +230,11 @@ class date
|
||||
}
|
||||
|
||||
/**
|
||||
* Get begin and end time of last season.
|
||||
*
|
||||
* Get begin and end time of last season.
|
||||
*
|
||||
* @static
|
||||
* @access public
|
||||
* @return array
|
||||
* @return array
|
||||
*/
|
||||
public static function getLastSeason()
|
||||
{
|
||||
@@ -242,43 +242,43 @@ class date
|
||||
$begin = date('Y-m-d H:i:s', mktime(0, 0, 0, $season * 3 - 2, 1, date('Y')));
|
||||
$endDay = date('t', mktime(0, 0 , 0, $season * 3, 1, date("Y"))); // Get end day.
|
||||
$end = date('Y-m-d H:i:s', mktime(23, 59, 59, $season * 3, $endDay, date('Y')));
|
||||
|
||||
|
||||
return array('begin' => $begin, 'end' => $end);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get begin and end time of this year.
|
||||
*
|
||||
*
|
||||
* @static
|
||||
* @access public
|
||||
* @return array
|
||||
* @return array
|
||||
*/
|
||||
public static function getThisYear()
|
||||
{
|
||||
$begin = date(DT_DATE1, strtotime('1/1 this year')) . ' 00:00:00';
|
||||
$end = date(DT_DATE1, strtotime('1/1 next year -1 day')) . ' 23:59:59';
|
||||
$end = date(DT_DATE1, strtotime('1/1 next year -1 day')) . ' 23:59:59';
|
||||
return array('begin' => $begin, 'end' => $end);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get begin and end time of last year.
|
||||
*
|
||||
*
|
||||
* @static
|
||||
* @access public
|
||||
* @return array
|
||||
* @return array
|
||||
*/
|
||||
public static function getLastYear()
|
||||
{
|
||||
$begin = date(DT_DATE1, strtotime('1/1 last year')) . ' 00:00:00';
|
||||
$end = date(DT_DATE1, strtotime('1/1 this year -1 day')) . ' 23:59:59';
|
||||
$end = date(DT_DATE1, strtotime('1/1 this year -1 day')) . ' 23:59:59';
|
||||
return array('begin' => $begin, 'end' => $end);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get date list
|
||||
*
|
||||
* @param string $begin
|
||||
* @param string $end
|
||||
* Get date list
|
||||
*
|
||||
* @param string $begin
|
||||
* @param string $end
|
||||
* @param string $format m/d/Y|Y-m-d
|
||||
* @param string $type noweekend|withweekend
|
||||
* @param int $weekend 2|1
|
||||
@@ -295,7 +295,7 @@ class date
|
||||
for($date = $begin; $date <= $end; $date += 24 * 3600)
|
||||
{
|
||||
$weekDay = date('w', $date);
|
||||
if($type == 'noweekend' and (($weekend == 2 and $weekDay == 6) or $weekDay == 0)) continue;
|
||||
if(strpos($type, 'noweekend') !== false and (($weekend == 2 and $weekDay == 6) or $weekDay == 0)) continue;
|
||||
|
||||
$dateList[] = date($format, $date);
|
||||
}
|
||||
|
||||
@@ -1149,12 +1149,12 @@ class execution extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function burn($executionID = 0, $type = 'noweekend', $interval = 0, $burnBy = 'left')
|
||||
public function burn($executionID = 0, $type = 'noweekend,nodelay', $interval = 0, $burnBy = 'left')
|
||||
{
|
||||
$this->loadModel('report');
|
||||
$execution = $this->commonAction($executionID);
|
||||
$executionID = $execution->id;
|
||||
$burnBy = $this->cookie->burnBy ? $this->cookie->burnBy : $burnBy;
|
||||
$burnBy = $this->cookie->burnBy ? $this->cookie->burnBy : $burnBy;
|
||||
|
||||
/* Header and position. */
|
||||
$title = $execution->name . $this->lang->colon . $this->lang->execution->burn;
|
||||
@@ -1163,7 +1163,10 @@ class execution extends control
|
||||
|
||||
/* Get date list. */
|
||||
$executionInfo = $this->execution->getByID($executionID);
|
||||
list($dateList, $interval) = $this->execution->getDateList($executionInfo->begin, $executionInfo->end, $type, $interval, 'Y-m-d');
|
||||
$deadline = $execution->status == 'closed' ? substr($execution->closedDate, 0, 10) : $execution->suspendedDate;
|
||||
$deadline = strpos('closed,suspended', $execution->status) === false ? helper::today() : $deadline;
|
||||
$endDate = strpos($type, 'withdelay') !== false ? $deadline : $executionInfo->end;
|
||||
list($dateList, $interval) = $this->execution->getDateList($executionInfo->begin, $endDate, $type, $interval, 'Y-m-d');
|
||||
$chartData = $this->execution->buildBurnData($executionID, $dateList, $type, $burnBy);
|
||||
|
||||
$dayList = array_fill(1, floor((int)$execution->days / $this->config->execution->maxBurnDay) + 5, '');
|
||||
@@ -1838,6 +1841,7 @@ class execution extends control
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->loadModel('action');
|
||||
$this->execution->computeBurn($executionID);
|
||||
$changes = $this->execution->suspend($executionID);
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
|
||||
@@ -1933,6 +1937,7 @@ class execution extends control
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->loadModel('action');
|
||||
$this->execution->computeBurn($executionID);
|
||||
$changes = $this->execution->close($executionID);
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
|
||||
|
||||
@@ -6,5 +6,6 @@
|
||||
#burnLegend > div {position: relative; padding-left: 30px;}
|
||||
#burnLegend > div > .barline {position: absolute; width: 20px; left: 0; top: 13px; height: 3px; background: #EEEEEE;}
|
||||
#burnLegend .line-real .bg-primary {background: #1183fb;}
|
||||
#burnLegend .line-real .bg-delay {background: red;}
|
||||
|
||||
.pull-left .input-control {margin-right: 10px;}
|
||||
|
||||
@@ -5,6 +5,18 @@ $(function()
|
||||
{
|
||||
location.href = createLink('execution', 'burn', 'executionID=' + executionID + '&type=' + type + '&interval=' + $(this).val());
|
||||
});
|
||||
|
||||
$('#weekend').click(function()
|
||||
{
|
||||
var browseType = type.match('noweekend') ? type.replace('noweekend', 'withweekend') : type.replace('withweekend', 'noweekend');
|
||||
location.href = createLink('execution', 'burn', 'executionID=' + executionID + '&type=' + browseType + '&interval=' + interval);
|
||||
});
|
||||
|
||||
$('#delay').click(function()
|
||||
{
|
||||
var browseType = type.match('nodelay') ? type.replace('nodelay', 'withdelay') : type.replace('withdelay', 'nodelay');
|
||||
location.href = createLink('execution', 'burn', 'executionID=' + executionID + '&type=' + browseType + '&interval=' + interval);
|
||||
});
|
||||
})
|
||||
|
||||
/* Save burn as image.*/
|
||||
|
||||
@@ -359,7 +359,9 @@ $lang->execution->linkStory = 'Link Story';
|
||||
$lang->execution->createTask = 'Create Task';
|
||||
$lang->execution->goback = "Go Back";
|
||||
$lang->execution->noweekend = 'Exclude Weekend';
|
||||
$lang->execution->nowdelay = 'Exclude Delay Date';
|
||||
$lang->execution->withweekend = 'Include Weekend';
|
||||
$lang->execution->withdelay = 'Include Delay Date';
|
||||
$lang->execution->interval = 'Intervals ';
|
||||
$lang->execution->fixFirstWithLeft = 'Update hours left too';
|
||||
$lang->execution->unfinishedExecution = "This {$lang->executionCommon} has ";
|
||||
@@ -384,6 +386,7 @@ $lang->execution->charts->burn->graph->rotateNames = 1;
|
||||
$lang->execution->charts->burn->graph->showValues = 0;
|
||||
$lang->execution->charts->burn->graph->reference = 'Ideal';
|
||||
$lang->execution->charts->burn->graph->actuality = 'Actual';
|
||||
$lang->execution->charts->burn->graph->delay = 'Delay';
|
||||
|
||||
$lang->execution->placeholder = new stdclass();
|
||||
$lang->execution->placeholder->code = "Abbreviation of {$lang->executionCommon} name";
|
||||
|
||||
@@ -359,7 +359,9 @@ $lang->execution->linkStory = "关联{$lang->SRCommon}";
|
||||
$lang->execution->createTask = '创建任务';
|
||||
$lang->execution->goback = "返回任务列表";
|
||||
$lang->execution->noweekend = '去除周末';
|
||||
$lang->execution->nodelay = '去除延期日期';
|
||||
$lang->execution->withweekend = '显示周末';
|
||||
$lang->execution->withdelay = '显示延期日期';
|
||||
$lang->execution->interval = '间隔';
|
||||
$lang->execution->fixFirstWithLeft = '修改剩余工时';
|
||||
$lang->execution->unfinishedExecution = "该{$lang->executionCommon}下还有";
|
||||
@@ -384,6 +386,7 @@ $lang->execution->charts->burn->graph->rotateNames = 1;
|
||||
$lang->execution->charts->burn->graph->showValues = 0;
|
||||
$lang->execution->charts->burn->graph->reference = '参考';
|
||||
$lang->execution->charts->burn->graph->actuality = '实际';
|
||||
$lang->execution->charts->burn->graph->delay = '延期';
|
||||
|
||||
$lang->execution->placeholder = new stdclass();
|
||||
$lang->execution->placeholder->code = '团队内部的简称';
|
||||
|
||||
@@ -481,6 +481,8 @@ class executionModel extends model
|
||||
->remove('products, branch, uid, plans, syncStories, contactListMenu, teamMembers')
|
||||
->get();
|
||||
|
||||
if(in_array($execution->status, array('closed', 'suspended'))) $this->computeBurn($executionID);
|
||||
|
||||
if($this->config->systemMode == 'new' and (empty($execution->project) or $execution->project == $oldExecution->project)) $this->checkBeginAndEndDate($oldExecution->project, $execution->begin, $execution->end);
|
||||
if(dao::isError()) return false;
|
||||
|
||||
@@ -846,6 +848,7 @@ class executionModel extends model
|
||||
->setDefault('status', 'suspended')
|
||||
->setDefault('lastEditedBy', $this->app->user->account)
|
||||
->setDefault('lastEditedDate', $now)
|
||||
->setDefault('suspendedDate', helper::today())
|
||||
->remove('comment')->get();
|
||||
|
||||
$this->dao->update(TABLE_EXECUTION)->data($execution)
|
||||
@@ -2806,17 +2809,18 @@ class executionModel extends model
|
||||
/**
|
||||
* Compute burn of a execution.
|
||||
*
|
||||
* @param int $executionID
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function computeBurn()
|
||||
public function computeBurn($executionID = 0)
|
||||
{
|
||||
$today = helper::today();
|
||||
$executions = $this->dao->select('id, code')->from(TABLE_EXECUTION)
|
||||
->where('end')->ge($today)
|
||||
->andWhere('type')->in('sprint,stage')
|
||||
->where('type')->in('sprint,stage')
|
||||
->andWhere('lifetime')->ne('ops')
|
||||
->andWhere('status')->notin('done,closed,suspended')
|
||||
->beginIF($executionID)->andWhere('id')->eq($executionID)->fi()
|
||||
->fetchPairs();
|
||||
if(!$executions) return array();
|
||||
|
||||
@@ -2964,10 +2968,12 @@ class executionModel extends model
|
||||
*
|
||||
* @param int $executionID
|
||||
* @param string $burnBy
|
||||
* @param bool $showDelay
|
||||
* @param array $dateList
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getBurnDataFlot($executionID = 0, $burnBy = '')
|
||||
public function getBurnDataFlot($executionID = 0, $burnBy = '', $showDelay = false, $dateList = array())
|
||||
{
|
||||
/* Get execution and burn counts. */
|
||||
$execution = $this->getById($executionID);
|
||||
@@ -2980,11 +2986,29 @@ class executionModel extends model
|
||||
foreach($sets as $date => $set)
|
||||
{
|
||||
if($date < $execution->begin) continue;
|
||||
if($date > $execution->end) continue;
|
||||
if(!$showDelay and $date > $execution->end) $set->value = 'null';
|
||||
if($showDelay and $date < $execution->end) $set->value = 'null';
|
||||
|
||||
$burnData[$date] = $set;
|
||||
$count++;
|
||||
}
|
||||
|
||||
if($showDelay)
|
||||
{
|
||||
foreach($dateList as $date)
|
||||
{
|
||||
if(!isset($burnData[$date]))
|
||||
{
|
||||
$set = new stdClass();
|
||||
$set->name = $date;
|
||||
$set->left = 0;
|
||||
$set->value = 'null';
|
||||
|
||||
$burnData[$date] = $set;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$burnData = array_reverse($burnData);
|
||||
|
||||
return $burnData;
|
||||
@@ -3669,6 +3693,15 @@ class executionModel extends model
|
||||
$chartData['burnLine'] = $this->report->createSingleJSON($sets, $dateList);
|
||||
$chartData['baseLine'] = $baselineJSON;
|
||||
|
||||
$execution = $this->getById($executionID);
|
||||
if((strpos('closed,suspended', $execution->status) === false and helper::today() > $execution->end)
|
||||
or ($execution->status == 'closed' and substr($execution->closedDate, 0, 10) > $execution->end)
|
||||
or ($execution->status == 'suspended' and $execution->suspendedDate > $execution->end))
|
||||
{
|
||||
$delaySets = $this->getBurnDataFlot($executionID, $burnBy, true, $dateList);
|
||||
$chartData['delayLine'] = $this->report->createSingleJSON($delaySets, $dateList);
|
||||
}
|
||||
|
||||
return $chartData;
|
||||
}
|
||||
|
||||
|
||||
@@ -18,13 +18,24 @@
|
||||
<?php js::set('burnXUnit', $lang->execution->burnXUnit);?>
|
||||
<?php js::set('burnYUnit', $lang->execution->burnYUnit);?>
|
||||
<?php js::set('type', $type);?>
|
||||
<?php js::set('interval', $interval);?>
|
||||
<div id='mainMenu' class='clearfix'>
|
||||
<div class='btn-toolbar pull-left'>
|
||||
<?php
|
||||
$weekend = ($type == 'noweekend') ? 'withweekend' : "noweekend";
|
||||
common::printLink('execution', 'computeBurn', 'reload=yes', '<i class="icon icon-refresh"></i> ' . $lang->execution->computeBurn, 'hiddenwin', "title='{$lang->execution->computeBurn}' class='btn btn-primary' id='computeBurn'");
|
||||
echo '<div class="space"></div>';
|
||||
echo html::a($this->createLink('execution', 'burn', "executionID=$executionID&type=$weekend&interval=$interval"), $lang->execution->$weekend, '', "class='btn btn-link'");
|
||||
if(strpos('wait,doing', $execution->status) !== false)
|
||||
{
|
||||
common::printLink('execution', 'computeBurn', 'reload=yes', '<i class="icon icon-refresh"></i> ' . $lang->execution->computeBurn, 'hiddenwin', "title='{$lang->execution->computeBurn}' class='btn btn-primary' id='computeBurn'");
|
||||
echo '<div class="space"></div>';
|
||||
}
|
||||
|
||||
$weekend = strpos($type, 'noweekend') !== false ? 'withweekend' : 'noweekend';
|
||||
$delay = strpos($type, 'withdelay') !== false ? 'nodelay' : 'withdelay';
|
||||
echo html::a('#', $lang->execution->$weekend, '', "class='btn btn-link' id='weekend'");
|
||||
if((strpos('closed,suspended', $execution->status) === false and helper::today() > $execution->end)
|
||||
or ($execution->status == 'closed' and substr($execution->closedDate, 0, 10) > $execution->end)
|
||||
or ($execution->status == 'suspended' and $execution->suspendedDate > $execution->end))
|
||||
echo html::a('#', $lang->execution->$delay, '', "class='btn btn-link' id='delay'");
|
||||
|
||||
if(common::canModify('execution', $execution)) common::printLink('execution', 'fixFirst', "execution=$execution->id", $lang->execution->fixFirst, '', "class='btn btn-link iframe' data-width='700'");
|
||||
echo $lang->execution->howToUpdateBurn;
|
||||
?>
|
||||
@@ -54,6 +65,9 @@
|
||||
<div id="burnLegend">
|
||||
<div class="line-ref"><div class='barline'></div><?php echo $lang->execution->charts->burn->graph->reference;?></div>
|
||||
<div class="line-real"><div class='barline bg-primary'></div><?php echo $lang->execution->charts->burn->graph->actuality;?></div>
|
||||
<?php if(strpos($type, 'withdelay') !== false):?>
|
||||
<div class="line-real"><div class='barline bg-delay'></div><?php echo $lang->execution->charts->burn->graph->delay;?></div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -94,6 +108,19 @@ function initBurnChar()
|
||||
}]
|
||||
};
|
||||
|
||||
var delaySets =
|
||||
{
|
||||
label: "<?php echo $lang->execution->charts->burn->graph->delay;?>",
|
||||
color: 'red',
|
||||
pointStrokeColor: 'red',
|
||||
pointHighlightStroke: 'red',
|
||||
pointColor: 'red',
|
||||
fillColor: 'rgba(0,106,241, .07)',
|
||||
pointHighlightFill: '#fff',
|
||||
data: <?php echo isset($chartData['delayLine']) ? $chartData['delayLine'] : '[]';?>
|
||||
}
|
||||
if(type.match('withdelay')) data.datasets.push(delaySets);
|
||||
|
||||
var burnChart = $("#burnCanvas").lineChart(data,
|
||||
{
|
||||
pointDotStrokeWidth: 2,
|
||||
|
||||
@@ -301,7 +301,7 @@ class product extends control
|
||||
$actionURL = $this->createLink($rawModule, $rawMethod, $params . "productID=$productID&branch=$branch&browseType=bySearch&queryID=myQueryID&storyType=$storyType");
|
||||
|
||||
$this->config->product->search['onMenuBar'] = 'yes';
|
||||
$this->product->buildSearchForm($productID, $this->products, $queryID, $actionURL, $branch);
|
||||
$this->product->buildSearchForm($productID, $this->products, $queryID, $actionURL, $branch, $projectID);
|
||||
|
||||
$showModule = !empty($this->config->datatable->productBrowse->showModule) ? $this->config->datatable->productBrowse->showModule : '';
|
||||
|
||||
@@ -1197,7 +1197,7 @@ class product extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function all($browseType = 'noclosed', $orderBy = 'order_asc', $param = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
public function all($browseType = 'noclosed', $orderBy = 'program_asc', $param = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
/* Load module and set session. */
|
||||
$this->loadModel('program');
|
||||
|
||||
@@ -1017,13 +1017,15 @@ class productModel extends model
|
||||
* @param int $queryID
|
||||
* @param int $actionURL
|
||||
* @param int $branch
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function buildSearchForm($productID, $products, $queryID, $actionURL, $branch = 0)
|
||||
public function buildSearchForm($productID, $products, $queryID, $actionURL, $branch = 0, $projectID = 0)
|
||||
{
|
||||
$productIdList = ($this->app->tab == 'project' and empty($productID)) ? array_keys($products) : $productID;
|
||||
$branchParam = ($this->app->tab == 'project' and empty($productID)) ? '' : $branch;
|
||||
$projectID = ($this->app->tab == 'project' and empty($projectID)) ? $this->session->project : $projectID;
|
||||
|
||||
$this->config->product->search['actionURL'] = $actionURL;
|
||||
$this->config->product->search['queryID'] = $queryID;
|
||||
@@ -1039,7 +1041,7 @@ class productModel extends model
|
||||
if($productID)
|
||||
{
|
||||
$modules = array();
|
||||
$branchList = $this->loadModel('branch')->getPairs($productID, '', $this->session->project);
|
||||
$branchList = $this->loadModel('branch')->getPairs($productID, '', $projectID);
|
||||
$branchModuleList = $this->tree->getOptionMenu($productID, 'story', 0, array_keys($branchList));
|
||||
foreach($branchModuleList as $branchID => $branchModules) $modules[] = $branchModules;
|
||||
}
|
||||
@@ -1047,7 +1049,7 @@ class productModel extends model
|
||||
{
|
||||
$moduleList = array();
|
||||
$modules = array('/');
|
||||
$branchGroup = $this->loadModel('execution')->getBranchByProduct(array_keys($products), $this->session->project, '');
|
||||
$branchGroup = $this->loadModel('execution')->getBranchByProduct(array_keys($products), $projectID, '');
|
||||
foreach($products as $productID => $productName)
|
||||
{
|
||||
if(isset($branchGroup[$productID]))
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
</div>
|
||||
<div id="mainContent" class="main-row fade">
|
||||
<?php if(empty($productStructure)):?>
|
||||
<div class="cell<?php if($browseType == 'bySearch') echo ' show';?>" id="queryBox" data-module='product'></div>
|
||||
<div class="table-empty-tip">
|
||||
<p><span class="text-muted"><?php echo $lang->product->noProduct;?></span></p>
|
||||
</div>
|
||||
|
||||
@@ -127,6 +127,7 @@ class project extends control
|
||||
unset($projects[$project->id]);
|
||||
}
|
||||
|
||||
$this->view->link = $this->project->getProjectLink($module, $method, $projectID);
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->projects = $orderedProjects;
|
||||
$this->view->module = $module;
|
||||
|
||||
+204
-8
@@ -457,6 +457,202 @@ class projectModel extends model
|
||||
return $projects;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Create the link from module,method.
|
||||
*
|
||||
* @param string $module
|
||||
* @param string $method
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getProjectLink($module, $method, $projectID)
|
||||
{
|
||||
$link = helper::createLink('project', 'index', "projectID=%s");
|
||||
$project = $this->getByID($projectID);
|
||||
|
||||
if(strpos(',project,product,projectstory,story,bug,doc,testcase,testtask,testreport,build,projectrelease,stakeholder,issue,risk,meeting,report,measrecord', ',' . $module . ',') !== false)
|
||||
{
|
||||
if($module == 'project' and $method == 'execution')
|
||||
{
|
||||
$link = helper::createLink($module, $method, "status=all&projectID=%s");
|
||||
}
|
||||
elseif($module == 'project' and strpos(',bug,testcase,testtask,testreport,build,dynamic,view,manageproducts,team,managemembers,whitelist,addwhitelist,group,', ',' . $method . ','))
|
||||
{
|
||||
$link = helper::createLink($module, $method, "projectID=%s");
|
||||
}
|
||||
elseif($module == 'project' and $method == 'managePriv')
|
||||
{
|
||||
$link = helper::createLink($module, 'group', "projectID=%s");
|
||||
}
|
||||
elseif($module == 'product' and $method == 'showerrornone')
|
||||
{
|
||||
$link = helper::createLink('projectstory', 'story', "projectID=%s");
|
||||
}
|
||||
elseif($module == 'projectstory' and $method == 'story')
|
||||
{
|
||||
$link = helper::createLink($module, $method, "projectID=%s");
|
||||
}
|
||||
elseif($module == 'projectstory' and $method == 'linkstory')
|
||||
{
|
||||
$link = helper::createLink($module, $method, "projectID=%s");
|
||||
}
|
||||
elseif($module == 'projectstory' and $method = 'track')
|
||||
{
|
||||
$link = helper::createLink($module, $method, "projectID=%s");
|
||||
}
|
||||
elseif($module == 'bug')
|
||||
{
|
||||
if($method == 'create')
|
||||
{
|
||||
$link = helper::createLink($module, $method, "productID=0&branch=0&extras=projectID=%s");
|
||||
}
|
||||
elseif($method == 'edit')
|
||||
{
|
||||
$link = helper::createLink('project', 'bug', "projectID=%s");
|
||||
}
|
||||
}
|
||||
elseif($module == 'story')
|
||||
{
|
||||
if($method == 'create')
|
||||
{
|
||||
$link = helper::createLink($module, $method);
|
||||
}
|
||||
elseif($method == 'change')
|
||||
{
|
||||
$link = helper::createLink('projectstory', 'story', "projectID=%s");
|
||||
}
|
||||
elseif($method == 'zerocase')
|
||||
{
|
||||
$link = helper::createLink('project', 'testcase', "projectID=%s");
|
||||
}
|
||||
}
|
||||
elseif($module == 'testcase' and $method == 'create')
|
||||
{
|
||||
if($method == 'create')
|
||||
{
|
||||
$link = helper::createLink($module, $method);
|
||||
}
|
||||
elseif($method == 'edit')
|
||||
{
|
||||
$link = helper::createLink('project', 'testcase', "projectID=%s");
|
||||
}
|
||||
}
|
||||
elseif($module == 'testtask')
|
||||
{
|
||||
if($method == 'create')
|
||||
{
|
||||
$link = helper::createLink($module, $method, "product=0&executionID=0&build=0&projectID=%s");
|
||||
}
|
||||
else
|
||||
{
|
||||
$link = helper::createLink($module, 'browseunits');
|
||||
}
|
||||
}
|
||||
elseif($module == 'testreport')
|
||||
{
|
||||
$link = helper::createLink('project', 'testreport', "projectID=%s");
|
||||
}
|
||||
elseif($module == 'repo')
|
||||
{
|
||||
if($method == 'create')
|
||||
{
|
||||
$link = helper::createLink($module, $method, "objectID=%s#app=project");
|
||||
}
|
||||
else
|
||||
{
|
||||
$link = helper::createLink($module, 'browse', "repoID=&branchID=&objectID=%s#app=project");
|
||||
}
|
||||
}
|
||||
elseif($module == 'doc')
|
||||
{
|
||||
$link = helper::createLink($module, 'tablecontents', "type=project&objectID=%s#app=project");
|
||||
}
|
||||
elseif($module == 'build')
|
||||
{
|
||||
if($method == 'create')
|
||||
{
|
||||
$link = helper::createLink($module, $method, "executionID=&productID=&projectID=%s#app=project");
|
||||
}
|
||||
else
|
||||
{
|
||||
$link = helper::createLink('project', 'build', "projectID=%s");
|
||||
}
|
||||
}
|
||||
elseif($module == 'projectrelease')
|
||||
{
|
||||
if($method == 'create')
|
||||
{
|
||||
$link = helper::createLink($module, $method, "projectID=%s");
|
||||
}
|
||||
else
|
||||
{
|
||||
$link = helper::createLink('projectrelease', 'browse', "projectID=%s");
|
||||
}
|
||||
}
|
||||
elseif($module == 'stakeholder')
|
||||
{
|
||||
if($method == 'create')
|
||||
{
|
||||
$link = helper::createLink($module, $method, "projectID=%s");
|
||||
}
|
||||
else
|
||||
{
|
||||
$link = helper::createLink($module, 'browse', "projectID=%s");
|
||||
}
|
||||
}
|
||||
elseif(strpos("issue,risk,meeting,report,measrecord", $module) !== false)
|
||||
{
|
||||
if($method == 'projectsummary')
|
||||
{
|
||||
$link = helper::createLink($module, $method, "projectID=%s#app=project");
|
||||
}
|
||||
else
|
||||
{
|
||||
$link = helper::createLink($module, 'browse', "projectID=%s");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(in_array($module, $this->config->waterfallModules))
|
||||
{
|
||||
$link = helper::createLink($module, 'browse', "projectID=%s");
|
||||
if($module == 'reviewissue')
|
||||
{
|
||||
$link = helper::createLink($module, 'issue', "projectID=%s");
|
||||
}
|
||||
elseif($module == 'cm' and $method = 'report')
|
||||
{
|
||||
$link = helper::createLink($module, $method, "projectID=%s");
|
||||
}
|
||||
elseif($module == 'weekly' and $method = 'index')
|
||||
{
|
||||
$link = helper::createLink($module, $method, "projectID=%s");
|
||||
}
|
||||
elseif($module == 'milestone' and $method = 'index')
|
||||
{
|
||||
$link = helper::createLink($module, $method, "projectID=%s");
|
||||
}
|
||||
elseif($module == 'workestimation' and $method = 'index')
|
||||
{
|
||||
$link = helper::createLink($module, $method, "projectID=%s");
|
||||
}
|
||||
elseif($module == 'durationestimation' and $method = 'index')
|
||||
{
|
||||
$link = helper::createLink($module, $method, "projectID=%s");
|
||||
}
|
||||
elseif($module == 'budget' and $method = 'summary')
|
||||
{
|
||||
$link = helper::createLink($module, $method, "projectID=%s");
|
||||
}
|
||||
}
|
||||
|
||||
if($project->model == 'kanban') $link = helper::createLink('project', 'index', "projectID=%s");
|
||||
|
||||
return $link;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get project stat data .
|
||||
*
|
||||
@@ -517,7 +713,7 @@ class projectModel extends model
|
||||
->andWhere('deleted')->eq(0)
|
||||
->andWhere('vision')->eq($this->config->vision)
|
||||
->beginIF($programID !== '')->andWhere('parent')->eq($programID)->fi()
|
||||
->beginIF($status != 'all' && $status != 'noclosed')->andWhere('status')->eq($status)->fi()
|
||||
->beginIF($status != 'all' and $status != 'noclosed')->andWhere('status')->eq($status)->fi()
|
||||
->beginIF($excludedModel)->andWhere('model')->ne($excludedModel)->fi()
|
||||
->beginIF($status == 'noclosed')->andWhere('status')->ne('closed')->fi()
|
||||
->beginIF(!$this->app->user->admin and !$isQueryAll)->andWhere('id')->in($this->app->user->view->projects)->fi()
|
||||
@@ -1014,7 +1210,7 @@ class projectModel extends model
|
||||
|
||||
$this->updateProducts($projectID);
|
||||
|
||||
if(isset($_POST['newProduct']) || (!$project->parent && empty($linkedProductsCount)))
|
||||
if(isset($_POST['newProduct']) or (!$project->parent and empty($linkedProductsCount)))
|
||||
{
|
||||
/* If parent not empty, link products or create products. */
|
||||
$product = new stdclass();
|
||||
@@ -1752,11 +1948,11 @@ class projectModel extends model
|
||||
if($project->model === 'scrum') $prefix = "<span class='project-type-label label label-outline label-info'>{$this->lang->project->scrum}</span> ";
|
||||
if($project->model === 'kanban') $prefix = "<span class='project-type-label label label-outline label-info'>{$this->lang->project->kanban}</span> ";
|
||||
if(isset($project->delay)) $suffix = "<span class='label label-danger label-badge'>{$this->lang->project->statusList['delay']}</span>";
|
||||
if(!empty($suffix) || !empty($prefix)) echo '<div class="project-name' . (empty($prefix) ? '' : ' has-prefix') . (empty($suffix) ? '' : ' has-suffix') . '">';
|
||||
if(!empty($suffix) or !empty($prefix)) echo '<div class="project-name' . (empty($prefix) ? '' : ' has-prefix') . (empty($suffix) ? '' : ' has-suffix') . '">';
|
||||
if(!empty($prefix)) echo $prefix;
|
||||
echo html::a($projectLink, $project->name, '', "class='text-ellipsis text-primary'");
|
||||
if(!empty($suffix)) echo $suffix;
|
||||
if(!empty($suffix) || !empty($prefix)) echo '</div>';
|
||||
if(!empty($suffix) or !empty($prefix)) echo '</div>';
|
||||
break;
|
||||
case 'code':
|
||||
echo $project->code;
|
||||
@@ -2015,7 +2211,7 @@ class projectModel extends model
|
||||
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')
|
||||
->where('t1.type')->in('sprint,stage,kanban')
|
||||
->beginIF($projectID != 0)->andWhere('t1.project')->eq($projectID)->fi()
|
||||
->beginIF($projectID == 0 && $this->config->vision)->andWhere('t1.vision')->eq($this->config->vision)->fi()
|
||||
->beginIF($projectID == 0 and $this->config->vision)->andWhere('t1.vision')->eq($this->config->vision)->fi()
|
||||
->beginIF(!empty($myExecutionIDList))->andWhere('t1.id')->in(array_keys($myExecutionIDList))->fi()
|
||||
->beginIF($status == 'undone')->andWhere('t1.status')->notIN('done,closed')->fi()
|
||||
->beginIF($status != 'all' and $status != 'undone' and $status != 'involved')->andWhere('t1.status')->eq($status)->fi()
|
||||
@@ -2285,14 +2481,14 @@ class projectModel extends model
|
||||
$lang->project->dividerMenu = $lang->{$model}->dividerMenu;
|
||||
}
|
||||
|
||||
$this->lang->switcherMenu = $this->getSwitcher($objectID, $this->app->rawModule, $this->app->rawMethod);
|
||||
|
||||
/* Reset project priv. */
|
||||
$moduleName = $this->app->rawModule;
|
||||
$methodName = $this->app->rawMethod;
|
||||
|
||||
$this->loadModel('common')->resetProjectPriv($objectID);
|
||||
if(!$this->common->isOpenMethod($moduleName, $methodName) and !commonModel::hasPriv($moduleName, $methodName)) $this->common->deny($moduleName, $methodName, false);
|
||||
|
||||
$this->lang->switcherMenu = $this->getSwitcher($objectID, $this->app->rawModule, $this->app->rawMethod);
|
||||
|
||||
common::setMenuVars('project', $objectID);
|
||||
}
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<?php
|
||||
$projectCounts = array();
|
||||
$projectNames = array();
|
||||
$defaultLink = $link;
|
||||
$tabActive = '';
|
||||
$myProjects = 0;
|
||||
$others = 0;
|
||||
@@ -69,9 +70,24 @@ foreach($projects as $programID => $programProjects)
|
||||
|
||||
foreach($programProjects as $index => $project)
|
||||
{
|
||||
$selected = $project->id == $projectID ? 'selected' : '';
|
||||
$link = helper::createLink('project', 'index', "projectID=%s", '', '', $project->id);
|
||||
$icon = '<i class="icon icon-sprint"></i> ';
|
||||
$selected = $project->id == $projectID ? 'selected' : '';
|
||||
$icon = '<i class="icon icon-sprint"></i> ';
|
||||
|
||||
if($project->model != 'waterfall' and (in_array($module, $config->waterfallModules) or $method == 'track'))
|
||||
{
|
||||
$link = helper::createLink('project', 'index', "projectID=%s");
|
||||
}
|
||||
elseif($project->model == 'kanban')
|
||||
{
|
||||
$link = helper::createLink('project', 'index', "projectID=%s");
|
||||
}
|
||||
else
|
||||
{
|
||||
$link = $defaultLink;
|
||||
}
|
||||
|
||||
/* Set link when project redefines permissions. */
|
||||
if($project->auth == 'reset') $link = helper::createLink('project', 'index', "projectID=%s");
|
||||
|
||||
if($project->model != 'scrum') $icon = "<i class='icon icon-{$project->model}'></i> ";
|
||||
$projectName = $icon . $project->name;
|
||||
|
||||
@@ -2024,4 +2024,25 @@ class bugTest
|
||||
return $array;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get bug query.
|
||||
*
|
||||
* @param string $bugQuery
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getBugQueryTest($bugQuery)
|
||||
{
|
||||
$array = $this->objectModel->getBugQuery($bugQuery);
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
return dao::getError();
|
||||
}
|
||||
else
|
||||
{
|
||||
return $array;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -518,20 +518,21 @@ class kanbanTest
|
||||
*
|
||||
* @param int $kanbanID
|
||||
* @param string $fromType
|
||||
* @param int $archived
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getImportedCardsTest($kanbanID, $fromType)
|
||||
public function getImportedCardsTest($kanbanID, $fromType, $archived = 0)
|
||||
{
|
||||
global $tester;
|
||||
$cards = $tester->dao->select('*')->from(TABLE_KANBANCARD)
|
||||
->where('deleted')->eq(0)
|
||||
->andWhere('kanban')->eq($kanbanID)
|
||||
->andWhere('archived')->eq(0)
|
||||
->andWhere('archived')->eq($archived)
|
||||
->andWhere('fromID')->eq(0)
|
||||
->fetchAll('id');
|
||||
|
||||
$objects = $this->objectModel->getImportedCards($kanbanID, $cards, $fromType);
|
||||
$objects = $this->objectModel->getImportedCards($kanbanID, $cards, $fromType, $archived);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
|
||||
Executable
+40
@@ -0,0 +1,40 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/bug.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=bugModel->getBugQuery();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
查询 `product` = 'all' 的bugQuery >> 1 AND `product` IN ('1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49','50','51','52','53','54','55','56','57','58','59','60','61','62','63','64','65','66','67','68','69','70','71','72','73','74','75','76','77','78','79','80','81','82','83','84','85','86','87','88','89','90','91','92','93','94','95','96','97','98','99','100','101','102','103','104','105','106','107','108','109','110','111','112','113','114','115','116','117','118','119','120','1','2','3','4','5','6','7','8','9','10','21','22','23','24','25','26','27','28','29','30','41','42','43','44','45','46','47','48','49','50','61','62','63','64','65','66','67','68','69','70','81','82','83','84','85','86','87','88','89','90','101','102','103','104','105','106','107','108','109','110
|
||||
查询 `project` = 'all' 的bugQuery >> 1 AND `project` in (11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,731,732,733,734,735,736,737,738,739,740,741,742,743,744,745,746,747,748,749,750)
|
||||
查询 `resolvedDate` = '2022-01-01' 的bugQuery >> `resolvedDate` != '0000-00-00 00:00:00' AND `resolvedDate` > '2022-01-01'
|
||||
查询 `closedDate` = '2022-01-01' 的bugQuery >> `closedDate` != '0000-00-00 00:00:00' AND `closedDate` <= '2022-01-01'
|
||||
查询 `story` LIKE '%abc%' 的bugQuery >> `story` IN (2,12,20,21,22,23,24,25,26,27,28,29,32,42,52,62,70,71,72,73,74,75,76,77,78,79,82,92,102,112,120,121,122,123,124,125,126,127,128,129,132,142,152,162,172,182,192,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,302,312,320,321,322,323,324,325,326,327,328,329,332,342,352,362,372,382,392,402,412,420,421,422,423,424,425,426,427,428,429,432,442) AND `story` != 0
|
||||
查询 `story` NOT LIKE '%abc%' 的bugQuery >> `story` NOT IN (2,12,20,21,22,23,24,25,26,27,28,29,32,42,52,62,70,71,72,73,74,75,76,77,78,79,82,92,102,112,120,121,122,123,124,125,126,127,128,129,132,142,152,162,172,182,192,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,302,312,320,321,322,323,324,325,326,327,328,329,332,342,352,362,372,382,392,402,412,420,421,422,423,424,425,426,427,428,429,432,442) AND `story` != 0
|
||||
查询 `product` = '1' and `project` = '1' and `story` > 'abc' 的bugQuery >> `product` = '1' and `project` = '1' and `story` > 'abc' AND `story` != 0
|
||||
|
||||
*/
|
||||
|
||||
$bugQuery = array();
|
||||
$bugQuery[] = "`product` = 'all'";
|
||||
$bugQuery[] = "`project` = 'all'";
|
||||
$bugQuery[] = " `resolvedDate` > '2022-01-01'";
|
||||
$bugQuery[] = " `closedDate` <= '2022-01-01'";
|
||||
$bugQuery[] = " `story` LIKE '%2%'";
|
||||
$bugQuery[] = " `story` NOT LIKE '%2%'";
|
||||
$bugQuery[] = " `product` = '1' and `project` = '1' and `story` > 'abc'";
|
||||
|
||||
$bug=new bugTest();
|
||||
|
||||
r($bug->getBugQueryTest($bugQuery[0])) && p() && e("1 AND `product` IN ('1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49','50','51','52','53','54','55','56','57','58','59','60','61','62','63','64','65','66','67','68','69','70','71','72','73','74','75','76','77','78','79','80','81','82','83','84','85','86','87','88','89','90','91','92','93','94','95','96','97','98','99','100','101','102','103','104','105','106','107','108','109','110','111','112','113','114','115','116','117','118','119','120','1','2','3','4','5','6','7','8','9','10','21','22','23','24','25','26','27','28','29','30','41','42','43','44','45','46','47','48','49','50','61','62','63','64','65','66','67','68','69','70','81','82','83','84','85','86','87','88','89','90','101','102','103','104','105','106','107','108','109','110')"); // 查询 `product` = 'all' 的bugQuery
|
||||
r($bug->getBugQueryTest($bugQuery[1])) && p() && e("1 AND `project` in (11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,731,732,733,734,735,736,737,738,739,740,741,742,743,744,745,746,747,748,749,750)"); // 查询 `project` = 'all' 的bugQuery
|
||||
r($bug->getBugQueryTest($bugQuery[2])) && p() && e(" `resolvedDate` != '0000-00-00 00:00:00' AND `resolvedDate` > '2022-01-01'"); // 查询 `resolvedDate` = '2022-01-01' 的bugQuery
|
||||
r($bug->getBugQueryTest($bugQuery[3])) && p() && e(" `closedDate` != '0000-00-00 00:00:00' AND `closedDate` <= '2022-01-01'"); // 查询 `closedDate` = '2022-01-01' 的bugQuery
|
||||
r($bug->getBugQueryTest($bugQuery[4])) && p() && e(" `story` IN (2,12,20,21,22,23,24,25,26,27,28,29,32,42,52,62,70,71,72,73,74,75,76,77,78,79,82,92,102,112,120,121,122,123,124,125,126,127,128,129,132,142,152,162,172,182,192,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,302,312,320,321,322,323,324,325,326,327,328,329,332,342,352,362,372,382,392,402,412,420,421,422,423,424,425,426,427,428,429,432,442) AND `story` != 0"); // 查询 `story` LIKE '%abc%' 的bugQuery
|
||||
r($bug->getBugQueryTest($bugQuery[5])) && p() && e(" `story` NOT IN (2,12,20,21,22,23,24,25,26,27,28,29,32,42,52,62,70,71,72,73,74,75,76,77,78,79,82,92,102,112,120,121,122,123,124,125,126,127,128,129,132,142,152,162,172,182,192,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,302,312,320,321,322,323,324,325,326,327,328,329,332,342,352,362,372,382,392,402,412,420,421,422,423,424,425,426,427,428,429,432,442) AND `story` != 0"); // 查询 `story` NOT LIKE '%abc%' 的bugQuery
|
||||
r($bug->getBugQueryTest($bugQuery[6])) && p() && e("`product` = '1' and `project` = '1' and `story` > 'abc' AND `story` != 0"); // 查询 `product` = '1' and `project` = '1' and `story` > 'abc' 的bugQuery
|
||||
@@ -26,11 +26,13 @@ pid=1
|
||||
查看看板23的普通卡片和productplan片 >> ,177,178,179,180,181,182,183,184
|
||||
查看看板25的普通卡片和build卡片 >> ,193,194,195,196,197,198,199,200,993,994,995,996,997,998,999,1000
|
||||
查看看板25的普通卡片和productplan片 >> ,193,194,195,196,197,198,199,200
|
||||
查看看板1已归档的普通卡片和productplan卡片 >> ,6,7,8,801,802,803,804,805,806,807,808
|
||||
|
||||
*/
|
||||
|
||||
$kanbanIDList = array('1', '2', '9', '10', '11', '12', '23', '25');
|
||||
$fromType = array('productplan', 'release', 'execution', 'build');
|
||||
$archived = 1;
|
||||
|
||||
$kanban = new kanbanTest();
|
||||
|
||||
@@ -49,4 +51,8 @@ r($kanban->getImportedCardstest($kanbanIDList[5], $fromType[3])) && p() && e(',8
|
||||
r($kanban->getImportedCardstest($kanbanIDList[6], $fromType[3])) && p() && e(',177,178,179,180,181,182,183,184,981,982,983,984'); // 查看看板23的普通卡片和build卡片
|
||||
r($kanban->getImportedCardstest($kanbanIDList[6], $fromType[0])) && p() && e(',177,178,179,180,181,182,183,184'); // 查看看板23的普通卡片和productplan片
|
||||
r($kanban->getImportedCardstest($kanbanIDList[7], $fromType[3])) && p() && e(',193,194,195,196,197,198,199,200,993,994,995,996,997,998,999,1000'); // 查看看板25的普通卡片和build卡片
|
||||
r($kanban->getImportedCardstest($kanbanIDList[7], $fromType[0])) && p() && e(',193,194,195,196,197,198,199,200'); // 查看看板25的普通卡片和productplan片
|
||||
r($kanban->getImportedCardstest($kanbanIDList[7], $fromType[0])) && p() && e(',193,194,195,196,197,198,199,200'); // 查看看板25的普通卡片和productplan片
|
||||
global $tester;
|
||||
$tester->dao->update(TABLE_KANBANCARD)->set('archived')->eq(1)->where('id')->gt('5')->exec();
|
||||
r($kanban->getImportedCardsTest($kanbanIDList[0], $fromType[0], $archived)) && p() && e(',6,7,8,801,802,803,804,805,806,807,808'); // 查看看板1已归档的普通卡片和productplan卡片
|
||||
$tester->dao->update(TABLE_KANBANCARD)->set('archived')->eq(0)->where('id')->gt('5')->exec();
|
||||
|
||||
Reference in New Issue
Block a user