From 1af5aff52b76390178d47f77806b69efddf4784f Mon Sep 17 00:00:00 2001 From: Yagami Date: Thu, 4 May 2023 15:53:01 +0800 Subject: [PATCH 1/3] * Add ipd version. --- config/config.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/config.php b/config/config.php index 8060f0d5c0..87dddb33b5 100644 --- a/config/config.php +++ b/config/config.php @@ -192,9 +192,11 @@ if($config->edition != 'open') { $config->version = $config->edition . $config->{$config->edition . 'Version'}; if($config->edition != 'max') unset($config->maxVersion); + if($config->edition != 'ipd') unset($config->ipdVersion); } else { unset($config->bizVersion); unset($config->maxVersion); + unset($config->ipdVersion); } From ffd2b525c80eb42cca9ce973a0a441da9578e5ee Mon Sep 17 00:00:00 2001 From: Yagami Date: Thu, 4 May 2023 17:05:52 +0800 Subject: [PATCH 2/3] * Change judgment condition. --- module/block/control.php | 28 +++++++++++++------------- module/block/model.php | 2 +- module/block/view/contribute.html.php | 2 +- module/bug/control.php | 2 +- module/bug/model.php | 16 +++++---------- module/bug/view/batchactivate.html.php | 2 +- module/chart/view/preview.html.php | 2 +- module/common/model.php | 2 +- module/group/control.php | 2 +- module/install/model.php | 2 +- module/personnel/model.php | 4 ++-- module/personnel/view/invest.html.php | 6 +++--- module/search/model.php | 12 +++++------ module/task/model.php | 18 ++++++++--------- 14 files changed, 46 insertions(+), 54 deletions(-) diff --git a/module/block/control.php b/module/block/control.php index e1e85bb2f1..7583687a99 100755 --- a/module/block/control.php +++ b/module/block/control.php @@ -83,7 +83,7 @@ class block extends control { $this->get->set('dashboard', 'project'); - if($this->config->edition == 'max' and $this->app->tab == 'project') + if(($this->config->edition == 'max' or $this->config->edition == 'ipd') and $this->app->tab == 'project') { $project = $this->loadModel('project')->getByID($this->session->project); if(isset($project->model) and !helper::hasFeature("{$project->model}_issue")) @@ -957,7 +957,7 @@ class block extends control $count = isset($this->params->count) ? (int)$this->params->count : 15; /* Get projects. */ - $excludedModel = $this->config->edition == 'max' ? '' : 'waterfall'; + $excludedModel = ($this->config->edition == 'max' or $this->config->edition == 'ipd') ? '' : 'waterfall'; $projects = $this->project->getOverviewList('byStatus', $status, 'order_asc', $count, $excludedModel); if(empty($projects)) { @@ -1829,23 +1829,23 @@ class block extends control $hasMeeting = helper::hasFeature('meeting'); $hasViewPriv = array(); - if(common::hasPriv('todo', 'view')) $hasViewPriv['todo'] = true; - if(common::hasPriv('task', 'view')) $hasViewPriv['task'] = true; - if(common::hasPriv('bug', 'view') and $this->config->vision != 'lite') $hasViewPriv['bug'] = true; - if(common::hasPriv('story', 'view') and $this->config->vision != 'lite') $hasViewPriv['story'] = true; - if($this->config->URAndSR and common::hasPriv('story', 'view') and $this->config->vision != 'lite') $hasViewPriv['requirement'] = true; - if(common::hasPriv('risk', 'view') and $this->config->edition == 'max' and $this->config->vision != 'lite' && $hasRisk) $hasViewPriv['risk'] = true; - if(common::hasPriv('issue', 'view') and $this->config->edition == 'max' and $this->config->vision != 'lite' && $hasIssue) $hasViewPriv['issue'] = true; - if(common::hasPriv('meeting', 'view') and $this->config->edition == 'max' and $this->config->vision != 'lite' && $hasMeeting) $hasViewPriv['meeting'] = true; - if(common::hasPriv('feedback', 'view') and in_array($this->config->edition, array('max', 'biz'))) $hasViewPriv['feedback'] = true; - if(common::hasPriv('ticket', 'view') and in_array($this->config->edition, array('max', 'biz'))) $hasViewPriv['ticket'] = true; + if(common::hasPriv('todo', 'view')) $hasViewPriv['todo'] = true; + if(common::hasPriv('task', 'view')) $hasViewPriv['task'] = true; + if(common::hasPriv('bug', 'view') and $this->config->vision != 'lite') $hasViewPriv['bug'] = true; + if(common::hasPriv('story', 'view') and $this->config->vision != 'lite') $hasViewPriv['story'] = true; + if($this->config->URAndSR and common::hasPriv('story', 'view') and $this->config->vision != 'lite') $hasViewPriv['requirement'] = true; + if(common::hasPriv('risk', 'view') and ($this->config->edition == 'max' or $this->config->edition == 'ipd') and $this->config->vision != 'lite' && $hasRisk) $hasViewPriv['risk'] = true; + if(common::hasPriv('issue', 'view') and ($this->config->edition == 'max' or $this->config->edition == 'ipd') and $this->config->vision != 'lite' && $hasIssue) $hasViewPriv['issue'] = true; + if(common::hasPriv('meeting', 'view') and ($this->config->edition == 'max' or $this->config->edition == 'ipd') and $this->config->vision != 'lite' && $hasMeeting) $hasViewPriv['meeting'] = true; + if(common::hasPriv('feedback', 'view') and $this->config->edition != 'open') $hasViewPriv['feedback'] = true; + if(common::hasPriv('ticket', 'view') and $this->config->edition != 'open') $hasViewPriv['ticket'] = true; $params = $this->get->param; $params = json_decode(base64_decode($params)); $count = array(); $objectList = array('todo' => 'todos', 'task' => 'tasks', 'bug' => 'bugs', 'story' => 'stories', 'requirement' => 'requirements'); $objectCountList = array('todo' => 'todoCount', 'task' => 'taskCount', 'bug' => 'bugCount', 'story' => 'storyCount', 'requirement' => 'requirementCount'); - if($this->config->edition == 'max') + if($this->config->edition == 'max' or $this->config->edition == 'ipd') { if($hasRisk) { @@ -1987,7 +1987,7 @@ class block extends control $hasViewPriv['review'] = true; $count['review'] = count($reviews); $this->view->reviews = $reviews; - if($this->config->edition == 'max') + if($this->config->edition == 'max' or $this->config->edition == 'ipd') { $this->app->loadLang('approval'); $this->view->flows = $this->dao->select('module,name')->from(TABLE_WORKFLOW)->where('buildin')->eq(0)->fetchPairs('module', 'name'); diff --git a/module/block/model.php b/module/block/model.php index c47b36fe3d..239f4aa498 100644 --- a/module/block/model.php +++ b/module/block/model.php @@ -844,7 +844,7 @@ class blockModel extends model $params->bugCount['default'] = 20; $params->bugCount['control'] = 'input'; - if($this->config->edition == 'max') + if($this->config->edition == 'max' or $this->config->edition == 'ipd') { if(helper::hasFeature('risk')) { diff --git a/module/block/view/contribute.html.php b/module/block/view/contribute.html.php index 58afbe9e9d..43c923d63e 100644 --- a/module/block/view/contribute.html.php +++ b/module/block/view/contribute.html.php @@ -32,7 +32,7 @@
block->createdCases;?>
createLink('my', 'contribute', 'mode=testcase&type=openedbyme'), (int)$data['createdCases']);?>
- config->edition == 'max'):?> + config->edition == 'max' or $this->config->edition == 'ipd'):?>
block->createdRisks;?>
diff --git a/module/bug/control.php b/module/bug/control.php index 19af541ec4..9ac50e377f 100755 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -389,7 +389,7 @@ class bug extends control $this->dao->update(TABLE_TODO)->set('status')->eq('done')->where('id')->eq($output['todoID'])->exec(); $this->action->create('todo', $output['todoID'], 'finished', '', "BUG:$bugID"); - if($this->config->edition == 'biz' || $this->config->edition == 'max') + if($this->config->edition != 'open') { $todo = $this->dao->select('type, idvalue')->from(TABLE_TODO)->where('id')->eq($output['todoID'])->fetch(); if($todo->type == 'feedback' && $todo->idvalue) $this->loadModel('feedback')->updateStatus('todo', $todo->idvalue, 'done'); diff --git a/module/bug/model.php b/module/bug/model.php index 51cfe23452..f8088bf5ca 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -799,7 +799,7 @@ class bugModel extends model if($bug->execution and $bug->status != $oldBug->status) $this->loadModel('kanban')->updateLane($bug->execution, 'bug'); - if(($this->config->edition == 'biz' || $this->config->edition == 'max') && $oldBug->feedback) $this->loadModel('feedback')->updateStatus('bug', $oldBug->feedback, $bug->status, $oldBug->status); + if($this->config->edition != 'open' && $oldBug->feedback) $this->loadModel('feedback')->updateStatus('bug', $oldBug->feedback, $bug->status, $oldBug->status); $this->file->processFile4Object('bug', $oldBug, $bug); return common::createChanges($oldBug, $bug); @@ -911,9 +911,6 @@ class bugModel extends model unset($bug); } - $isBiz = $this->config->edition == 'biz'; - $isMax = $this->config->edition == 'max'; - /* Update bugs. */ foreach($bugs as $bugID => $bug) { @@ -936,7 +933,7 @@ class bugModel extends model $allChanges[$bugID] = common::createChanges($oldBug, $bug); - if(($isBiz || $isMax) && $oldBug->feedback && !isset($feedbacks[$oldBug->feedback])) + if($this->config->edition != 'open' && $oldBug->feedback && !isset($feedbacks[$oldBug->feedback])) { $feedbacks[$oldBug->feedback] = $oldBug->feedback; $this->loadModel('feedback')->updateStatus('bug', $oldBug->feedback, $bug->status, $oldBug->status); @@ -1241,7 +1238,7 @@ class bugModel extends model /* Link bug to build and release. */ $this->linkBugToBuild($bugID, $bug->resolvedBuild); - if(($this->config->edition == 'biz' || $this->config->edition == 'max') && $oldBug->feedback) $this->loadModel('feedback')->updateStatus('bug', $oldBug->feedback, $bug->status, $oldBug->status); + if($this->config->edition != 'open' && $oldBug->feedback) $this->loadModel('feedback')->updateStatus('bug', $oldBug->feedback, $bug->status, $oldBug->status); return common::createChanges($oldBug, $bug); } @@ -1367,9 +1364,6 @@ class bugModel extends model $modules = array(); while($module = $stmt->fetch()) $modules[$module->id] = $module; - $isBiz = $this->config->edition == 'biz'; - $isMax = $this->config->edition == 'max'; - $changes = array(); foreach($bugIDList as $i => $bugID) { @@ -1416,7 +1410,7 @@ class bugModel extends model if($oldBug->execution) $this->loadModel('kanban')->updateLane($oldBug->execution, 'bug'); $changes[$bugID] = common::createChanges($oldBug, $bug); - if(($isBiz || $isMax) && $oldBug->feedback && !isset($feedbacks[$oldBug->feedback])) + if($this->config->edition != 'open' && $oldBug->feedback && !isset($feedbacks[$oldBug->feedback])) { $feedbacks[$oldBug->feedback] = $oldBug->feedback; $this->loadModel('feedback')->updateStatus('bug', $oldBug->feedback, $bug->status, $oldBug->status); @@ -1531,7 +1525,7 @@ class bugModel extends model if(isset($output['toColID'])) $this->kanban->moveCard($bugID, $output['fromColID'], $output['toColID'], $output['fromLaneID'], $output['toLaneID']); } - if(($this->config->edition == 'biz' || $this->config->edition == 'max') && $oldBug->feedback) $this->loadModel('feedback')->updateStatus('bug', $oldBug->feedback, $bug->status, $oldBug->status); + if($this->config->edition != 'open' && $oldBug->feedback) $this->loadModel('feedback')->updateStatus('bug', $oldBug->feedback, $bug->status, $oldBug->status); return common::createChanges($oldBug, $bug); } diff --git a/module/bug/view/batchactivate.html.php b/module/bug/view/batchactivate.html.php index ad34430918..a379f02438 100644 --- a/module/bug/view/batchactivate.html.php +++ b/module/bug/view/batchactivate.html.php @@ -13,7 +13,7 @@ config->edition == 'biz' || $this->config->edition == 'max') +if($this->config->edition != 'open') { $action = $this->loadModel('workflowaction')->getByModuleAndAction('bug', 'batchactivate'); if($action->js) echo ""; diff --git a/module/chart/view/preview.html.php b/module/chart/view/preview.html.php index 1d68f0867f..244aeb333c 100644 --- a/module/chart/view/preview.html.php +++ b/module/chart/view/preview.html.php @@ -34,7 +34,7 @@ } ?>
- config->edition == 'biz' or $this->config->edition == 'max'):?> + config->edition != 'open'):?>
" . $lang->export, '', "class='btn btn-link btn-export' id='exportchart'");?> chart->toDesign, '', "class='btn btn-primary '");?> diff --git a/module/common/model.php b/module/common/model.php index 47449607fe..d23207c198 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -295,7 +295,7 @@ class commonModel extends model public function setApproval() { $this->config->openedApproval = false; - if($this->config->edition == 'max' && $this->config->vision == 'rnd') $this->config->openedApproval = true; + if(($this->config->edition == 'max' or $this->config->edition == 'ipd') && $this->config->vision == 'rnd') $this->config->openedApproval = true; } /** diff --git a/module/group/control.php b/module/group/control.php index bef0153558..45dd3dee99 100644 --- a/module/group/control.php +++ b/module/group/control.php @@ -237,7 +237,7 @@ class group extends control $changelogs = ',' . join(',', $changelog) . ','; $this->lang->custom->common = $this->lang->group->config; - if($this->config->edition == 'max' and $this->config->vision == 'rnd' and isset($this->lang->baseline)) $this->lang->baseline->common = $this->lang->group->docTemplate; + if(($this->config->edition == 'max' or $this->config->edition == 'ipd') and $this->config->vision == 'rnd' and isset($this->lang->baseline)) $this->lang->baseline->common = $this->lang->group->docTemplate; $modules = $this->group->getPrivManagerPairs('module', $menu); diff --git a/module/install/model.php b/module/install/model.php index d1272efb48..72792faa6a 100644 --- a/module/install/model.php +++ b/module/install/model.php @@ -533,7 +533,7 @@ class installModel extends model } } - if($this->config->edition == 'max') + if($this->config->edition == 'max' or $this->config->edition == 'ipd') { /* Update process by lang. */ foreach($this->lang->install->processList as $id => $name) diff --git a/module/personnel/model.php b/module/personnel/model.php index 6ef91886f3..d3b7c07277 100644 --- a/module/personnel/model.php +++ b/module/personnel/model.php @@ -130,7 +130,7 @@ class personnelModel extends model $executionPairs = $this->getInvolvedExecutions($projects); $taskInvest = $this->getProjectTaskInvest($projects, $accountPairs); $bugAndStoryInvest = $this->getBugAndStoryInvest($accountPairs, $programID); - if($this->config->edition == 'max') + if($this->config->edition == 'max' or $this->config->edition == 'ipd') { $issueInvest = $this->getIssueInvest($accountPairs, $projects); $riskInvest = $this->getRiskInvest($accountPairs, $projects); @@ -153,7 +153,7 @@ class personnelModel extends model $personnelList[$user->role][$account] += $taskInvest[$account]; $personnelList[$user->role][$account] += $bugAndStoryInvest[$account]; - if($this->config->edition == 'max') + if($this->config->edition == 'max' or $this->config->edition == 'ipd') { $personnelList[$user->role][$account] += $issueInvest[$account]; $personnelList[$user->role][$account] += $riskInvest[$account]; diff --git a/module/personnel/view/invest.html.php b/module/personnel/view/invest.html.php index 2c3e7b6f2d..ddab49b313 100644 --- a/module/personnel/view/invest.html.php +++ b/module/personnel/view/invest.html.php @@ -29,7 +29,7 @@ personnel->task;?> personnel->bug;?> URAndSR ? "colspan='2'" : "rowspan='2'";?> class="c-story">personnel->createStories;?> - config->edition == 'max'): ?> + config->edition == 'max' or $this->config->edition == 'ipd'): ?> personnel->issue;?> personnel->risk;?> @@ -47,7 +47,7 @@ personnel->UR;?> personnel->SR;?> - config->edition == 'max'): ?> + config->edition == 'max' or $this->config->edition == 'ipd'): ?> personnel->created;?> personnel->resolved;?> personnel->wait;?> @@ -77,7 +77,7 @@ - config->edition == 'max'): ?> + config->edition == 'max' or $this->config->edition == 'ipd'): ?> diff --git a/module/search/model.php b/module/search/model.php index 82e4b2d8fa..23d3cb28f7 100644 --- a/module/search/model.php +++ b/module/search/model.php @@ -759,12 +759,12 @@ class searchModel extends model $table = $this->config->objectTables[$module]; $fields = ''; - if($module == 'issue') $fields = $this->config->edition == 'max' ? 'id,project,owner,lib' : 'id,project,owner'; + if($module == 'issue') $fields = ($this->config->edition == 'max' or $this->config->edition == 'ipd') ? 'id,project,owner,lib' : 'id,project,owner'; if($module == 'project') $fields = 'id,model'; if($module == 'execution')$fields = 'id,type,project'; - if($module == 'story' or $module == 'requirement') $fields = $this->config->edition == 'max' ? 'id,type,lib' : 'id,type'; - if(($module == 'risk' or $module == 'opportunity') and $this->config->edition == 'max') $fields = 'id,lib'; - if($module == 'doc' and $this->config->edition == 'max') $fields = 'id,assetLib,assetLibType'; + if($module == 'story' or $module == 'requirement') $fields = ($this->config->edition == 'max' or $this->config->edition == 'ipd') ? 'id,type,lib' : 'id,type'; + if(($module == 'risk' or $module == 'opportunity') and ($this->config->edition == 'max' or $this->config->edition == 'ipd')) $fields = 'id,lib'; + if($module == 'doc' and ($this->config->edition == 'max' or $this->config->edition == 'ipd')) $fields = 'id,assetLib,assetLibType'; if(empty($fields)) continue; $objectList[$module] = $this->dao->select($fields)->from($table)->where('id')->in($idList)->fetchAll('id'); @@ -831,7 +831,7 @@ class searchModel extends model $record->extraType = isset($story->type) ? $story->type : ''; } - elseif(($module == 'risk' or $module == 'opportunity') and $this->config->edition == 'max') + elseif(($module == 'risk' or $module == 'opportunity') and ($this->config->edition == 'max' or $this->config->edition == 'ipd')) { $object = $objectList[$module][$record->objectID]; if(!empty($object->lib)) @@ -842,7 +842,7 @@ class searchModel extends model $record->url = helper::createLink($module, $method, "id={$record->objectID}", '', false, 0, true); } - elseif($module == 'doc' and $this->config->edition == 'max') + elseif($module == 'doc' and ($this->config->edition == 'max' or $this->config->edition == 'ipd')) { $doc = $objectList['doc'][$record->objectID]; if(!empty($doc->assetLib)) diff --git a/module/task/model.php b/module/task/model.php index ba3aee97d6..d6382648ba 100755 --- a/module/task/model.php +++ b/module/task/model.php @@ -793,7 +793,7 @@ class taskModel extends model $this->action->logHistory($actionID, $changes); } - if(($this->config->edition == 'biz' || $this->config->edition == 'max') && $oldParentTask->feedback) $this->loadModel('feedback')->updateStatus('task', $oldParentTask->feedback, $newParentTask->status, $oldParentTask->status); + if(($this->config->edition != 'open') && $oldParentTask->feedback) $this->loadModel('feedback')->updateStatus('task', $oldParentTask->feedback, $newParentTask->status, $oldParentTask->status); } } else @@ -1304,7 +1304,7 @@ class taskModel extends model unset($oldTask->parent); unset($task->parent); - if(($this->config->edition == 'biz' || $this->config->edition == 'max') && $oldTask->feedback) $this->loadModel('feedback')->updateStatus('task', $oldTask->feedback, $task->status, $oldTask->status); + if($this->config->edition != 'open' && $oldTask->feedback) $this->loadModel('feedback')->updateStatus('task', $oldTask->feedback, $task->status, $oldTask->status); if(isset($oldTask->team)) { $users = $this->loadModel('user')->getPairs('noletter|noempty'); @@ -1532,8 +1532,6 @@ class taskModel extends model } } - $isBiz = $this->config->edition == 'biz'; - $isMax = $this->config->edition == 'max'; foreach($tasks as $taskID => $task) { if(strpos(',doing,pause,', $task->status) && empty($teams) && $task->parent >= 0 && empty($task->left)) @@ -1593,7 +1591,7 @@ class taskModel extends model if($task->status == 'done') $this->loadModel('score')->create('task', 'finish', $taskID); if($task->status == 'closed') $this->loadModel('score')->create('task', 'close', $taskID); if($task->status != $oldTask->status) $this->loadModel('kanban')->updateLane($oldTask->execution, 'task', $oldTask->id); - if(($isBiz || $isMax) && $oldTask->feedback && !isset($feedbacks[$oldTask->feedback])) + if($this->config->edition != 'open' && $oldTask->feedback && !isset($feedbacks[$oldTask->feedback])) { $feedbacks[$oldTask->feedback] = $oldTask->feedback; $this->loadModel('feedback')->updateStatus('task', $oldTask->feedback, $task->status, $oldTask->status); @@ -1839,7 +1837,7 @@ class taskModel extends model $this->loadModel('kanban'); if(!isset($output['toColID']) or $task->status == 'done') $this->kanban->updateLane($oldTask->execution, 'task', $taskID); if(isset($output['toColID']) and $task->status == 'doing') $this->kanban->moveCard($taskID, $output['fromColID'], $output['toColID'], $output['fromLaneID'], $output['toLaneID']); - if(($this->config->edition == 'biz' || $this->config->edition == 'max') && $oldTask->feedback) $this->loadModel('feedback')->updateStatus('task', $oldTask->feedback, $task->status, $oldTask->status); + if($this->config->edition != 'open' && $oldTask->feedback) $this->loadModel('feedback')->updateStatus('task', $oldTask->feedback, $task->status, $oldTask->status); if(!dao::isError()) return common::createChanges($oldTask, $task); } @@ -2139,7 +2137,7 @@ class taskModel extends model if(isset($output['toColID'])) $this->kanban->moveCard($taskID, $output['fromColID'], $output['toColID'], $output['fromLaneID'], $output['toLaneID']); } - if(($this->config->edition == 'biz' || $this->config->edition == 'max') && $oldTask->feedback) $this->loadModel('feedback')->updateStatus('task', $oldTask->feedback, $task->status, $oldTask->status); + if($this->config->edition != 'open' && $oldTask->feedback) $this->loadModel('feedback')->updateStatus('task', $oldTask->feedback, $task->status, $oldTask->status); return common::createChanges($oldTask, $task); } @@ -2225,7 +2223,7 @@ class taskModel extends model if(!isset($output['toColID'])) $this->kanban->updateLane($oldTask->execution, 'task', $taskID); if(isset($output['toColID'])) $this->kanban->moveCard($taskID, $output['fromColID'], $output['toColID'], $output['fromLaneID'], $output['toLaneID']); - if(($this->config->edition == 'biz' || $this->config->edition == 'max') && $oldTask->feedback) $this->loadModel('feedback')->updateStatus('task', $oldTask->feedback, $task->status, $oldTask->status); + if($this->config->edition != 'open' && $oldTask->feedback) $this->loadModel('feedback')->updateStatus('task', $oldTask->feedback, $task->status, $oldTask->status); return common::createChanges($oldTask, $task); } @@ -2519,7 +2517,7 @@ class taskModel extends model if(is_string($type)) $type = strtolower($type); $orderBy = str_replace('pri_', 'priOrder_', $orderBy); $fields = "DISTINCT t1.*, t2.id AS storyID, t2.title AS storyTitle, t2.product, t2.branch, t2.version AS latestStoryVersion, t2.status AS storyStatus, t3.realname AS assignedToRealName, IF(t1.`pri` = 0, {$this->config->maxPriValue}, t1.`pri`) as priOrder"; - $this->config->edition == 'max' && $fields .= ', t6.name as designName, t6.version as latestDesignVersion'; + ($this->config->edition == 'max' or $this->config->edition == 'ipd') && $fields .= ', t6.name as designName, t6.version as latestDesignVersion'; $actionIDList = array(); if($type == 'assignedbyme') $actionIDList = $this->dao->select('objectID')->from(TABLE_ACTION)->where('objectType')->eq('task')->andWhere('action')->eq('assigned')->andWhere('actor')->eq($this->app->user->account)->fetchPairs('objectID', 'objectID'); @@ -2530,7 +2528,7 @@ class taskModel extends model ->leftJoin(TABLE_USER)->alias('t3')->on('t1.assignedTo = t3.account') ->leftJoin(TABLE_TASKTEAM)->alias('t4')->on('t4.task = t1.id') ->leftJoin(TABLE_MODULE)->alias('t5')->on('t1.module = t5.id') - ->beginIF($this->config->edition == 'max')->leftJoin(TABLE_DESIGN)->alias('t6')->on('t1.design= t6.id')->fi() + ->beginIF($this->config->edition == 'max' or $this->config->edition == 'ipd')->leftJoin(TABLE_DESIGN)->alias('t6')->on('t1.design= t6.id')->fi() ->where('t1.execution')->eq((int)$executionID) ->beginIF($type == 'myinvolved') ->andWhere("((t4.`account` = '{$this->app->user->account}') OR t1.`assignedTo` = '{$this->app->user->account}' OR t1.`finishedby` = '{$this->app->user->account}')") From c4c20cae54198a59d7d6f7fd172976f052a55c5f Mon Sep 17 00:00:00 2001 From: Yagami Date: Thu, 4 May 2023 18:04:34 +0800 Subject: [PATCH 3/3] * Change judgment condition. --- api/v1/entries/user.php | 6 +++--- module/custom/model.php | 16 ++++++++-------- module/doc/model.php | 2 +- module/doc/view/content.html.php | 2 +- module/execution/model.php | 4 ++-- module/my/control.php | 2 +- module/programplan/model.php | 4 ++-- module/project/control.php | 2 +- module/project/model.php | 2 +- module/story/model.php | 6 +++--- module/testtask/control.php | 2 +- module/todo/control.php | 10 +++++----- module/upgrade/model.php | 4 ++-- module/user/model.php | 2 +- module/user/view/execution.html.php | 2 +- module/user/view/featurebar.html.php | 2 +- 16 files changed, 34 insertions(+), 34 deletions(-) diff --git a/api/v1/entries/user.php b/api/v1/entries/user.php index 123cb9f880..b3d9f377e8 100644 --- a/api/v1/entries/user.php +++ b/api/v1/entries/user.php @@ -298,7 +298,7 @@ class userEntry extends entry $info->issue = array('total' => 0, 'issues' => array()); if(!common::hasPriv('my', 'work')) break; - if($this->config->edition == 'max') + if($this->config->edition== 'max' or $this->config->edition == 'ipd') { global $app; $app->rawMethod = 'work'; @@ -318,7 +318,7 @@ class userEntry extends entry $info->risk = array('total' => 0, 'risks' => array()); if(!common::hasPriv('my', 'work')) break; - if($this->config->edition == 'max') + if($this->config->edition== 'max' or $this->config->edition == 'ipd') { global $app; $app->rawMethod = 'work'; @@ -338,7 +338,7 @@ class userEntry extends entry $info->meeting = array('total' => 0, 'meetings' => array()); if(!common::hasPriv('my', 'work')) break; - if($this->config->edition == 'max') + if($this->config->edition== 'max' or $this->config->edition == 'ipd') { global $app; $app->rawMethod = 'work'; diff --git a/module/custom/model.php b/module/custom/model.php index 692f6933a4..cdfbdd7136 100644 --- a/module/custom/model.php +++ b/module/custom/model.php @@ -889,7 +889,7 @@ class customModel extends model $enabledScrumFeatures = array(); $disabledScrumFeatures = array(); - if($this->config->edition == 'max') + if($this->config->edition== 'max' or $this->config->edition == 'ipd') { foreach($this->config->custom->scrumFeatures as $scrumFeature) { @@ -1048,7 +1048,7 @@ class customModel extends model */ public function hasAssetlibData() { - if($this->config->edition == 'max') return $this->dao->select('*')->from(TABLE_ASSETLIB)->where('deleted')->eq(0)->count(); + if($this->config->edition== 'max' or $this->config->edition == 'ipd') return $this->dao->select('*')->from(TABLE_ASSETLIB)->where('deleted')->eq(0)->count(); return false; } @@ -1060,7 +1060,7 @@ class customModel extends model */ public function hasScrumIssueData() { - if($this->config->edition == 'max') + if($this->config->edition== 'max' or $this->config->edition == 'ipd') { return $this->dao->select('t1.*')->from(TABLE_ISSUE)->alias('t1') ->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id') @@ -1080,7 +1080,7 @@ class customModel extends model */ public function hasScrumRiskData() { - if($this->config->edition == 'max') + if($this->config->edition== 'max' or $this->config->edition == 'ipd') { return $this->dao->select('t1.*')->from(TABLE_RISK)->alias('t1') ->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id') @@ -1100,7 +1100,7 @@ class customModel extends model */ public function hasScrumOpportunityData() { - if($this->config->edition == 'max') + if($this->config->edition== 'max' or $this->config->edition == 'ipd') { return $this->dao->select('id')->from(TABLE_OPPORTUNITY)->where('execution')->ne('0')->andWhere('deleted')->eq('0')->count(); } @@ -1115,7 +1115,7 @@ class customModel extends model */ public function hasScrumMeetingData() { - if($this->config->edition == 'max') + if($this->config->edition== 'max' or $this->config->edition == 'ipd') { return $this->dao->select('id')->from(TABLE_PROJECT)->alias('t1') ->leftJoin(TABLE_MEETING)->alias('t2')->on('t1.id = t2.project') @@ -1135,7 +1135,7 @@ class customModel extends model */ public function hasScrumAuditplanData() { - if($this->config->edition == 'max') + if($this->config->edition== 'max' or $this->config->edition == 'ipd') { return $this->dao->select('id')->from(TABLE_PROJECT)->alias('t1') ->leftJoin(TABLE_AUDITPLAN)->alias('t2')->on('t1.id = t2.project') @@ -1155,7 +1155,7 @@ class customModel extends model */ public function hasScrumProcessData() { - if($this->config->edition == 'max') + if($this->config->edition== 'max' or $this->config->edition == 'ipd') { return $this->dao->select('id')->from(TABLE_PROGRAMACTIVITY)->where('execution')->ne('0')->andWhere('deleted')->eq('0')->count(); } diff --git a/module/doc/model.php b/module/doc/model.php index 4818a04613..11241fe2a9 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -1912,7 +1912,7 @@ class docModel extends model } elseif($type == 'project') { - if($this->config->edition == 'max') + if($this->config->edition== 'max' or $this->config->edition == 'ipd') { $issueIdList = $this->dao->select('id')->from(TABLE_ISSUE)->where('project')->eq($objectID)->andWhere('deleted')->eq('0')->andWhere('project')->in($this->app->user->view->projects)->get(); $meetingIdList = $this->dao->select('id')->from(TABLE_MEETING)->where('project')->eq($objectID)->andWhere('deleted')->eq('0')->andWhere('project')->in($this->app->user->view->projects)->get(); diff --git a/module/doc/view/content.html.php b/module/doc/view/content.html.php index 29f3c942db..bdc66c4f4d 100644 --- a/module/doc/view/content.html.php +++ b/module/doc/view/content.html.php @@ -216,7 +216,7 @@
-config->edition == 'max'):?> +config->edition== 'max' or $this->config->edition == 'ipd'):?>