Merge branch '15.0.beta3' of https://gitlab.zcorp.cc/easycorp/zentaopms into 15.0.beta3
This commit is contained in:
+1
-1
@@ -1228,7 +1228,7 @@ CREATE TABLE IF NOT EXISTS `zt_webhook` (
|
||||
`contentType` varchar(30) NOT NULL DEFAULT 'application/json',
|
||||
`sendType` enum('sync','async') NOT NULL DEFAULT 'sync',
|
||||
`products` text NOT NULL,
|
||||
`projects` text NOT NULL,
|
||||
`executions` text NOT NULL,
|
||||
`params` varchar(100) NOT NULL,
|
||||
`actions` text NOT NULL,
|
||||
`desc` text NOT NULL,
|
||||
|
||||
@@ -19,7 +19,7 @@ $lang->bug->module = '所属模块';
|
||||
$lang->bug->moduleAB = '模块';
|
||||
$lang->bug->project = '所属项目';
|
||||
$lang->bug->execution = '所属' . $lang->executionCommon;
|
||||
$lang->bug->story = "相关{$lang->SRCommon}";
|
||||
$lang->bug->story = "相关需求";
|
||||
$lang->bug->storyVersion = "{$lang->SRCommon}版本";
|
||||
$lang->bug->color = '标题颜色';
|
||||
$lang->bug->task = '相关任务';
|
||||
|
||||
@@ -96,6 +96,7 @@ class productplanModel extends model
|
||||
$plans = $this->reorder4Children($plans);
|
||||
$planIdList = array_keys($plans);
|
||||
|
||||
$storyCountInTable = $this->dao->select('plan,count(story) as count')->from(TABLE_PLANSTORY)->where('plan')->in($planIdList)->groupBy('plan')->fetchPairs('plan', 'count');
|
||||
$product = $this->loadModel('product')->getById($product);
|
||||
if($product->type == 'normal')
|
||||
{
|
||||
@@ -127,6 +128,22 @@ class productplanModel extends model
|
||||
$plan->hour = array_sum($storyPairs);
|
||||
$plan->projectID = $plan->project;
|
||||
|
||||
/* Sync linked stories. */
|
||||
if(!isset($storyCountInTable[$plan->id]) or $storyCountInTable[$plan->id] != $plan->stories)
|
||||
{
|
||||
$this->dao->delete()->from(TABLE_PLANSTORY)->where('plan')->eq($plan->id)->exec();
|
||||
|
||||
$order = 1;
|
||||
foreach($storyPairs as $storyID => $estimate)
|
||||
{
|
||||
$planStory = new stdclass();
|
||||
$planStory->plan = $plan->id;
|
||||
$planStory->story = $storyID;
|
||||
$planStory->order = $order ++;
|
||||
$this->dao->replace(TABLE_PLANSTORY)->data($planStory)->exec();
|
||||
}
|
||||
}
|
||||
|
||||
if(!isset($parentStories[$plan->parent])) $parentStories[$plan->parent] = 0;
|
||||
if(!isset($parentBugs[$plan->parent])) $parentBugs[$plan->parent] = 0;
|
||||
if(!isset($parentHour[$plan->parent])) $parentHour[$plan->parent] = 0;
|
||||
@@ -292,8 +309,8 @@ class productplanModel extends model
|
||||
|
||||
/**
|
||||
* Get Children plan.
|
||||
*
|
||||
* @param int $planID
|
||||
*
|
||||
* @param int $planID
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
@@ -433,8 +450,8 @@ class productplanModel extends model
|
||||
|
||||
/**
|
||||
* Change parent field by planID.
|
||||
*
|
||||
* @param int $planID
|
||||
*
|
||||
* @param int $planID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -562,8 +579,8 @@ class productplanModel extends model
|
||||
|
||||
/**
|
||||
* Reorder for children plans.
|
||||
*
|
||||
* @param array $plans
|
||||
*
|
||||
* @param array $plans
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
|
||||
@@ -1015,7 +1015,7 @@ class searchModel extends model
|
||||
while(true)
|
||||
{
|
||||
$query = $this->buildIndexQuery($module);
|
||||
$dataList = $query->beginIF($lastID)->andWhere('t1.id')->gt($lastID)->fi()->limit($limit)->fetchAll('id');
|
||||
$dataList = $query->beginIF($lastID)->andWhere('t1.id')->gt($lastID)->fi()->orderBy('t1.id')->limit($limit)->fetchAll('id');
|
||||
if(empty($dataList))
|
||||
{
|
||||
$lastID = 0;
|
||||
|
||||
Reference in New Issue
Block a user