diff --git a/db/standard/zentao12.3.3.sql b/db/standard/zentao12.3.3.sql index 8462ee6bf1..9462655075 100644 --- a/db/standard/zentao12.3.3.sql +++ b/db/standard/zentao12.3.3.sql @@ -388,7 +388,6 @@ CREATE TABLE `zt_file` ( ) ENGINE=MyISAM DEFAULT CHARSET=utf8; CREATE TABLE `zt_group` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, - `program` mediumint(8) unsigned NOT NULL DEFAULT 0, `name` char(30) NOT NULL, `role` char(30) NOT NULL DEFAULT '', `desc` char(255) NOT NULL DEFAULT '', diff --git a/db/update12.3.2.sql b/db/update12.3.2.sql index fb85878bf0..4520f6e483 100644 --- a/db/update12.3.2.sql +++ b/db/update12.3.2.sql @@ -4,5 +4,3 @@ DELETE FROM `zt_grouppriv` WHERE `module` = 'api' AND `method` = 'getModel'; DELETE FROM `zt_grouppriv` WHERE `module` = 'api' AND `method` = 'sql'; ALTER TABLE `zt_jenkins` CHANGE `password` `password` varchar(255) COLLATE 'utf8_general_ci' NOT NULL AFTER `account`; - -ALTER TABLE `zt_group` ADD `program` mediumint(8) unsigned NOT NULL DEFAULT 0 AFTER `id`; diff --git a/db/zentao.sql b/db/zentao.sql index 99813574bf..f56f51a8b0 100644 --- a/db/zentao.sql +++ b/db/zentao.sql @@ -403,7 +403,6 @@ CREATE TABLE IF NOT EXISTS `zt_file` ( -- DROP TABLE IF EXISTS `zt_group`; CREATE TABLE IF NOT EXISTS `zt_group` ( `id` mediumint(8) unsigned NOT NULL auto_increment, - `program` mediumint(8) unsigned NOT NULL DEFAULT 0, `name` char(30) NOT NULL, `role` char(30) NOT NULL default '', `desc` char(255) NOT NULL default '', diff --git a/module/block/lang/en.php b/module/block/lang/en.php index 7b0ba77944..640d3831d3 100644 --- a/module/block/lang/en.php +++ b/module/block/lang/en.php @@ -268,7 +268,7 @@ $lang->block->modules['project']->availableBlocks->task = 'Task'; $lang->block->modules['project']->availableBlocks->build = 'Build'; $lang->block->modules['qa'] = new stdclass(); $lang->block->modules['qa']->availableBlocks = new stdclass(); -$lang->block->modules['qa']->availableBlocks->statistic = 'Testing Report'; +$lang->block->modules['qa']->availableBlocks->statistic = 'Test Report'; //$lang->block->modules['qa']->availableBlocks->overview = 'Testcase Overview'; $lang->block->modules['qa']->availableBlocks->bug = 'Bug'; $lang->block->modules['qa']->availableBlocks->case = 'Case'; @@ -397,8 +397,8 @@ $lang->block->gridOptions[8] = 'Left'; $lang->block->gridOptions[4] = 'Right'; $lang->block->flowchart = array(); -$lang->block->flowchart['admin'] = array('Administrator', 'Add Department', 'Add User', 'Maintain Privilege'); -$lang->block->flowchart['product'] = array($lang->productCommon . ' Owner', 'Add ' . $lang->productCommon, 'Maintain Module', 'Maintain Plan', 'Maintain Story', 'Create Release'); -$lang->block->flowchart['project'] = array('Scrum Master', 'Add ' . $lang->projectCommon, 'Maintain Team', 'Link ' . $lang->productCommon, 'Link Story', 'Create Task'); -$lang->block->flowchart['dev'] = array('Dev Team', 'Claim Task/Bug', 'Update Status', 'Finish Task/Bug'); -$lang->block->flowchart['tester'] = array('Test Team', 'Write Case', 'Run Case', 'Report Bug', 'Verify Bug', 'Close Bug'); +$lang->block->flowchart['admin'] = array('Administrator', 'Add Departments', 'Add Users', 'Maintain Privileges'); +$lang->block->flowchart['product'] = array($lang->productCommon . ' Owner', 'Add ' . $lang->productCommon, 'Maintain Modules', 'Maintain Plans', 'Maintain Stories', 'Create Releases'); +$lang->block->flowchart['project'] = array('Scrum Master', 'Add ' . $lang->projectCommon . 's', 'Maintain Teams', 'Link ' . $lang->productCommon . 's', 'Link Stories', 'Create Tasks'); +$lang->block->flowchart['dev'] = array('Dev Team', 'Claim Tasks/Bugs', 'Update Status', 'Finish Tasks/Bugs'); +$lang->block->flowchart['tester'] = array('Test Team', 'Write Cases', 'Run Cases', 'Report Bugs', 'Verify Bugs', 'Close Bugs'); diff --git a/module/bug/lang/en.php b/module/bug/lang/en.php index 05f37f3075..4090efbee7 100644 --- a/module/bug/lang/en.php +++ b/module/bug/lang/en.php @@ -262,8 +262,8 @@ $lang->bug->confirmedList[1] = 'Yes'; $lang->bug->confirmedList[0] = 'No'; $lang->bug->resolutionList[''] = ''; -$lang->bug->resolutionList['bydesign'] = 'As Design'; -$lang->bug->resolutionList['duplicate'] = 'Duplicated'; +$lang->bug->resolutionList['bydesign'] = 'As Designed'; +$lang->bug->resolutionList['duplicate'] = 'Duplicate'; $lang->bug->resolutionList['external'] = 'External'; $lang->bug->resolutionList['fixed'] = 'Resolved'; $lang->bug->resolutionList['notrepro'] = 'Irreproducible'; diff --git a/module/product/model.php b/module/product/model.php index c0138a90ae..d22b3f350f 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -698,6 +698,7 @@ class productModel extends model krsort($orderedPlans); foreach($orderedPlans as $plans) { + krsort($plans); foreach($plans as $plan) { if($plan->parent > 0 and isset($parents[$plan->parent])) $plan->title = $parents[$plan->parent] . ' / ' . $plan->title; @@ -716,6 +717,7 @@ class productModel extends model krsort($orderedReleases); foreach($orderedReleases as $releases) { + krsort($releases); foreach($releases as $release) { $year = substr($release->date, 0, 4); diff --git a/module/search/model.php b/module/search/model.php index 19c558fbf9..e9805a7ca8 100644 --- a/module/search/model.php +++ b/module/search/model.php @@ -106,8 +106,8 @@ class searchModel extends model /* Skip empty values. */ if($this->post->$valueName == false) continue; - if($this->post->$valueName == 'null') $this->post->$valueName = ''; // Null is special, stands to empty. if($this->post->$valueName == 'ZERO') $this->post->$valueName = 0; // ZERO is special, stands to 0. + if(isset($fieldParams->$field) and $fieldParams->$field->control == 'select' and $this->post->$valueName == 'null') $this->post->$valueName = ''; // Null is special, stands to empty if control is select. Fix bug #3279. $scoreNum += 1; diff --git a/module/story/lang/en.php b/module/story/lang/en.php index d877e5399e..49fe33ab8d 100644 --- a/module/story/lang/en.php +++ b/module/story/lang/en.php @@ -150,11 +150,11 @@ $lang->story->stageList['closed'] = 'Closed'; $lang->story->reasonList[''] = ''; $lang->story->reasonList['done'] = 'Already Done'; $lang->story->reasonList['subdivided'] = 'Decomposed'; -$lang->story->reasonList['duplicate'] = 'Duplicated'; +$lang->story->reasonList['duplicate'] = 'Duplicate'; $lang->story->reasonList['postponed'] = 'Postponed'; $lang->story->reasonList['willnotdo'] = "Won't Do"; $lang->story->reasonList['cancel'] = 'Cancelled'; -$lang->story->reasonList['bydesign'] = 'As Design'; +$lang->story->reasonList['bydesign'] = 'As Designed'; //$lang->story->reasonList['isbug'] = 'Bug!'; $lang->story->reviewResultList[''] = ''; diff --git a/module/story/lang/zh-cn.php b/module/story/lang/zh-cn.php index 12e53e603a..655f0ca508 100644 --- a/module/story/lang/zh-cn.php +++ b/module/story/lang/zh-cn.php @@ -58,6 +58,7 @@ $lang->story->batchChangeStage = "批量修改阶段"; $lang->story->batchAssignTo = "批量指派"; $lang->story->batchChangeModule = "批量修改模块"; $lang->story->viewAll = '查看全部'; +$lang->story->parentClose = '需求:%s 为父需求,将不会被关闭。'; $lang->story->common = $lang->storyCommon; $lang->story->id = '编号'; diff --git a/module/story/model.php b/module/story/model.php index 54e8bc5baa..1c35eb8054 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -1134,10 +1134,12 @@ class storyModel extends model $data = fixer::input('post')->get(); $storyIdList = $data->storyIdList ? $data->storyIdList : array(); - $oldStories = $this->getByList($storyIdList); + $oldStories = $this->getByList($storyIdList); + $parentIdList = array(); foreach($storyIdList as $storyID) { $oldStory = $oldStories[$storyID]; + if($oldStory->parent == -1) $parentIdList[] = $oldStory->id; if($oldStory->status == 'closed') continue; $story = new stdclass(); @@ -1160,6 +1162,12 @@ class storyModel extends model unset($story); } + if(count($parentIdList)) + { + $noticeParentID = implode(',', $parentIdList); + die(js::alert(sprintf($this->lang->story->parentClose, $noticeParentID))); + } + foreach($stories as $storyID => $story) { if(!$story->closedReason) continue; @@ -1430,8 +1438,8 @@ class storyModel extends model $story = $this->dao->findById($storyID)->from(TABLE_STORY)->fetch(); - if($story->status == 'closed') return $this->dao->update(TABLE_STORY)->set('stage')->eq('closed')->where('id')->eq($storyID)->exec(); if(!empty($story->stagedBy)) return false; + if($story->status == 'closed') $this->dao->update(TABLE_STORY)->set('stage')->eq('closed')->where('id')->eq($storyID)->exec(); $product = $this->dao->findById($story->product)->from(TABLE_PRODUCT)->fetch(); $projects = $this->dao->select('t1.project,t3.branch')->from(TABLE_PROJECTSTORY)->alias('t1') @@ -1512,8 +1520,8 @@ class storyModel extends model $branchStatusList = array(); $branchDevelTasks = array(); $branchTestTasks = array(); - $statusList['devel'] = array('wait' => 0, 'doing' => 0, 'done'=> 0); - $statusList['test'] = array('wait' => 0, 'doing' => 0, 'done'=> 0); + $statusList['devel'] = array('wait' => 0, 'doing' => 0, 'done'=> 0, 'pause' => 0); + $statusList['test'] = array('wait' => 0, 'doing' => 0, 'done'=> 0, 'pause' => 0); foreach($tasks as $type => $typeTasks) { foreach($typeTasks as $task) @@ -1557,7 +1565,7 @@ class storyModel extends model if($statusList['devel']['wait'] > 0 and $statusList['devel']['done'] > 0 and $statusList['test']['wait'] == $testTasks) $stage = 'developing'; if($statusList['devel']['done'] == $develTasks and $develTasks > 0 and $statusList['test']['wait'] == $testTasks) $stage = 'developed'; if($statusList['devel']['done'] == $develTasks and $develTasks > 0 and $statusList['test']['wait'] > 0 and $statusList['test']['done'] > 0) $stage = 'testing'; - if($statusList['test']['doing'] > 0) $stage = 'testing'; + if($statusList['test']['doing'] > 0 or $statusList['test']['pause'] > 0) $stage = 'testing'; if(($statusList['devel']['wait'] > 0 or $statusList['devel']['doing'] > 0) and $statusList['test']['done'] == $testTasks and $testTasks > 0) $stage = 'testing'; if($statusList['devel']['done'] == $develTasks and $statusList['test']['done'] == $testTasks and $testTasks > 0) $stage = 'tested';