Merge branch release/21.7.7 of zentao/zentaopms (#12225)

This commit is contained in:
刘刚
2025-11-07 11:22:29 +08:00
committed by Gitfox
8 changed files with 26 additions and 20 deletions
+6 -1
View File
@@ -4,4 +4,9 @@ ALTER TABLE `zt_issue` CHANGE `pri` `pri` tinyint unsigned NOT NULL DEFAULT 3;
ALTER TABLE `zt_risk` CHANGE `pri` `pri` tinyint unsigned NOT NULL DEFAULT 3;
ALTER TABLE `zt_opportunity` CHANGE `pri` `pri` tinyint unsigned NOT NULL DEFAULT 3;
ALTER TABLE `zt_design` CHANGE `project` `project` int unsigned NOT NULL DEFAULT 0;
ALTER TABLE `zt_design` CHANGE `product` `product` int unsigned NOT NULL DEFAULT 0;
ALTER TABLE `zt_design` CHANGE `product` `product` int unsigned NOT NULL DEFAULT 0;
ALTER TABLE `zt_doc` ADD `reportModule` varchar(20) NOT NULL DEFAULT '0' AFTER `module`;
UPDATE `zt_doc` SET `reportModule` = `module` WHERE `templateType` = 'projectReport';
UPDATE `zt_doc` SET `module` = 0 WHERE `templateType` = 'projectReport' OR `module` = '';
ALTER TABLE `zt_doc` MODIFY `module` int unsigned NOT NULL DEFAULT 0;
+2 -1
View File
@@ -814,7 +814,8 @@ CREATE TABLE IF NOT EXISTS `zt_doc` (
`chapterType` varchar(30) NOT NULL DEFAULT '',
`cycle` char(10) NOT NULL DEFAULT '',
`cycleConfig` text NULL,
`module` varchar(30) NOT NULL DEFAULT '',
`module` int unsigned NOT NULL DEFAULT 0,
`reportModule` varchar(20) NOT NULL DEFAULT '',
`title` varchar(255) NOT NULL DEFAULT '',
`keywords` varchar(255) NOT NULL DEFAULT '',
`type` varchar(30) NOT NULL DEFAULT '',
+1 -1
View File
@@ -94,7 +94,7 @@ class moduleMenu extends wg
$items = $this->buildMenuTree($child->id);
if($items) $item['items'] = $items;
if($child->id == $activeKey || $child->id == 'product-' . $activeKey)
if($child->id === $activeKey || $child->id === 'product-' . $activeKey)
{
$itemKey = $this->prop('checkbox') ? 'checked' : 'selected';
$item[$itemKey] = true;
+4 -4
View File
@@ -39,7 +39,7 @@ $config->doc->form->create['version'] = array('type' => 'int', 'requir
$config->doc->form->create['product'] = array('type' => 'int', 'required' => false, 'default' => 0);
$config->doc->form->create['project'] = array('type' => 'int', 'required' => false, 'default' => 0);
$config->doc->form->create['execution'] = array('type' => 'int', 'required' => false, 'default' => 0);
$config->doc->form->create['module'] = array('type' => 'string', 'required' => false, 'default' => '');
$config->doc->form->create['module'] = array('type' => 'int', 'required' => false, 'default' => 0);
$config->doc->form->create['lib'] = array('type' => 'int', 'required' => false, 'default' => 0);
$config->doc->form->create['status'] = array('type' => 'string', 'required' => false, 'default' => 'normal');
$config->doc->form->create['parent'] = array('type' => 'int', 'required' => false, 'default' => 0);
@@ -70,7 +70,7 @@ $config->doc->form->edit['title'] = array('type' => 'string', 'required'
$config->doc->form->edit['product'] = array('type' => 'int', 'required' => false, 'default' => 0);
$config->doc->form->edit['project'] = array('type' => 'int', 'required' => false, 'default' => 0);
$config->doc->form->edit['execution'] = array('type' => 'int', 'required' => false, 'default' => 0);
$config->doc->form->edit['module'] = array('type' => 'string', 'required' => false, 'default' => '');
$config->doc->form->edit['module'] = array('type' => 'int', 'required' => false, 'default' => 0);
$config->doc->form->edit['lib'] = array('type' => 'int', 'required' => false, 'default' => 0, 'skipRequired' => true);
$config->doc->form->edit['status'] = array('type' => 'string', 'required' => false, 'default' => 'normal');
$config->doc->form->edit['parent'] = array('type' => 'int', 'required' => false, 'default' => 0);
@@ -100,7 +100,7 @@ $config->doc->form->movelib['groups'] = array('type' => 'array', 'required' =
$config->doc->form->movelib['users'] = array('type' => 'array', 'required' => false, 'default' => '', 'filter' => 'join');
$config->doc->form->movedoc['lib'] = array('type' => 'int', 'required' => true, 'default' => '');
$config->doc->form->movedoc['module'] = array('type' => 'int', 'required' => false, 'default' => '');
$config->doc->form->movedoc['module'] = array('type' => 'int', 'required' => false, 'default' => 0);
$config->doc->form->movedoc['acl'] = array('type' => 'string', 'required' => true, 'default' => '');
$config->doc->form->movedoc['groups'] = array('type' => 'array', 'required' => false, 'default' => '', 'filter' => 'join');
$config->doc->form->movedoc['users'] = array('type' => 'array', 'required' => false, 'default' => '', 'filter' => 'join');
@@ -109,7 +109,7 @@ $config->doc->form->movedoc['readUsers'] = array('type' => 'array', 'require
$config->doc->form->movedoc['parent'] = array('type' => 'int', 'required' => false, 'default' => 0);
$config->doc->form->movetemplate['lib'] = array('type' => 'int', 'required' => true, 'default' => '');
$config->doc->form->movetemplate['module'] = array('type' => 'int', 'required' => true, 'default' => '');
$config->doc->form->movetemplate['module'] = array('type' => 'int', 'required' => true, 'default' => 0);
$config->doc->form->movetemplate['parent'] = array('type' => 'int', 'required' => false, 'default' => 0);
$config->doc->form->movetemplate['acl'] = array('type' => 'string', 'required' => true, 'default' => '');
+1 -1
View File
@@ -239,7 +239,7 @@ if(!$isFromDoc)
moduleMenu
(
set::modules($moduleTree),
set::activeKey($activeKey),
set::activeKey($status == 'byProduct' ? "product-{$activeKey}" : $activeKey),
set::settingLink(createLink('tree', 'browsetask', "rootID=$execution->id&productID=0")),
set::settingApp($execution->multiple ? 'execution' : 'project'),
set::closeLink(createLink('execution', 'task', "executionID={$executionID}")),
+1 -1
View File
@@ -1186,7 +1186,7 @@ class projectTao extends projectModel
$report = new stdclass();
$report->title = $this->lang->project->milestoneReport;
$report->project = $projectID;
$report->module = 'milestone';
$report->reportModule = 'milestone';
$report->templateType = 'projectReport';
$report->addedBy = 'system';
$report->addedDate = helper::now();
@@ -10,7 +10,7 @@ cid=1
- 属性title @里程碑报告
- 属性project @1
- 属性templateType @projectReport
- 属性module @milestone
- 属性reportModule @milestone
- 属性addedBy @system
*/
@@ -27,4 +27,4 @@ $projectModel = $tester->loadModel('project');
$projectModel->createMilestoneReport(1);
$report = $tester->dao->select('*')->from(TABLE_DOC)->fetch();
r($report) && p('title,project,templateType,module,addedBy') && e('里程碑报告,1,projectReport,milestone,system'); // 测试创建里程碑报告
r($report) && p('title,project,templateType,reportModule,addedBy') && e('里程碑报告,1,projectReport,milestone,system'); // 测试创建里程碑报告
+9 -9
View File
@@ -11263,18 +11263,18 @@ class upgradeModel extends model
$weekNumber = ceil(helper::diffDate($data['weekStart'], $data['projectBegin']) / 7) + 1;
$weekEnd = date('Y-m-d', strtotime('+6 day', strtotime($data['weekStart'])));
$report->project = $data['project'];
$report->title = sprintf($this->lang->upgrade->weeklyReportTitle, $weekNumber, $data['weekStart'], $weekEnd);
$report->module = 'week';
$report->addedDate = $data['weekStart'] . ' 00:00:00';
$report->weeklyDate = str_replace('-', '', $data['weekStart']);
$report->project = $data['project'];
$report->title = sprintf($this->lang->upgrade->weeklyReportTitle, $weekNumber, $data['weekStart'], $weekEnd);
$report->reportModule = 'week';
$report->addedDate = $data['weekStart'] . ' 00:00:00';
$report->weeklyDate = str_replace('-', '', $data['weekStart']);
}
else
{
$report->title = $this->lang->upgrade->milestoneTitle;
$report->module = 'milestone';
$report->project = $data['id'];
$report->addedDate = helper::now();
$report->title = $this->lang->upgrade->milestoneTitle;
$report->reportModule = 'milestone';
$report->project = $data['id'];
$report->addedDate = helper::now();
}
$report->templateType = 'projectReport';