" . $lang->noData . '
';?>
- -
@@ -90,11 +90,7 @@ if(empty($type)) $type = 'product';
- >
" . $subLibName, '', "class='text-ellipsis' title='{$subLibName}'");?>
-
- 0):?>
-
-
-
-
+ 0):?>
- methodName == 'browse' && $browseType == 'bymodule' && $moduleID == $module->id) echo "class='active'";?>>
createLink('doc', 'browse', "libID=$subLibID&browseType=byModule¶m={$module->id}"), " " . $module->name, '', "class='text-ellipsis' title='{$module->name}'");?>
From f9a6f49edd584f16d3b64b9c123df24a93e83875 Mon Sep 17 00:00:00 2001
From: Yagami <976204163@qq.com>
Date: Fri, 19 Apr 2019 10:37:16 +0800
Subject: [PATCH 2/8] * Fix feedback action.
---
module/todo/control.php | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
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 == '')
{
From a9aab79f65ea0f98a85ddab1a965ae93ce949a6a Mon Sep 17 00:00:00 2001
From: yfl <554665488@qq.com>
Date: Fri, 19 Apr 2019 11:17:29 +0800
Subject: [PATCH 3/8] * project team expect feedback
---
module/project/control.php | 2 +-
module/user/model.php | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/module/project/control.php b/module/project/control.php
index 878fe02b3b..7d5fa23f71 100644
--- a/module/project/control.php
+++ b/module/project/control.php
@@ -1780,7 +1780,7 @@ class project extends control
$this->loadModel('dept');
$project = $this->project->getById($projectID);
- $users = $this->user->getPairs('noclosed|nodeleted|devfirst');
+ $users = $this->user->getPairs('noclosed|nodeleted|devfirst|nofeedback');
$roles = $this->user->getUserRoles(array_keys($users));
$deptUsers = $dept === '' ? array() : $this->dept->getDeptUserPairs($dept);
$currentMembers = $this->project->getTeamMembers($projectID);
diff --git a/module/user/model.php b/module/user/model.php
index 8d1c10066f..90c948fe56 100644
--- a/module/user/model.php
+++ b/module/user/model.php
@@ -91,7 +91,7 @@ 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')
+ ->beginIF(strpos($params, 'nofeedback') !== false )->andWhere('feedback')->ne('1')->fi()
->orderBy($orderBy)
->fetchAll('account');
if($usersToAppended) $users += $this->dao->select($fields)->from(TABLE_USER)->where('account')->in($usersToAppended)->fetchAll('account');
From a60f376f1f222ed900af79baabb38239231051d0 Mon Sep 17 00:00:00 2001
From: yfl <554665488@qq.com>
Date: Fri, 19 Apr 2019 11:32:04 +0800
Subject: [PATCH 4/8] * except feedback user mv zentaobiz
---
module/user/model.php | 1 -
1 file changed, 1 deletion(-)
diff --git a/module/user/model.php b/module/user/model.php
index 90c948fe56..fd646117f7 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()
- ->beginIF(strpos($params, 'nofeedback') !== false )->andWhere('feedback')->ne('1')->fi()
->orderBy($orderBy)
->fetchAll('account');
if($usersToAppended) $users += $this->dao->select($fields)->from(TABLE_USER)->where('account')->in($usersToAppended)->fetchAll('account');
From 17b87ba461ef22859ca6cf32d8a218e09f241886 Mon Sep 17 00:00:00 2001
From: yfl <554665488@qq.com>
Date: Fri, 19 Apr 2019 13:00:22 +0800
Subject: [PATCH 5/8] * product auth to feedback
---
module/user/model.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/module/user/model.php b/module/user/model.php
index fd646117f7..773816c0ae 100644
--- a/module/user/model.php
+++ b/module/user/model.php
@@ -1433,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')
From f468d76d9e0c3d76e47c3593943df78769a36924 Mon Sep 17 00:00:00 2001
From: yfl <554665488@qq.com>
Date: Fri, 19 Apr 2019 14:38:33 +0800
Subject: [PATCH 6/8] * export testcase by moodule chosen story
---
module/testcase/control.php | 7 +++++++
module/testcase/js/showimport.js | 24 ++++++++++++++++--------
module/testcase/view/showimport.html.php | 2 ++
3 files changed, 25 insertions(+), 8 deletions(-)
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 @@
+
+
From ee1d1b6aabc60e539d49ce7d561fd04cf32b3a25 Mon Sep 17 00:00:00 2001
From: yfl <554665488@qq.com>
Date: Fri, 19 Apr 2019 15:33:45 +0800
Subject: [PATCH 7/8] * export all bug show module
---
module/bug/control.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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')
From cfa8147618c9118d60c765ec995e9c48f4f80dc8 Mon Sep 17 00:00:00 2001
From: yfl <554665488@qq.com>
Date: Mon, 22 Apr 2019 09:30:41 +0800
Subject: [PATCH 8/8] * Fix Bug
---
framework/control.class.php | 10 +-
module/common/lang/zh-cn.php | 1 +
module/misc/control.php | 4 -
module/task/view/view.html.php | 386 ---------------------------------
4 files changed, 2 insertions(+), 399 deletions(-)
delete mode 100644 module/task/view/view.html.php
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/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/misc/control.php b/module/misc/control.php
index 20c81ded6c..ec78640a24 100644
--- a/module/misc/control.php
+++ b/module/misc/control.php
@@ -193,8 +193,4 @@ class misc extends control
$this->view->detailed = $detailed;
$this->display();
}
- public function ajaxerror()
- {
- $this->display();
- }
}
diff --git a/module/task/view/view.html.php b/module/task/view/view.html.php
deleted file mode 100644
index a733d9d4ce..0000000000
--- a/module/task/view/view.html.php
+++ /dev/null
@@ -1,386 +0,0 @@
-
- * @package task
- * @version $Id: view.html.php 4808 2013-06-17 05:48:13Z zhujinyonging@gmail.com $
- * @link http://www.zentao.net
- */
-?>
-
-
-session->taskList != false ? $app->session->taskList : $this->createLink('project', 'browse', "projectID=$task->project");?>
-
---- - ' . $lang->goback, '', "class='btn btn-secondary'");?> - - -- -- id?> - - parent > 0) echo '' . $this->lang->task->childrenAB . '';?> - team)) echo '' . $this->lang->task->multipleAB . '';?> - parent > 0) echo isset($task->parentName) ? html::a(inlink('view', "taskID={$task->parent}"), $task->parentName) . ' / ' : '';?>name;?> - - deleted):?> - task->deleted;?> - - fromBug != 0):?> - icons['bug']) . " {$lang->task->fromBug}$lang->colon$task->fromBug";?> - --- project = $task->project; - $link = $this->createLink('task', 'create', "project={$task->project}&storyID={$task->story}&moduleID={$task->module}"); - if(common::hasPriv('task', 'create', $checkObject)) echo html::a($link, " {$lang->task->create}", '', "class='btn btn-primary'"); - ?> -- --------- type != 'ops'):?> - fromBug != 0):?> -task->legendDesc;?>-- desc) ? $task->desc : "--- story):?> -bug->steps;?>-- bugSteps) ? $task->bugSteps : "-" . $lang->noData . '';?> ---task->storySpec;?>-- storySpec) || !empty($task->storyFiles)) ? $task->storySpec : "- fetch('file', 'printFiles', array('files' => $task->storyFiles, 'fieldset' => 'false'));?> -" . $lang->noData . '';?> --- - cases) and $task->cases):?> -task->storyVerify;?>-- storyVerify) ? $task->storyVerify : "-" . $lang->noData . '';?> --- - - children)):?> -task->case;?>---
-
- cases as $caseID => $case) echo '
- ' . html::a($this->createLink('testcase', 'view', "caseID=$caseID", '', true), "#$caseID " . $case, '', "data-toggle='modal' data-type='iframe' data-width='90%'") . ' ';?> -
-- - fetch('file', 'printFiles', array('files' => $task->files, 'fieldset' => 'true'));?> - createLink('action', 'comment', "objectType=task&objectID=$task->id");?> - -lang->task->children;?>---- -
-- - - - children as $child):?> -task->id;?> -task->lblPri;?> -task->name;?> -task->deadline;?> -task->assignedTo;?> -task->status;?> -task->consumedAB . $lang->task->lblHour;?> -task->leftAB . $lang->task->lblHour;?> -actions;?> -- - - -id;?> -- pri . "'>"; - echo $child->pri == '0' ? '' : zget($this->lang->task->priList, $child->pri, $child->pri); - echo ""; - ?> - -id", '', true); ?>">name;?> -deadline;?> -assignedTo])) echo $users[$child->assignedTo];?> -task->statusList, $child->status);?> -consumed;?> -left;?> -- project&taskID=$child->id", $child, 'list', '', '', 'iframe showinonlybody', true); - common::printIcon('task', 'start', "taskID=$child->id", $child, 'list', '', '', 'iframe showinonlybody', true); - common::printIcon('task', 'activate', "taskID=$child->id", $child, 'list', '', '', 'iframe showinonlybody', true); - common::printIcon('task', 'recordEstimate', "taskID=$child->id", $child, 'list', 'time', '', 'iframe showinonlybody', true); - common::printIcon('task', 'finish', "taskID=$child->id", $child, 'list', '', '', 'iframe showinonlybody', true); - common::printIcon('task', 'close', "taskID=$child->id", $child, 'list', '', '', 'iframe showinonlybody', true); - common::printIcon('task', 'edit', "taskID=$child->id", $child, 'list'); - ?> - ---- -";?> - deleted):?> - project&taskID=$task->id", $task, 'button', '', '', 'iframe', true, '', empty($task->team) ? $lang->task->assignTo : $lang->task->transfer); - common::printIcon('task', 'start', "taskID=$task->id", $task, 'button', '', '', 'iframe showinonlybody', true); - common::printIcon('task', 'restart', "taskID=$task->id", $task, 'button', '', '', 'iframe showinonlybody', true); - common::printIcon('task', 'recordEstimate', "taskID=$task->id", $task, 'button', '', '', 'iframe showinonlybody', true); - common::printIcon('task', 'pause', "taskID=$task->id", $task, 'button', '', '', 'iframe showinonlybody', true); - common::printIcon('task', 'finish', "taskID=$task->id", $task, 'button', '', '', 'iframe showinonlybody text-success', true); - common::printIcon('task', 'activate', "taskID=$task->id", $task, 'button', '', '', 'iframe showinonlybody text-success', true); - common::printIcon('task', 'close', "taskID=$task->id", $task, 'button', '', '', 'iframe showinonlybody', true); - common::printIcon('task', 'cancel', "taskID=$task->id", $task, 'button', '', '', 'iframe showinonlybody', true); - - if(!isonlybody()) echo ""; - if(empty($task->team) or empty($task->children)) common::printIcon('task', 'batchCreate', "project=$task->project&storyID=$task->story&moduleID=$task->module&taskID=$task->id", $task, 'button','plus','','','','',' '); - common::printIcon('task', 'edit', "taskID=$task->id", $task, 'button', '', '', 'showinonlybody'); - common::printIcon('task', 'create', "productID=0&storyID=0&moduleID=0&taskID=$task->id", $task, 'button', 'copy'); - common::printIcon('task', 'delete', "projectID=$task->project&taskID=$task->id", $task, 'button', 'trash', 'hiddenwin'); - - if($task->parent > 0) echo html::a(helper::createLink('task', 'view', "taskID=$task->parent"), "", '', "class='btn btn-link' title='{$lang->task->parent}'"); - ?> - --------
-
- task->legendBasic;?> -
- task->legendLife;?> - team)) :?> -
- task->team;?> - -
----- -
-- -task->project;?> -project", $project->name)) echo $project->name;?> -- -task->module;?> - name . '/'; - echo $product->name . $lang->arrow; - } - foreach($modulePath as $key => $module) - { - $moduleTitle .= $module->name; - if(!common::printLink('project', 'task', "projectID=$task->project&browseType=byModule¶m=$module->id", $module->name)) echo $module->name; - if(isset($modulePath[$key + 1])) - { - $moduleTitle .= '/'; - echo $lang->arrow; - } - } - } - $printModule = ob_get_contents(); - ob_end_clean(); - ?> -- - - fromBug):?> -task->story;?> -- storyTitle) echo $lang->noData; - if($task->storyTitle and !common::printLink('story', 'view', "storyID=$task->story", $task->storyTitle, '', "class='iframe' data-width='80%'", true, true)) echo $task->storyTitle; - if($task->needConfirm) - { - echo "({$lang->story->changed} "; - echo html::a($this->createLink('task', 'confirmStoryChange', "taskID=$task->id"), $lang->confirm, 'hiddenwin', "class='btn btn-mini btn-info'"); - echo ")"; - } - ?> - -- - -task->fromBug;?> -createLink('bug', 'view', "bugID=$task->fromBug", '', true), "#$task->fromBug " . $fromBug->title, '', "class='iframe' data-width='80%'");?> -- -task->assignedTo;?> -assignedTo ? $task->assignedToRealName . $lang->at . $task->assignedDate : $lang->noData;?> -- -task->type;?> -task->typeList[$task->type];?> -- -task->status;?> -task->statusList, $task->status);?> -- -task->progress;?> -progress . '%';?> -- -task->pri;?> -pri;?>' title='task->priList, $task->pri);?>'>pri == '0' ? $lang->noData : zget($lang->task->priList, $task->pri)?> -- - -task->mailto;?> -- mailto)); - if(empty($mailto)) - { - echo $lang->noData; - } - else - { - foreach($mailto as $account) echo ' ' . zget($users, $account, $account); - } - ?> - -- getClientLang() == 'en' ? 'w-100px' : 'w-70px';?> ---
-- -task->openedBy;?> -openedBy ? zget($users, $task->openedBy, $task->openedBy) . $lang->at . $task->openedDate : $lang->noData;?> -- -task->finishedBy;?> -finishedBy) ? zget($users, $task->finishedBy, $task->finishedBy) . $lang->at . $task->finishedDate : $lang->noData;?> -- -task->canceledBy;?> -canceledBy ? zget($users, $task->canceledBy, $task->canceledBy) . $lang->at . $task->canceledDate : $lang->noData;?> -- -task->closedBy;?> -closedBy ? zget($users, $task->closedBy, $task->closedBy) . $lang->at . $task->closedDate : $lang->noData;?> -- -task->closedReason;?> -closedReason ? $lang->task->reasonList[$task->closedReason] : $lang->noData;?> -- -task->lastEdited;?> -lastEditedBy ? zget($users, $task->lastEditedBy, $task->lastEditedBy) . $lang->at . $task->lastEditedDate : $lang->noData;?> ---- -
-- - - team as $member):?> -task->team?> -task->estimate?> -task->consumed?> -task->left?> -- - -account)?> -estimate?> -consumed?> -left?> -----task->legendEffort;?>
---- getClientLang() == 'en' ? 'w-90px' : 'w-70px';?> -
-- -task->estimate;?> -estimate . $lang->workingHour;?> -- -task->consumed;?> -consumed, 2) . $lang->workingHour;?> -- -task->left;?> -left . $lang->workingHour;?> -- -task->estStarted;?> -estStarted;?> -- -task->realStarted;?> -realStarted; ?> -- -task->deadline;?> -- deadline; - if(isset($task->delay)) printf($lang->task->delayWarning, $task->delay); - ?> - -
-
parent != 0) continue;?>
- methodName == 'browse' && $browseType == 'bymodule' && $moduleID == $module->id) echo "class='active'";?>>
createLink('doc', 'browse', "libID=$subLibID&browseType=byModule¶m={$module->id}"), " " . $module->name, '', "class='text-ellipsis' title='{$module->name}'");?>
From f9a6f49edd584f16d3b64b9c123df24a93e83875 Mon Sep 17 00:00:00 2001
From: Yagami <976204163@qq.com>
Date: Fri, 19 Apr 2019 10:37:16 +0800
Subject: [PATCH 2/8] * Fix feedback action.
---
module/todo/control.php | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
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 == '')
{
From a9aab79f65ea0f98a85ddab1a965ae93ce949a6a Mon Sep 17 00:00:00 2001
From: yfl <554665488@qq.com>
Date: Fri, 19 Apr 2019 11:17:29 +0800
Subject: [PATCH 3/8] * project team expect feedback
---
module/project/control.php | 2 +-
module/user/model.php | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/module/project/control.php b/module/project/control.php
index 878fe02b3b..7d5fa23f71 100644
--- a/module/project/control.php
+++ b/module/project/control.php
@@ -1780,7 +1780,7 @@ class project extends control
$this->loadModel('dept');
$project = $this->project->getById($projectID);
- $users = $this->user->getPairs('noclosed|nodeleted|devfirst');
+ $users = $this->user->getPairs('noclosed|nodeleted|devfirst|nofeedback');
$roles = $this->user->getUserRoles(array_keys($users));
$deptUsers = $dept === '' ? array() : $this->dept->getDeptUserPairs($dept);
$currentMembers = $this->project->getTeamMembers($projectID);
diff --git a/module/user/model.php b/module/user/model.php
index 8d1c10066f..90c948fe56 100644
--- a/module/user/model.php
+++ b/module/user/model.php
@@ -91,7 +91,7 @@ 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')
+ ->beginIF(strpos($params, 'nofeedback') !== false )->andWhere('feedback')->ne('1')->fi()
->orderBy($orderBy)
->fetchAll('account');
if($usersToAppended) $users += $this->dao->select($fields)->from(TABLE_USER)->where('account')->in($usersToAppended)->fetchAll('account');
From a60f376f1f222ed900af79baabb38239231051d0 Mon Sep 17 00:00:00 2001
From: yfl <554665488@qq.com>
Date: Fri, 19 Apr 2019 11:32:04 +0800
Subject: [PATCH 4/8] * except feedback user mv zentaobiz
---
module/user/model.php | 1 -
1 file changed, 1 deletion(-)
diff --git a/module/user/model.php b/module/user/model.php
index 90c948fe56..fd646117f7 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()
- ->beginIF(strpos($params, 'nofeedback') !== false )->andWhere('feedback')->ne('1')->fi()
->orderBy($orderBy)
->fetchAll('account');
if($usersToAppended) $users += $this->dao->select($fields)->from(TABLE_USER)->where('account')->in($usersToAppended)->fetchAll('account');
From 17b87ba461ef22859ca6cf32d8a218e09f241886 Mon Sep 17 00:00:00 2001
From: yfl <554665488@qq.com>
Date: Fri, 19 Apr 2019 13:00:22 +0800
Subject: [PATCH 5/8] * product auth to feedback
---
module/user/model.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/module/user/model.php b/module/user/model.php
index fd646117f7..773816c0ae 100644
--- a/module/user/model.php
+++ b/module/user/model.php
@@ -1433,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')
From f468d76d9e0c3d76e47c3593943df78769a36924 Mon Sep 17 00:00:00 2001
From: yfl <554665488@qq.com>
Date: Fri, 19 Apr 2019 14:38:33 +0800
Subject: [PATCH 6/8] * export testcase by moodule chosen story
---
module/testcase/control.php | 7 +++++++
module/testcase/js/showimport.js | 24 ++++++++++++++++--------
module/testcase/view/showimport.html.php | 2 ++
3 files changed, 25 insertions(+), 8 deletions(-)
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 @@
+
+
From ee1d1b6aabc60e539d49ce7d561fd04cf32b3a25 Mon Sep 17 00:00:00 2001
From: yfl <554665488@qq.com>
Date: Fri, 19 Apr 2019 15:33:45 +0800
Subject: [PATCH 7/8] * export all bug show module
---
module/bug/control.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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')
From cfa8147618c9118d60c765ec995e9c48f4f80dc8 Mon Sep 17 00:00:00 2001
From: yfl <554665488@qq.com>
Date: Mon, 22 Apr 2019 09:30:41 +0800
Subject: [PATCH 8/8] * Fix Bug
---
framework/control.class.php | 10 +-
module/common/lang/zh-cn.php | 1 +
module/misc/control.php | 4 -
module/task/view/view.html.php | 386 ---------------------------------
4 files changed, 2 insertions(+), 399 deletions(-)
delete mode 100644 module/task/view/view.html.php
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/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/misc/control.php b/module/misc/control.php
index 20c81ded6c..ec78640a24 100644
--- a/module/misc/control.php
+++ b/module/misc/control.php
@@ -193,8 +193,4 @@ class misc extends control
$this->view->detailed = $detailed;
$this->display();
}
- public function ajaxerror()
- {
- $this->display();
- }
}
diff --git a/module/task/view/view.html.php b/module/task/view/view.html.php
deleted file mode 100644
index a733d9d4ce..0000000000
--- a/module/task/view/view.html.php
+++ /dev/null
@@ -1,386 +0,0 @@
-
- * @package task
- * @version $Id: view.html.php 4808 2013-06-17 05:48:13Z zhujinyonging@gmail.com $
- * @link http://www.zentao.net
- */
-?>
-
-
-session->taskList != false ? $app->session->taskList : $this->createLink('project', 'browse', "projectID=$task->project");?>
-
-
-
-
-
-