Merge remote-tracking branch 'remotes/origin/release-20.0'
# Conflicts: # db/update20.0.beta2.sql # lib/zin/func.php # lib/zin/wg/fileselector/v1.php # lib/zin/wg/upload/v1.php # module/action/model.php # module/backup/js/index.ui.js # module/block/lang/vi.php # module/block/ui/recentprojectblock.html.php # module/block/zen.php # module/common/lang/vi.php # module/custom/lang/vi.php # module/execution/js/kanban.ui.js # module/execution/ui/story.html.php # module/kanban/js/view.ui.js # module/metric/test/calc/project/hour/ac_of_weekly_all_in_waterfall.php # module/metric/test/calc/project/rate/cv_in_waterfall.php # module/metric/test/calc/project/rate/cv_weekly_in_waterfall.php # module/mr/control.php # module/mr/ui/browsebyexecution.html.php # module/product/zen.php # module/programplan/zen.php # module/project/model.php # module/repo/lang/de.php # module/repo/lang/en.php # module/repo/lang/fr.php # module/repo/lang/zh-cn.php # module/space/ui/createapplication.html.php # module/testcase/ui/view.html.php # module/upgrade/model.php # www/js/zui3/zen-editor/p-0aaccc7e.js # www/js/zui3/zen-editor/p-276dd30f.js # www/js/zui3/zen-editor/p-2b13cc9a.js # www/js/zui3/zen-editor/p-38d18c5d.js # www/js/zui3/zen-editor/p-3f6cad83.js # www/js/zui3/zen-editor/p-51e3a048.js # www/js/zui3/zen-editor/p-617d463f.js # www/js/zui3/zen-editor/p-62c0132e.js # www/js/zui3/zen-editor/p-6d22490c.js # www/js/zui3/zen-editor/p-a563f50b.js # www/js/zui3/zen-editor/p-bf31230c.js # www/js/zui3/zen-editor/p-c6c95773.js # www/js/zui3/zen-editor/p-d83dd3f0.js # www/js/zui3/zen-editor/p-d8bedd14.js # www/js/zui3/zen-editor/p-eaaa4129.js # www/js/zui3/zen-editor/zen-editor.esm.js # www/js/zui3/zui.zentao.css # www/js/zui3/zui.zentao.js
This commit is contained in:
@@ -774,6 +774,7 @@ class projectModel extends model
|
||||
->andWhere('type')->in('sprint,stage,kanban')
|
||||
->beginIF(!in_array($status, array('all', 'undone')))->andWhere('status')->eq($status)->fi()
|
||||
->beginIF($status == 'undone')->andWhere('status')->notIN('done,closed')->fi()
|
||||
->beginIF($this->config->vision)->andWhere("CONCAT(',', vision, ',')")->like("%,{$this->config->vision},%")->fi()
|
||||
->fetchPairs();
|
||||
}
|
||||
|
||||
@@ -1343,6 +1344,10 @@ class projectModel extends model
|
||||
$this->updateUserView($projectID, $project->acl); // 更新用户视图。
|
||||
$this->updateShadowProduct($project, $oldProject); // 更新影子产品关联信息。
|
||||
$this->updateWhitelist($project, $oldProject); // 更新关联的白名单列表。
|
||||
|
||||
$this->updatePlans($projectID, (array)$this->post->plans); // 更新关联的计划列表。
|
||||
if($oldProject->hasProduct > 0) $this->updateProducts($projectID, (array)$this->post->products, $postProductData); // 更新关联的产品列表。
|
||||
$this->updateTeamMembers($project, $oldProject, (array)$this->post->teamMembers); // 更新关联的用户信息。
|
||||
if($postProductData) $this->updateProductStage($projectID, (string)$oldProject->stageBy, $postProductData); // 更新关联的所有产品的阶段。
|
||||
|
||||
$this->file->updateObjectID((string)$this->post->uid, $projectID, 'project'); // 通过uid更新文件id。
|
||||
@@ -1427,8 +1432,6 @@ class projectModel extends model
|
||||
|
||||
$this->projectTao->doStart($projectID, $project);
|
||||
|
||||
$this->recordFirstEnd($projectID);
|
||||
|
||||
/* When it has multiple errors, only the first one is prompted */
|
||||
if(dao::isError())
|
||||
{
|
||||
@@ -1436,6 +1439,8 @@ class projectModel extends model
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->recordFirstEnd($projectID);
|
||||
|
||||
if(!$oldProject->multiple) $this->projectTao->changeExecutionStatus($projectID, 'start');
|
||||
return common::createChanges($oldProject, $project);
|
||||
}
|
||||
@@ -1736,7 +1741,8 @@ class projectModel extends model
|
||||
*/
|
||||
public function getBudgetWithUnit(float|string $budget): float|string
|
||||
{
|
||||
$budget = (float)$budget;
|
||||
$budget = (float)$budget;
|
||||
$rawBudget = $budget;
|
||||
if($budget < $this->config->project->budget->tenThousand)
|
||||
{
|
||||
$budget = round($budget, $this->config->project->budget->precision);
|
||||
@@ -1753,7 +1759,7 @@ class projectModel extends model
|
||||
$unit = $this->lang->project->hundredMillion;
|
||||
}
|
||||
|
||||
return in_array($this->app->getClientLang(), array('zh-cn','zh-tw')) ? $budget . $unit : round($budget, $this->config->project->budget->precision);
|
||||
return !commonModel::checkNotCN() ? $budget . $unit : round($rawBudget, $this->config->project->budget->precision);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1808,8 +1814,11 @@ class projectModel extends model
|
||||
/* Create actions. */
|
||||
$this->loadModel('action');
|
||||
if(!empty($needUpdate)) $this->action->create('project', $projectID, 'managed', '', implode(',', $products));
|
||||
|
||||
/* 如果有取消关联的产品,且项目有迭代且是非瀑布项目,记录关联产品执行到action表。*/
|
||||
/* If there are unlinkedProducts and it is multiple project and it isn't waterfall project, record to table action. */
|
||||
$unlinkedProducts = array_diff($oldProductIdList, $products);
|
||||
if(!empty($unlinkedProducts))
|
||||
if(!empty($unlinkedProducts) && !empty($project) && $project->multiple && $project->model != 'waterfall' && $project->model != 'waterfallplus')
|
||||
{
|
||||
$products = $this->dao->select('name')->from(TABLE_PRODUCT)
|
||||
->where('id')->in($unlinkedProducts)
|
||||
@@ -2531,7 +2540,7 @@ class projectModel extends model
|
||||
|
||||
if($this->app->viewType == 'mhtml' && $projectID)
|
||||
{
|
||||
$output = $this->lang->project->common . $this->lang->colon;
|
||||
$output = $this->lang->project->common . $this->lang->hyphen;
|
||||
$output .= "<a id='currentItem' href=\"javascript:showSearchMenu('project', '$projectID', '$currentModule', '$currentMethod', '')\">{$currentProjectName} <span class='icon-caret-down'></span></a><div id='currentItemDropMenu' class='hidden affix enter-from-bottom layer'></div>";
|
||||
return $output;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user