From 2bfe07e3a0308b3603dccf888068919f63baec56 Mon Sep 17 00:00:00 2001 From: "chencongzhi520@gmail.com" Date: Fri, 15 Jun 2012 02:14:39 +0000 Subject: [PATCH] * Finish task#860. --- module/build/control.php | 4 +- module/build/css/common.css | 4 +- module/build/view/create.html.php | 101 ++++++++++++------ module/build/view/edit.html.php | 93 ++++++++++------ module/my/view/blockproducts.html.php | 2 +- module/my/view/blockprojects.html.php | 2 +- module/project/model.php | 19 ---- module/release/control.php | 5 +- module/release/css/common.css | 3 + .../view/ajaxgetstoriesandbugs.html.php | 97 +++++++++++------ module/release/view/edit.html.php | 95 ++++++++++------ 11 files changed, 268 insertions(+), 157 deletions(-) create mode 100755 module/release/css/common.css diff --git a/module/build/control.php b/module/build/control.php index 4f8fa5a50d..d0db4ef8e9 100644 --- a/module/build/control.php +++ b/module/build/control.php @@ -41,7 +41,7 @@ class build extends control /* Get stories and bugs. */ $orderBy = 'status_asc, stage_asc, id_desc'; $stories = $this->story->getProjectStories($projectID, $orderBy); - $bugs = $this->project->getResolvedBugs($projectID); + $bugs = $this->bug->getProjectBugs($projectID); /* Assign. */ $this->view->header->title = $this->lang->build->create; @@ -86,7 +86,7 @@ class build extends control /* Get stories and bugs. */ $orderBy = 'status_asc, stage_asc, id_desc'; $stories = $this->story->getProjectStories($build->project, $orderBy); - $bugs = $this->project->getResolvedBugs($build->project); + $bugs = $this->bug->getProjectBugs($build->project); /* Assign. */ $this->view->header->title = $this->lang->build->edit; diff --git a/module/build/css/common.css b/module/build/css/common.css index 6673dd5e78..e8abbee4f8 100644 --- a/module/build/css/common.css +++ b/module/build/css/common.css @@ -1 +1,3 @@ -.linkbox{height:225px; overflow-y:auto} +.mainTable { width:100%; border:none} +.headTable { width:100%; height:30px; margin:0px;} +.contentDiv { height:195px; overflow-y:auto} diff --git a/module/build/view/create.html.php b/module/build/view/create.html.php index 0ca9ae4a33..28d466f622 100644 --- a/module/build/view/create.html.php +++ b/module/build/view/create.html.php @@ -44,48 +44,81 @@ build->linkStoriesAndBugs;?>
- - +
diff --git a/module/build/view/edit.html.php b/module/build/view/edit.html.php index 29ecdc9df4..df15903343 100644 --- a/module/build/view/edit.html.php +++ b/module/build/view/edit.html.php @@ -44,46 +44,75 @@ build->linkStoriesAndBugs;?>
- - +
diff --git a/module/my/view/blockproducts.html.php b/module/my/view/blockproducts.html.php index dedd43b66d..b019c455cb 100644 --- a/module/my/view/blockproducts.html.php +++ b/module/my/view/blockproducts.html.php @@ -40,7 +40,7 @@
- +
diff --git a/module/my/view/blockprojects.html.php b/module/my/view/blockprojects.html.php index 16c96900a1..53592c2baf 100644 --- a/module/my/view/blockprojects.html.php +++ b/module/my/view/blockprojects.html.php @@ -42,7 +42,7 @@
createLink('product', 'view', 'product=' . $product->id), $product->name);?>
- +
diff --git a/module/project/model.php b/module/project/model.php index 96865bcbdc..364eeb7872 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -1050,23 +1050,4 @@ class projectModel extends model ->page($pager) ->fetchAll(); } - - /** - * Get resolved bugs of a project - * - * @param int $projectID - * @access public - * @return array - */ - public function getResolvedBugs($projectID) - { - $project = $this->getById($projectID); - $products = $this->dao->select('product')->from(TABLE_PROJECTPRODUCT)->where('project')->eq($projectID)->fetchPairs('product'); - return $this->dao->select('id, title, status')->from(TABLE_BUG) - ->where('status')->eq('resolved') - ->andWhere('resolvedDate')->ge($project->begin) - ->andWhere('resolution')->eq('fixed') - ->andWhere('product')->in($products) - ->fetchAll(); - } } diff --git a/module/release/control.php b/module/release/control.php index d8131e2673..9b72338a77 100644 --- a/module/release/control.php +++ b/module/release/control.php @@ -93,7 +93,6 @@ class release extends control } $this->loadModel('story'); $this->loadModel('bug'); - $this->loadModel('project'); $this->loadModel('build'); /* Get release and build. */ @@ -104,7 +103,7 @@ class release extends control /* Get stories and bugs. */ $orderBy = 'status_asc, stage_asc, id_desc'; $stories = $this->story->getProjectStories($build->project, $orderBy); - $bugs = $this->project->getResolvedBugs($build->project); + $bugs = $this->bug->getProjectBugs($build->project); $this->view->header->title = $this->lang->release->edit; $this->view->position[] = $this->lang->release->edit; @@ -188,7 +187,7 @@ class release extends control if(!empty($build)) { $stories = $this->loadModel('story')->getProjectStories($build->project, $orderBy); - $bugs = $this->loadModel('project')->getResolvedBugs($build->project); + $bugs = $this->bug->getProjectBugs($build->project); } $this->view->productID = $productID; $this->view->stories = $stories; diff --git a/module/release/css/common.css b/module/release/css/common.css new file mode 100755 index 0000000000..e8abbee4f8 --- /dev/null +++ b/module/release/css/common.css @@ -0,0 +1,3 @@ +.mainTable { width:100%; border:none} +.headTable { width:100%; height:30px; margin:0px;} +.contentDiv { height:195px; overflow-y:auto} diff --git a/module/release/view/ajaxgetstoriesandbugs.html.php b/module/release/view/ajaxgetstoriesandbugs.html.php index e069d20433..9d7cfbf9ca 100644 --- a/module/release/view/ajaxgetstoriesandbugs.html.php +++ b/module/release/view/ajaxgetstoriesandbugs.html.php @@ -1,45 +1,78 @@ diff --git a/module/release/view/edit.html.php b/module/release/view/edit.html.php index 2f07a838b5..6e40b0bc7b 100644 --- a/module/release/view/edit.html.php +++ b/module/release/view/edit.html.php @@ -32,46 +32,77 @@
createLink('project', 'task', 'project=' . $project->id), $project->name);?>release->linkStoriesAndBugs;?>
-
- - - - - - - + +
+
release->linkStories;?>
idAB;?>story->title;?>statusAB;?>story->stageAB;?>
+ + - $story):?> - createLink('story', 'view', "storyID=$storyID");?> - - - - - + + - -
+ + + + + + + + +
release->linkStories;?>
idAB;?>story->title;?>statusAB;?>story->stageAB;?>
+
stage == 'developed') echo 'checked';?>> id);?>title, '', "class='preview'");?>story->statusList[$story->status];?>story->stageList[$story->stage];?>
+
+ + $story):?> + createLink('story', 'view', "storyID=$storyID");?> + + + + + + + +
+ stage == 'developed' or $story->status == 'closed') echo 'checked';?>> id);?> + title, '', "class='preview'");?>story->statusList[$story->status];?>story->stageList[$story->stage];?>
+
+
selectAll;?>
-
- - - - - - + +
+
release->linkBugs;?>
idAB;?>bug->title;?>bug->status;?>
+ + - - createLink('bug', 'view', "bugID=$bug->id");?> - - - - + + - -
+ + + + + + + +
release->linkBugs;?>
idAB;?>bug->title;?>bug->status;?>
+
id);?>title, '', "class='preview'");?>bug->statusList[$bug->status];?>
+
+ + + createLink('bug', 'view', "bugID=$bug->id");?> + + + + + + +
+ status == 'closed' or $bug->status == 'resolved') echo "checked"; ?>> id);?> + title, '', "class='preview'");?>bug->statusList[$bug->status];?>
+
+
selectAll;?>
+
release->linkStoriesAndBugs;?>
-
- - - - - - - + +
+
release->linkStories;?>
idAB;?>story->title;?>statusAB;?>story->stageAB;?>
+ + - $story):?> - createLink('story', 'view', "storyID=$story->id"); - ?> - - - - - + + -
+ + + + + + + + +
release->linkStories;?>
idAB;?>story->title;?>statusAB;?>story->stageAB;?>
+
stories, $story->id) !== false) echo 'checked';?>> id);?>title, '', "class='preview'");?>story->statusList[$story->status];?>story->stageList[$story->stage];?>
+
+ + $story):?> + createLink('story', 'view', "storyID=$story->id"); + ?> + + + + + + + +
stories, $story->id) !== false) echo 'checked';?>> id);?>title, '', "class='preview'");?>story->statusList[$story->status];?>story->stageList[$story->stage];?>
+
+
-
- - - - - - + +
+
release->linkBugs;?>
idAB;?>bug->title;?>bug->status;?>
+ + - - createLink('bug', 'view', "bugID=$bug->id");?> - - - - + + -
+ + + + + + + +
release->linkBugs;?>
idAB;?>bug->title;?>bug->status;?>
+
bugs, $bug->id) !== false) echo 'checked';?>> id);?>title, '', "class='preview'");?>bug->statusList[$bug->status];?>
+
+ + + createLink('bug', 'view', "bugID=$bug->id");?> + + + + + + +
bugs, $bug->id) !== false) echo 'checked';?>> id);?>title, '', "class='preview'");?>bug->statusList[$bug->status];?>
+
+
+