Merge branch 'sprint/master_lanzongjun_fixbug'

This commit is contained in:
wangyidong
2022-05-12 17:09:47 +08:00
19 changed files with 101 additions and 75 deletions
+37 -2
View File
@@ -96,7 +96,7 @@ UPDATE `zt_workflowfield` set `control` = 'date' WHERE `module` = 'testtask'
UPDATE `zt_workflowfield` set `control` = 'richtext' WHERE `module` = 'testtask' and `field` = 'desc';
UPDATE `zt_workflowfield` set `control` = 'datetime' WHERE `module` IN ('testsuite','caselib') and `field` IN ('addedDate','lastEditedDate');
UPDATE `zt_workflowfield` set `control` = 'richtext' WHERE `module` = 'testsuite' and `field` = 'desc';
UPDATE `zt_workflowfield` set `control` = 'richtext' WHERE `module` IN ('testsuite','caselib') and `field` = 'desc';
UPDATE `zt_workflowfield` set `control` = 'datetime' WHERE `module` = 'feedback' and `field` IN ('openedDate','reviewedDate','processedDate','closedDate','editedDate','assignedDate');
@@ -132,7 +132,7 @@ UPDATE `zt_workflowaction` SET `position` = 'browse' WHERE `module` = 'story' an
UPDATE `zt_workflowaction` SET `position` = 'browse' WHERE `module` = 'story' and `action` = 'import' and `vision` = 'rnd';
UPDATE `zt_workflowaction` SET `position` = 'browse' WHERE `module` = 'story' and `action` = 'view' and `vision` = 'rnd';
UPDATE `zt_workflowaction` SET `show` = 'direct' WHERE `module` = 'story' and `vision` = 'rnd' and action NOT IN ('exporttemplate', 'import');
UPDATE `zt_workflowaction` SET `show` = 'direct' WHERE `module` = 'program' and `vision` = 'rnd'
UPDATE `zt_workflowaction` SET `show` = 'direct' WHERE `module` = 'program' and `vision` = 'rnd';
DELETE FROM `zt_workflowfield` WHERE `module`='execution' AND `field`='stage';
DELETE FROM `zt_workflowfield` WHERE `module`='program' AND `field`='stage';
@@ -418,3 +418,38 @@ UPDATE `zt_workflowaction` SET `type`='single', `position`='browseandview', `sho
UPDATE `zt_workflowaction` SET `type`='single', `position`='browse', `show`='direct', `open`='normal', `layout`='side' WHERE `module`='task' AND `action`='view';
UPDATE `zt_workflowaction` SET `type`='batch' WHERE `module`IN ('feedback','caselib','testsuite','testtask','testcase') AND `action` IN ('admin','browse','batchedit','batchcreate','import','showimport');
UPDATE `zt_workflowaction` SET `position`='browse' WHERE `module`IN ('feedback','caselib','testsuite','testtask','testcase') AND `action` IN ('batchedit','batchcreate','import','showimport');
UPDATE `zt_workflowfield` SET `control` = 'radio' WHERE `module` = 'program' and `field` = 'deleted';
UPDATE `zt_workflowfield` SET `type` = 'char', `length` => '30', `control` = 'radio' WHERE `module` = 'program' and `field` = 'type';
UPDATE `zt_workflowfield` SET `control` = 'date' WHERE `module` = 'program' and `field` = 'begin';
UPDATE `zt_workflowfield` SET `control` = 'date' WHERE `module` = 'program' and `field` = 'end';
UPDATE `zt_workflowfield` SET `control` = 'integer' WHERE `module` = 'program' and `field` = 'days';
UPDATE `zt_workflowfield` SET `control` = 'select', `options` = '[1,2,3,4]' WHERE `module` = 'program' and `field` = 'pri';
UPDATE `zt_workflowfield` SET `control` = 'richtext' WHERE `module` = 'program' and `field` = 'desc';
UPDATE `zt_workflowfield` SET `control` = 'datetime' WHERE `module` = 'program' and `field` = 'openedDate';
UPDATE `zt_workflowfield` SET `control` = 'datetime' WHERE `module` = 'program' and `field` = 'closedDate';
UPDATE `zt_workflowfield` SET `control` = 'datetime' WHERE `module` = 'program' and `field` = 'canceledDate';
UPDATE `zt_workflowfield` SET `type` => 'char', `length` => '30' WHERE `module` = 'program' and `field` = 'acl';
UPDATE `zt_workflowfield` SET `control` = 'multi-select', `options` = 'user' WHERE `module` = 'program' and `field` = 'whitelist';
REPLACE INTO `zt_workflowfield` (`module`, `field`, `type`, `length`, `name`, `control`, `expression`, `options`, `default`, `rules`, `placeholder`, `order`, `searchOrder`, `exportOrder`, `canExport`, `canSearch`, `isValue`, `readonly`, `buildin`, `desc`, `createdBy`, `createdDate`, `editedBy`, `editedDate`) VALUES
('program', 'lifetime', 'char', '30', '项目周期', 'input', '', '', '', '', '', 29, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'),
('program', 'output', 'text', '', '输出', 'textarea', '', '', '', '', '', 30, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'),
('program', 'auth', 'char', '30', '权限控制', 'input', '', '', '', '', '', 31, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'),
('program', 'path', 'varchar', '255', '路径', 'input', '', '', '', '', '', 32, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'),
('program', 'grade', 'tinyint', '3', '层级', 'integer', '', '', '', '', '', 33, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'),
('program', 'realBegan', 'date', '', '实际开始日期', 'date', '', '', '', '', '', 34, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'),
('program', 'realEnd', 'date', '', '实际完成日期', 'date', '', '', '', '', '', 35, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'),
('program', 'version', 'smallint', '6', '版本', 'integer', '', '', '', '', '', 36, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'),
('program', 'parentVersion', 'smallint', '6', '父版本', 'integer', '', '', '', '', '', 37, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'),
('program', 'planDuration', 'smallint', '6', '计划周期天数', 'integer', '', '', '', '', '', 38, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'),
('program', 'realDuration', 'smallint', '6', '实际周期天数', 'integer', '', '', '', '', '', 39, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'),
('program', 'openedVersion', 'smallint', '6', '创建版本', 'integer', '', '', '', '', '', 40, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'),
('program', 'lastEditedBy', 'varchar', '30', '最后编辑人', 'select', '', 'user', '', '', '', 41, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'),
('program', 'lastEditedDate', 'datetime', '', '最后编辑日期', 'datetime', '', '', '', '', '', 42, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'),
('program', 'suspendedDate', 'date', '', 'suspendedDate', 'date', '', '', '', '', '', 43, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'),
('program', 'vision', 'varchar', '10', 'vision', 'input', '', '', 'rnd', '', '', 44, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'),
('program', 'displayCards', 'enum', '', 'displayCards', 'radio', '', '[\"\\u672a\\u5220\\u9664\",\"\\u5df2\\u5220\\u9664\"]', '0', '', '', 45, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00'),
('program', 'fluidBoard', 'enum', '', 'fluidBoard', 'radio', '', '[\"\\u672a\\u5220\\u9664\",\"\\u5df2\\u5220\\u9664\"]', '0', '', '', 46, 0, 0, '0', '0', '0', '1', 1, '', '', '2022-04-19 10:14:25', '', '0000-00-00 00:00:00');
UPDATE `zt_workflowaction` SET `position`='browse' WHERE `action` IN ('view','exporttemplate');
+7 -6
View File
@@ -373,7 +373,7 @@ class control extends baseControl
* @access public
* @return void
*/
public function printExtendFields($object, $type, $extras = '', $print = false)
public function printExtendFields($object, $type, $extras = '', $print = true)
{
if(!isset($this->config->bizVersion)) return false;
@@ -382,12 +382,13 @@ class control extends baseControl
$fields = $this->loadModel('flow')->printFields($moduleName, $methodName, $object, $type, $extras);
if(!$print) return $fields;
$jsRoot = $this->config->webRoot . "js/";
$picker = file_get_contents($this->app->getBasePath() . 'app/sys/common/view/picker.html.php');
$picker = substr($picker, strpos($picker, '<style>'));
$picker = '';
//$jsRoot = $this->config->webRoot . "js/";
//$picker = file_get_contents($this->app->getBasePath() . 'app/sys/common/view/picker.html.php');
//$picker = substr($picker, strpos($picker, '<style>'));
js::import($jsRoot . 'picker/min.js');
css::import($jsRoot . 'picker/min.css');
//js::import($jsRoot . 'picker/min.js');
//css::import($jsRoot . 'picker/min.css');
echo $picker . $fields;
}
+2 -1
View File
@@ -1,6 +1,7 @@
<?php
$config->action->objectNameFields['product'] = 'name';
$config->action->objectNameFields['story'] = 'title';
$config->action->objectNameFields['requirement'] = 'title';
$config->action->objectNameFields['productplan'] = 'title';
$config->action->objectNameFields['release'] = 'name';
$config->action->objectNameFields['program'] = 'name';
@@ -59,7 +60,7 @@ $config->action->majorList['execution'] = array('opened', 'edited');
$config->action->needGetProjectType = 'build,task,bug,case,testcase,caselib,testtask,testsuite,testreport,doc,issue,release,risk,design,opportunity,trainplan,gapanalysis,researchplan,researchreport,';
$config->action->needGetRelateField = ',story,productplan,release,task,build,bug,testcase,case,testtask,testreport,doc,doclib,issue,risk,opportunity,trainplan,gapanalysis,team,whitelist,researchplan,researchreport,meeting,kanbanlane,kanbancolumn,';
$config->action->noLinkModules = ',doclib,module,webhook,gitlab,sonarqube,pipeline,jenkins,kanban,kanbanspace,kanbancolumn,kanbanlane,kanbanregion,kanbancard,execution,project,traincategory,apistruct,program,product,user,';
$config->action->noLinkModules = ',doclib,module,webhook,gitlab,sonarqube,pipeline,jenkins,kanban,kanbanspace,kanbancolumn,kanbanlane,kanbanregion,kanbancard,execution,project,traincategory,apistruct,program,product,user,entry,';
$config->action->preferredTypeNum = 10;
+1
View File
@@ -49,6 +49,7 @@ class action extends control
$this->session->set('researchplanList', $uri, 'project');
$this->session->set('researchreportList', $uri, 'project');
$this->session->set('meetingList', $uri, 'project');
$this->session->set('designList', $uri, 'project');
$this->session->set('storyLibList', $uri, 'assetlib');
$this->session->set('issueLibList', $uri, 'assetlib');
$this->session->set('riskLibList', $uri, 'assetlib');
-10
View File
@@ -63,16 +63,6 @@
</div>
<div id='mainContent' class="main-row">
<div class='side-col' id='sidebar'>
<div class='cell'>
<div class='list-group'>
<?php
echo html::a($this->createLink('backup', 'index'), $lang->backup->common);
echo html::a($this->createLink('action', 'trash'), $lang->action->trash, '', "class='active'");
?>
</div>
</div>
</div>
<div class='main-table' data-ride='table'>
<table class='table has-sort-head'>
<?php $vars = "browseType=$currentObjectType&type=$type&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
-10
View File
@@ -20,16 +20,6 @@
<div class='btn-toolbar pull-left'><?php // common::printAdminSubMenu('system');?></div>
</div>
<div id='mainContent' class="main-row">
<div class='side-col' id='sidebar'>
<div class='cell'>
<div class='list-group'>
<?php
echo html::a($this->inLink('index'), $lang->backup->common, '', "class='active'");
echo html::a($this->createLink('action', 'trash'), $lang->action->trash);
?>
</div>
</div>
</div>
<div class="main-col main-content">
<div class='main-header'>
<h2>
+2
View File
@@ -192,6 +192,8 @@ $lang->stage->common = 'Stage';
$lang->stage->list = 'Stage List';
$lang->execution->list = "{$lang->executionCommon} List";
$lang->kanban->common = 'Kanban';
$lang->backup->common = 'Backup';
$lang->action->trash = 'Recycle';
$lang->personnel->common = 'Member';
$lang->personnel->invest = 'Investment';
+2 -1
View File
@@ -536,7 +536,8 @@ $lang->admin->menu->dev['menuOrder'][15] = 'editor';
$lang->admin->menu->dev['menuOrder'][20] = 'entry';
$lang->admin->menu->system['subMenu'] = new stdclass();
$lang->admin->menu->system['subMenu']->data = array('link' => "{$lang->admin->data}|backup|index", 'subModule' => 'action');
$lang->admin->menu->system['subMenu']->backup = array('link' => "{$lang->backup->common}|backup|index");
$lang->admin->menu->system['subMenu']->trash = array('link' => "{$lang->action->trash}|action|trash");
$lang->admin->menu->system['subMenu']->safe = array('link' => "$lang->security|admin|safe", 'alias' => 'checkweak');
$lang->admin->menu->system['subMenu']->cron = array('link' => "{$lang->admin->cron}|cron|index", 'subModule' => 'cron');
$lang->admin->menu->system['subMenu']->timezone = array('link' => "$lang->timezone|custom|timezone");
+2
View File
@@ -192,6 +192,8 @@ $lang->stage->common = '阶段';
$lang->stage->list = '阶段列表';
$lang->execution->list = "{$lang->executionCommon}列表";
$lang->kanban->common = '看板';
$lang->backup->common = '备份';
$lang->action->trash = '回收站';
$lang->personnel->common = '人员';
$lang->personnel->invest = '投入人员';
+1
View File
@@ -48,3 +48,4 @@
.tree-group:hover > .module-name {width: calc(100% - 20px);}
.tree-group:hover .tree-actions {display: block}
.tree li.has-list.open:before {left: 6px;}
.sortable-sorting .tree-group:hover .tree-actions {display: none;}
+3 -5
View File
@@ -23,18 +23,16 @@ span.dotted-line+a {display: block;}
.sortable-sorting .module-name > a {cursor: move;}
.sortable-sorting li >.tree-group {opacity: .5;}
.sortable-sorting li:before {opacity: .3;}
.sortable-sorting .drop-here .tree-group {background-color: #fff3e0;}
.sortable-sorting .drop-here .tree-group > * {opacity: .1;}
.sortable-sorting .drag-shadow .tree-group {opacity: 1!important;}
.sortable-sorting .drag-shadow .tree-actions {visibility: hidden;}
.is-sorting > li:before {opacity: 1;}
.is-sorting > li > .tree-group {opacity: 1; border-radius: 4px;}
.is-sorting > li ul {display: none!important;}
li.drag-shadow ul {display: none!important;}
.tree-group {position: relative;}
.tree-group > .module-name {white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; display: block;}
.tree-group .tree-actions {display: none; position: absolute; right: 0; top: 0; background-color: #fff; white-space: nowrap;}
.tree-group:hover > .module-name {width: calc(100% - 20px);}
.tree-group:hover .tree-actions {display: block}
.tree li.has-list.open:before {left: 6px;}
.sortDoc>.tail-info{right: 20px;}
.sortDoc>.tree-actions{position: absolute; right: 0px; background: #fff;}
+1 -19
View File
@@ -2417,12 +2417,6 @@ EOT;
if($currentMethod == 'tablecontents')
{
$treeMenu[0] .= '<div class="tree-group"><span class="tail-info">' . zget($users, $doc->editedBy) . ' &nbsp;' . $doc->editedDate . '</span>';
if(common::hasPriv('doc', 'updateOrder'))
{
$treeMenu[0] .= "<div class='tree-actions'>";
$treeMenu[0] .= html::a('javascript:;', "<i class='icon icon-move sortDoc'></i>", '', "title='{$this->lang->doc->updateOrder}' class='sortDoc'");
$treeMenu[0] .= '</div>';
}
}
if($currentMethod == 'objectlibs')
{
@@ -2495,12 +2489,6 @@ EOT;
if($currentMethod == 'tablecontents')
{
$treeMenu[$module->id] .= '<div class="tree-group"><span class="tail-info">' . zget($users, $doc->editedBy) . ' &nbsp;' . $doc->editedDate . '</span>';
if(common::hasPriv('doc', 'updateOrder'))
{
$treeMenu[$module->id] .= "<div class='tree-actions'>";
$treeMenu[$module->id] .= html::a('javascript:;', "<i class='icon icon-move sortDoc'></i>", '', "title='{$this->lang->doc->updateOrder}' class='sortDoc'");
$treeMenu[$module->id] .= '</div>';
}
}
if($currentMethod == 'objectlibs')
@@ -2535,13 +2523,7 @@ EOT;
else
{
$li = "<div class='tree-group'><span class='module-name'><a class='sort-module' title='{$module->name}'>" . $module->name . '</a></span>';
if($currentMethod == 'tablecontents' and common::hasPriv('tree', 'updateOrder'))
{
$li .= "<div class='tree-actions'>";
$li .= html::a('javascript:;', "<i class='icon icon-move sortModule'></i>", '', "title='{$this->lang->doc->updateOrder}' class='sortModule'");
$li .= '</div>';
}
else
if($currentMethod != 'tablecontents')
{
if(common::hasPriv('tree', 'edit') or common::hasPriv('tree', 'browse') or common::hasPriv('tree', 'browse') or common::hasPriv('tree', 'updateOrder'))
{
+1
View File
@@ -72,6 +72,7 @@ $sideWidth = common::checkNotCN() ? '270' : '238';
.sortable-sorting .drag-shadow .tree-actions {visibility: hidden;}
.is-sorting > li > .tree-group {opacity: 1; border-radius: 4px;}
.is-sorting > li ul {display: none!important;}
li.drag-shadow ul {display: none!important;}
</style>
<script>
$(function()
+14
View File
@@ -31,6 +31,20 @@ $lang->program->days = 'Days';
$lang->program->acl = 'Access Control';
$lang->program->whitelist = 'WhiteList';
$lang->program->deleted = 'Deleted';
$lang->program->lifetime = 'Lifetime';
$lang->program->output = 'Output';
$lang->program->auth = 'Auth';
$lang->program->path = 'Path';
$lang->program->grade = 'Grade';
$lang->program->realBegan = 'RealBegan';
$lang->program->realEnd = 'RealEnd';
$lang->program->version = 'Version';
$lang->program->parentVersion = 'ParentVersion';
$lang->program->planDuration = 'PlanDuration';
$lang->program->realDuration = 'RealDuration';
$lang->program->openedVersion = 'OpenedVersion';
$lang->program->lastEditedBy = 'LastEditedBy';
$lang->program->lastEditedDate = 'LastEditedDate';
/* Actions. */
$lang->program->common = 'Program';
+14
View File
@@ -31,6 +31,20 @@ $lang->program->days = '可用工作日';
$lang->program->acl = '访问控制';
$lang->program->whitelist = '白名单';
$lang->program->deleted = '已删除';
$lang->program->lifetime = '项目周期';
$lang->program->output = '输出';
$lang->program->auth = '权限控制';
$lang->program->path = '路径';
$lang->program->grade = '层级';
$lang->program->realBegan = '实际开始日期';
$lang->program->realEnd = '实际完成日期';
$lang->program->version = '版本';
$lang->program->parentVersion = '父版本';
$lang->program->planDuration = '计划周期天数';
$lang->program->realDuration = '实际周期天数';
$lang->program->openedVersion = '创建版本';
$lang->program->lastEditedBy = '最后编辑人';
$lang->program->lastEditedDate = '最后编辑日期';
/* Actions. */
$lang->program->common = '项目集';
+8 -17
View File
@@ -515,11 +515,7 @@ class projectModel extends model
}
elseif($module == 'story')
{
if($method == 'create')
{
$link = helper::createLink($module, $method);
}
elseif($method == 'change')
if($method == 'change' or $method == 'create')
{
$link = helper::createLink('projectstory', 'story', "projectID=%s");
}
@@ -528,26 +524,19 @@ class projectModel extends model
$link = helper::createLink('project', 'testcase', "projectID=%s");
}
}
elseif($module == 'testcase' and $method == 'create')
elseif($module == 'testcase')
{
if($method == 'create')
{
$link = helper::createLink($module, $method);
}
elseif($method == 'edit')
{
$link = helper::createLink('project', 'testcase', "projectID=%s");
}
$link = helper::createLink('project', 'testcase', "projectID=%s");
}
elseif($module == 'testtask')
{
if($method == 'create')
if($method == 'browseunits')
{
$link = helper::createLink($module, $method, "product=0&executionID=0&build=0&projectID=%s");
$link = helper::createLink('project', 'testcase', "projectID=%s");
}
else
{
$link = helper::createLink($module, 'browseunits');
$link = helper::createLink('project', 'testtask', "projectID=%s");
}
}
elseif($module == 'testreport')
@@ -2476,6 +2465,8 @@ class projectModel extends model
$this->lang->switcherMenu = $this->getSwitcher($objectID, $this->app->rawModule, $this->app->rawMethod);
$this->saveState($objectID, $this->project->getPairsByProgram());
common::setMenuVars('project', $objectID);
}
+3 -1
View File
@@ -1187,7 +1187,9 @@ class story extends control
}
else
{
$this->story->delete(TABLE_STORY, $storyID);
$this->dao->update(TABLE_STORY)->set('deleted')->eq(1)->where('id')->eq($storyID)->exec();
$this->loadModel('action')->create($story->type, $storyID, 'deleted', '', ACTIONMODEL::CAN_UNDELETED);
if($story->parent > 0)
{
$this->story->updateParentStatus($story->id);
+1 -1
View File
@@ -165,7 +165,7 @@ class testtask extends control
$this->lang->waterfall->menu->qa['subMenu']->testtask['subModule'] = '';
}
$this->loadModel('project')->setMenu($this->session->project);
$this->loadModel('project')->setMenu($projectID);
$this->lang->modulePageNav = $this->product->select($this->products, $productID, 'testtask', 'browseUnits', "projectID=$projectID", '', 0, '', false);
}
else
+2 -2
View File
@@ -1573,7 +1573,7 @@ class treeModel extends model
foreach($childs as $moduleID => $moduleName)
{
if(preg_match('/(^\s+$)/', $moduleName)) return print(js::alert($this->lang->tree->shouldNotBlank));
if(preg_match('/(^\s+$)/', $moduleName)) helper::end(js::alert($this->lang->tree->shouldNotBlank));
}
$module = new stdClass();
@@ -1581,7 +1581,7 @@ class treeModel extends model
$module->type = $type;
$module->parent = $parentModuleID;
$repeatName = $this->checkUnique($module, $childs);
if($repeatName) return print(js::alert(sprintf($this->lang->tree->repeatName, $repeatName)));
if($repeatName) helper::end(js::alert(sprintf($this->lang->tree->repeatName, $repeatName)));
$parentModule = $this->getByID($parentModuleID);