diff --git a/framework/control.class.php b/framework/control.class.php index 7d90e848c1..131d4dad8a 100644 --- a/framework/control.class.php +++ b/framework/control.class.php @@ -60,15 +60,7 @@ class control extends baseControl $viewFile = (!empty($siteExtViewFile) and file_exists($siteExtViewFile)) ? $siteExtViewFile : $viewFile; if(!is_file($viewFile)) { - if($this->config->debug === false) - { - die(js::locate($this->createLink('misc','ajaxerror', ".mhtml"), 'parent')); - } - else - { - $this->app->triggerError("the view file $viewFile not found", __FILE__, __LINE__, $exit = true); - } - + die(js::error($this->lang->notPage) . js::locate('back')); } $commonExtHookFiles = glob($viewExtPath['common'] . $this->devicePrefix . $methodName . ".*.{$viewType}.hook.php"); diff --git a/module/bug/control.php b/module/bug/control.php index 31261e6253..0005b6ff81 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -1501,7 +1501,7 @@ class bug extends control /* Get related objects title or names. */ $productsType = $this->dao->select('id, type')->from(TABLE_PRODUCT)->where('id')->in($relatedProductIdList)->fetchPairs(); - $relatedModules = $this->loadModel('tree')->getOptionMenu($productID, 'bug'); + $relatedModules = $this->dao->select('id, name')->from(TABLE_MODULE)->where('deleted')->eq(0)->fetchPairs(); $relatedStories = $this->dao->select('id,title')->from(TABLE_STORY) ->where('id')->in($relatedStoryIdList)->fetchPairs(); $relatedTasks = $this->dao->select('id, name')->from(TABLE_TASK)->where('id')->in($relatedTaskIdList)->fetchPairs(); $relatedBugs = $this->dao->select('id, title')->from(TABLE_BUG)->where('id')->in($relatedBugIdList)->fetchPairs(); @@ -1509,7 +1509,7 @@ class bug extends control $relatedBranch = array('0' => $this->lang->branch->all) + $this->dao->select('id, name')->from(TABLE_BRANCH)->where('id')->in($relatedBranchIdList)->fetchPairs(); $relatedBuilds = array('trunk' => $this->lang->trunk) + $this->dao->select('id, name')->from(TABLE_BUILD)->where('id')->in($relatedBuildIdList)->fetchPairs(); $relatedFiles = $this->dao->select('id, objectID, pathname, title')->from(TABLE_FILE)->where('objectType')->eq('bug')->andWhere('objectID')->in(@array_keys($bugs))->andWhere('extra')->ne('editor')->fetchGroup('objectID'); - + foreach($bugs as $bug) { if($this->post->fileType == 'csv') diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php index 9356bc5b79..f1c3d0121c 100644 --- a/module/common/lang/zh-cn.php +++ b/module/common/lang/zh-cn.php @@ -99,6 +99,7 @@ $lang->selectAll = '全选'; $lang->selectReverse = '反选'; $lang->loading = '稍候...'; $lang->notFound = '抱歉,您访问的对象并不存在!'; +$lang->notPage = '抱歉,您访问的功能正在开发中!'; $lang->showAll = '[[全部显示]]'; $lang->future = '未来'; diff --git a/module/doc/view/side.html.php b/module/doc/view/side.html.php index 89e9e55f7f..5cc1b7c19c 100644 --- a/module/doc/view/side.html.php +++ b/module/doc/view/side.html.php @@ -13,7 +13,7 @@ if($this->methodName != 'browse') } if(empty($type)) $type = 'product'; ?> -
+
- -
- -
- - diff --git a/module/testcase/control.php b/module/testcase/control.php index 7574276919..7be9f16005 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -1638,4 +1638,11 @@ class testcase extends control $this->view->users = $this->loadModel('user')->getPairs('noletter'); $this->display(); } + + public function ajaxGetStoryMoule($storyID) + { + $story = $this->dao->select('module')->from(TABLE_STORY)->where('id')->eq($storyID)->fetch(); + $moduleID = !empty($story) ? $story->module : 0; + die(json_encode(array('moduleID'=> $moduleID))); + } } diff --git a/module/testcase/js/showimport.js b/module/testcase/js/showimport.js index e2febaf3f1..2b55ee423e 100644 --- a/module/testcase/js/showimport.js +++ b/module/testcase/js/showimport.js @@ -1,13 +1,21 @@ -$(document).on('change', '.moduleChange',function ajaxGetMouletStories(){ +$(document).on('change', '.moduleChange',function(){ var moduleID = $(this).val(); if(typeof(moduleID) == 'undefined') moduleID = 0; - link = createLink('testcase', 'ajaxGetMouletStories', 'moduleID=' + moduleID); - $(this).parent('td').next('td').load(link, function(){$(this).parent('td').next('td').find('slect').chosen();}); + var id = $(this).attr('id'); + var index = id.substring(6); + link = createLink('story', 'ajaxGetProductStories', 'productID=' + productID + '&branch=' + branch + '&moduleID=' + moduleID + '&storyID='+ '' + '&onlyOption=true&status=noclosed'); + $('#story' + index).load(link, function(){$(this).trigger("chosen:updated");}); }) -$(document).on('change', '.storyChange',function ajaxGetStoryMoule(){ - var storyID = $(this).val(); - if(typeof(storyID) == 'undefined') storyID = 0; - link = createLink('testcase', 'ajaxGetStoryMoule', 'storyID=' + storyID); - $(this).parent('td').prev('td').load(link, function(){$(this).parent('td').prev('td').find('slect').chosen();}); +$(document).on('change', '.storyChange',function(){ + var storyID = $(this).val(); + if(typeof(storyID) == 'undefined') storyID = 0; + link = createLink('testcase', 'ajaxGetStoryMoule', 'storyID=' + storyID); + var id = $(this).attr('id'); + var index = id.substring(5); + $.get(link,function(json){ + var obj = JSON.parse(json); + $("#module" + index).val(obj.moduleID); + $('#module' + index).trigger("chosen:updated"); + }) }) diff --git a/module/testcase/view/showimport.html.php b/module/testcase/view/showimport.html.php index aa6a3f1f80..c4087e8e3a 100644 --- a/module/testcase/view/showimport.html.php +++ b/module/testcase/view/showimport.html.php @@ -2,6 +2,8 @@ + +
diff --git a/module/todo/control.php b/module/todo/control.php index 5eee51a94e..ace512444d 100644 --- a/module/todo/control.php +++ b/module/todo/control.php @@ -42,7 +42,16 @@ class todo extends control { $todoID = $this->todo->create($date, $account); if(dao::isError()) die(js::error(dao::getError())); - $this->loadModel('action')->create('todo', $todoID, 'opened'); + + if($_POST['type'] != 'feedback') + { + $this->loadModel('action')->create('todo', $todoID, 'opened'); + } + else + { + $this->loadModel('action')->create('todo', $todoID, 'FromFeedback', '', $_POST['idvalue']); + } + $date = str_replace('-', '', $this->post->date); if($date == '') { diff --git a/module/user/model.php b/module/user/model.php index 8d1c10066f..773816c0ae 100644 --- a/module/user/model.php +++ b/module/user/model.php @@ -91,7 +91,6 @@ class userModel extends model $users = $this->dao->select($fields)->from(TABLE_USER) ->where('1') ->beginIF(strpos($params, 'nodeleted') !== false or empty($this->config->user->showDeleted))->andWhere('deleted')->eq('0')->fi() - ->andWhere('role')->ne('market') ->orderBy($orderBy) ->fetchAll('account'); if($usersToAppended) $users += $this->dao->select($fields)->from(TABLE_USER)->where('account')->in($usersToAppended)->fetchAll('account'); @@ -1434,7 +1433,7 @@ class userModel extends model public function checkProductPriv($product, $account, $groups, $linkedProjects, $teams) { if(strpos($this->app->company->admins, ',' . $account . ',') !== false) return true; - if($product->PO == $account OR $product->QD == $account OR $product->RD == $account OR $product->createdBy == $account OR $product->feedback == $account) return true; + if($product->PO == $account OR $product->QD == $account OR $product->RD == $account OR $product->createdBy == $account OR (isset($product->feedback) && $product->feedback == $account)) return true; if($product->acl == 'open') return true; if($product->acl == 'custom')