diff --git a/module/program/css/create.css b/module/program/css/create.css index f58b947129..191b12ce1d 100644 --- a/module/program/css/create.css +++ b/module/program/css/create.css @@ -1,11 +1,2 @@ -#copyProjectModal {padding: 0;} -#copyProjectModal {padding: 0 2px;} -#copyProjectModal > div {position: relative;} -#copyProjectModal a {display: block; min-height: 30px; line-height: 30px; padding: 5px 15px; border: 1px solid #e5e5e5; color: #333; margin: 5px 0; border-radius: 3px;} -#copyProjectModal a > i {display: inline-block; margin-right: 5px;} -#copyProjectModal a:hover {border: 1px solid #00a9fc; background-color: #E9F2FB; text-decoration: none;} -#copyProjectModal a.active {border-color: #00da88; color: #00da88; background-color: #E5FFE6;} -#copyProjectModal a.active:after {position: absolute; content: '\e92f'; font-family: ZentaoIcon; font-size: 20px; right: 25px;} -#copyProjectModal a.cancel {color: #ff5d5d;} #budget {border-right: 0px;} #budgetUnit {border-left: 0px;} diff --git a/module/program/js/create.js b/module/program/js/create.js index a23674ec40..0a1d45c1fa 100644 --- a/module/program/js/create.js +++ b/module/program/js/create.js @@ -1,6 +1,5 @@ $(function() { - $('#copyProjects a').click(function(){setCopyProject($(this).data('id')); $('#copyProjectModal').modal('hide')}); $('#isCat').change(function() { if($(this).prop('checked')) diff --git a/module/program/view/create.html.php b/module/program/view/create.html.php index 578ad40fba..279a2349fd 100644 --- a/module/program/view/create.html.php +++ b/module/program/view/create.html.php @@ -131,34 +131,6 @@ - diff --git a/test/class/story.class.php b/test/class/story.class.php index 694ac8bc27..235ac7a3f7 100644 --- a/test/class/story.class.php +++ b/test/class/story.class.php @@ -501,87 +501,6 @@ class storyTest return $this->objectModel->getByList($storyIdList); } - public function getProductStoriesTest($productID = 0, $branch = 0, $moduleIdList = 0, $status = 'all', $type = 'story', $orderBy = 'id_desc', $hasParent = true, $excludeStories = '', $pager = null) - { - $objects = $this->objectModel->getProductStories($productID = 0, $branch = 0, $moduleIdList = 0, $status = 'all', $type = 'story', $orderBy = 'id_desc', $hasParent = true, $excludeStories = '', $pager = null); - - if(dao::isError()) return dao::getError(); - - return $objects; - } - - public function getProductStoryPairsTest($productID = 0, $branch = 0, $moduleIdList = 0, $status = 'all', $order = 'id_desc', $limit = 0, $type = 'full', $storyType = 'story', $hasParent = true) - { - $objects = $this->objectModel->getProductStoryPairs($productID = 0, $branch = 0, $moduleIdList = 0, $status = 'all', $order = 'id_desc', $limit = 0, $type = 'full', $storyType = 'story', $hasParent = true); - - if(dao::isError()) return dao::getError(); - - return $objects; - } - - public function getByAssignedToTest($productID, $branch, $modules, $account, $type = 'story', $orderBy = '', $pager = null) - { - $objects = $this->objectModel->getByAssignedTo($productID, $branch, $modules, $account, $type = 'story', $orderBy = '', $pager = null); - - if(dao::isError()) return dao::getError(); - - return $objects; - } - - public function getByOpenedByTest($productID, $branch, $modules, $account, $type = 'story', $orderBy = '', $pager = null) - { - $objects = $this->objectModel->getByOpenedBy($productID, $branch, $modules, $account, $type = 'story', $orderBy = '', $pager = null); - - if(dao::isError()) return dao::getError(); - - return $objects; - } - - public function getByReviewedByTest($productID, $branch, $modules, $account, $type = 'story', $orderBy = '', $pager = null) - { - $objects = $this->objectModel->getByReviewedBy($productID, $branch, $modules, $account, $type = 'story', $orderBy = '', $pager = null); - - if(dao::isError()) return dao::getError(); - - return $objects; - } - - public function getByReviewByTest($productID, $branch, $modules, $account, $type = 'story', $orderBy = '', $pager = null) - { - $objects = $this->objectModel->getByReviewBy($productID, $branch, $modules, $account, $type = 'story', $orderBy = '', $pager = null); - - if(dao::isError()) return dao::getError(); - - return $objects; - } - - public function getByClosedByTest($productID, $branch, $modules, $account, $type = 'story', $orderBy = '', $pager = null) - { - $objects = $this->objectModel->getByClosedBy($productID, $branch, $modules, $account, $type = 'story', $orderBy = '', $pager = null); - - if(dao::isError()) return dao::getError(); - - return $objects; - } - - public function getByStatusTest($productID, $branch, $modules, $status, $type = 'story', $orderBy = '', $pager = null) - { - $objects = $this->objectModel->getByStatus($productID, $branch, $modules, $status, $type = 'story', $orderBy = '', $pager = null); - - if(dao::isError()) return dao::getError(); - - return $objects; - } - - public function getByPlanTest($productID, $branch, $modules, $plan, $type = 'story', $orderBy = '', $pager = null) - { - $objects = $this->objectModel->getByPlan($productID, $branch, $modules, $plan, $type = 'story', $orderBy = '', $pager = null); - - if(dao::isError()) return dao::getError(); - - return $objects; - } - public function getByFieldTest($productID, $branch, $modules, $fieldName, $fieldValue, $type = 'story', $orderBy = '', $pager = null, $operator = 'equal') { $objects = $this->objectModel->getByField($productID, $branch, $modules, $fieldName, $fieldValue, $type = 'story', $orderBy = '', $pager = null, $operator = 'equal'); diff --git a/test/model/story/get2beclosed.php b/test/model/story/get2beclosed.php index ccc42e43d2..fdfab9b528 100644 --- a/test/model/story/get2beclosed.php +++ b/test/model/story/get2beclosed.php @@ -1,6 +1,5 @@ loadModel('story'); +$toBeClosed1 = $tester->story->get2BeClosed(1, 0, array(), 'story', 'id_desc'); +$toBeClosed2 = $tester->story->get2BeClosed(2, 0, array(), 'story', 'id_asc'); -r() && p() && e(); \ No newline at end of file +r() && p() && e(); diff --git a/test/model/story/getbyassignedto.php b/test/model/story/getbyassignedto.php deleted file mode 100644 index ab383e76d6..0000000000 --- a/test/model/story/getbyassignedto.php +++ /dev/null @@ -1,16 +0,0 @@ -getByAssignedTo(); -cid=1 -pid=1 - -*/ - -$story = new storyTest(); - -r() && p() && e(); \ No newline at end of file diff --git a/test/model/story/getbyclosedby.php b/test/model/story/getbyclosedby.php deleted file mode 100644 index 7811e2c70f..0000000000 --- a/test/model/story/getbyclosedby.php +++ /dev/null @@ -1,16 +0,0 @@ -getByClosedBy(); -cid=1 -pid=1 - -*/ - -$story = new storyTest(); - -r() && p() && e(); \ No newline at end of file diff --git a/test/model/story/getbyfield.php b/test/model/story/getbyfield.php index c4d5341d62..10766d0e85 100644 --- a/test/model/story/getbyfield.php +++ b/test/model/story/getbyfield.php @@ -1,6 +1,5 @@ loadModel('story'); +$byAssignedTo = $tester->story->getByField(1, 0, array(), 'assignedTo', 'admin', 'story', 'id_desc'); +$byOpenedBy = $tester->story->getByField(2, 0, array(), 'openedBy', 'admin', 'story', 'id_asc'); +$byReviewedBy = $tester->story->getByField(3, 0, array(), 'reviewedBy', 'admin', 'story', 'id_desc'); +$byReviewBy = $tester->story->getByField(4, 0, array(), 'reviewBy', 'admin', 'story', 'id_desc'); +$byClosedBy = $tester->story->getByField(5, 0, array(), 'closedBy', 'admin', 'story', 'id_desc'); +$byStatus = $tester->story->getByField(6, 0, array(), 'status', 'active', 'story', 'id_desc'); +$byPlan = $tester->story->getByField(7, 0, array(), 'plan', '0', 'story', 'id_desc'); -r() && p() && e(); \ No newline at end of file +r($byAssignedTo) && p() && e(); +r($byOpenedBy) && p() && e(); +r($byReviewedBy) && p() && e(); +r($byReviewBy) && p() && e(); +r($byClosedBy) && p() && e(); +r($byStatus) && p() && e(); +r($byPlan) && p() && e(); diff --git a/test/model/story/getbyopenedby.php b/test/model/story/getbyopenedby.php deleted file mode 100644 index f1c7909a63..0000000000 --- a/test/model/story/getbyopenedby.php +++ /dev/null @@ -1,16 +0,0 @@ -getByOpenedBy(); -cid=1 -pid=1 - -*/ - -$story = new storyTest(); - -r() && p() && e(); \ No newline at end of file diff --git a/test/model/story/getbyplan.php b/test/model/story/getbyplan.php deleted file mode 100644 index 6fa6495abb..0000000000 --- a/test/model/story/getbyplan.php +++ /dev/null @@ -1,16 +0,0 @@ -getByPlan(); -cid=1 -pid=1 - -*/ - -$story = new storyTest(); - -r() && p() && e(); \ No newline at end of file diff --git a/test/model/story/getbyreviewedby.php b/test/model/story/getbyreviewedby.php deleted file mode 100644 index 67c39a8e37..0000000000 --- a/test/model/story/getbyreviewedby.php +++ /dev/null @@ -1,16 +0,0 @@ -getByReviewedBy(); -cid=1 -pid=1 - -*/ - -$story = new storyTest(); - -r() && p() && e(); \ No newline at end of file diff --git a/test/model/story/getbystatus.php b/test/model/story/getbystatus.php deleted file mode 100644 index 131bc0d1a4..0000000000 --- a/test/model/story/getbystatus.php +++ /dev/null @@ -1,16 +0,0 @@ -getByStatus(); -cid=1 -pid=1 - -*/ - -$story = new storyTest(); - -r() && p() && e(); \ No newline at end of file diff --git a/test/model/story/getproductstories.php b/test/model/story/getproductstories.php index 4fe64993b2..62615aa9d3 100644 --- a/test/model/story/getproductstories.php +++ b/test/model/story/getproductstories.php @@ -1,6 +1,5 @@ story->getProductStories(1); $stories2 = $tester->story->getProductStories(1, 0, 0, 'all', 'requirement', 'id_asc', true); $stories3 = $tester->story->getProductStories(3, 0, 1830, 'all', 'story', 'id_asc', true); -r(count($stories1)) && p() && e('2'); // 获取产品1下的所有软件需求数量 -r(count($stories2)) && p() && e('2'); // 获取产品1下的所有用户需求数量 -r(count($stories3)) && p() && e('1'); // 获取产品2可关联的需求数量 -r($stories1) && p('2:type,product') && e('story,1'); // 获取需求1可关联的需求id、product +r(count($stories1)) && p() && e('2'); // 获取产品1下的所有软件需求数量 +r(count($stories2)) && p() && e('2'); // 获取产品1下的所有用户需求数量 +r(count($stories3)) && p() && e('1'); // 获取产品2可关联的需求数量 +r($stories1) && p('2:type,product,module') && e('story,1,1822'); // 查看通过产品1获取的软件需求的type、product、module字段 +r($stories2) && p('1:type,product,module') && e('requirement,1,1821'); // 查看通过产品1获取的用户需求的type、product、module字段 +r($stories3) && p('10:type,product,module') && e('story,3,1830'); // 查看通过产品3获取的软件需求的type、product、module字段 diff --git a/test/model/story/getproductstorypairs.php b/test/model/story/getproductstorypairs.php index 218f5026ed..d6800c2180 100644 --- a/test/model/story/getproductstorypairs.php +++ b/test/model/story/getproductstorypairs.php @@ -1,6 +1,5 @@ loadModel('story'); +$stories1 = $tester->story->getProductStoryPairs(1); +$stories2 = $tester->story->getProductStoryPairs(1, 0, 0, 'all', 'id_asc', 1, '', 'requirement', true); +$stories3 = $tester->story->getProductStoryPairs(3, 0, 1830, 'all', 'id_asc', 0, 'full', 'story', true); -r() && p() && e(); \ No newline at end of file +r(count($stories1)) && p() && e('3'); // 获取产品1下的所有软件需求数量 +r(count($stories2)) && p() && e('4'); // 获取产品1下的所有用户需求数量 +r(count($stories3)) && p() && e('2'); // 获取产品2可关联的需求数量 +r($stories1) && p('4,2') && e('4:软件需求4 (优先级:4,预计工时:0),2:软件需求2 (优先级:2,预计工时:20)'); // 查看通过产品1获取的软件需求的名称字段 +r($stories2) && p('1,3,showmore') && e('1:用户需求1,2:用户需求2,更多...'); // 查看通过产品1获取的用户需求的键值对详情 +r($stories3) && p('10') && e('10:软件需求10 (优先级:2,预计工时:9)'); // 查看通过产品3获取的软件需求的键值对详情