diff --git a/db/zentao.sql b/db/zentao.sql index d7c7ac2f10..053c6a3094 100755 --- a/db/zentao.sql +++ b/db/zentao.sql @@ -14547,7 +14547,16 @@ REPLACE INTO `zt_approvalflowspec` (`id`, `flow`, `version`, `nodes`, `createdBy REPLACE INTO `zt_lang` (`lang`, `module`, `section`, `key`, `value`, `system`) VALUES ('all', 'process', 'classify', 'support', '支持过程', '1'), ('all', 'process', 'classify', 'engineering', '工程支持', '1'), -('all', 'process', 'classify', 'project', '项目管理', '1'); +('all', 'process', 'classify', 'project', '项目管理', '1'), +('all', 'process', 'scrumClassify', 'support', '支持过程', '1'), +('all', 'process', 'scrumClassify', 'engineering', '工程支持', '1'), +('all', 'process', 'scrumClassify', 'project', '项目管理', '1'), +('all', 'process', 'agileplusClassify', 'support', '支持过程', '1'), +('all', 'process', 'agileplusClassify', 'engineering', '工程支持', '1'), +('all', 'process', 'agileplusClassify', 'project', '项目管理', '1'), +('all', 'process', 'waterfallplusClassify', 'support', '支持过程', '1'), +('all', 'process', 'waterfallplusClassify', 'engineering', '工程支持', '1'), +('all', 'process', 'waterfallplusClassify', 'project', '项目管理', '1'); REPLACE INTO `zt_process` (`id`, `model`, `name`, `type`, `abbr`, `desc`, `assignedTo`, `status`, `order`, `createdBy`, `createdDate`, `editedBy`, `editedDate`, `assignedBy`, `assignedDate`, `deleted`) VALUES (11, 'waterfall', '立项管理', 'project', 'PIM', '', '', '', 55, 'admin', '2020-01-09 10:29:55', '', '1970-01-01 00:00:01', '', '1970-01-01 00:00:01', '0'), diff --git a/lib/form/form.class.php b/lib/form/form.class.php index fcda5b0c81..d748b945a1 100644 --- a/lib/form/form.class.php +++ b/lib/form/form.class.php @@ -135,7 +135,7 @@ class form extends fixer } else { - $configObject[$field->field] = array('required' => $required, 'type' => 'string'); + $configObject[$field->field] = array('required' => $required, 'type' => 'string', 'default' => ''); if($field->control == 'richtext') $configObject[$field->field]['control'] = 'editor'; } } diff --git a/module/index/config.php b/module/index/config.php index adca3ae48a..e0ae26348b 100644 --- a/module/index/config.php +++ b/module/index/config.php @@ -35,3 +35,4 @@ $config->index->oldPages[] = 'ai-promptview'; $config->index->oldPages[] = 'api-debug'; $config->index->oldPages[] = 'datatable-ajaxoldcustom'; $config->index->oldPages[] = 'weekly-index'; +$config->index->oldPages[] = 'kanban-importticket'; diff --git a/module/kanban/control.php b/module/kanban/control.php index e5498008ff..79755c1ab1 100644 --- a/module/kanban/control.php +++ b/module/kanban/control.php @@ -381,6 +381,8 @@ class kanban extends control $regionID = !isset($regions[$regionID]) ? 'all' : $regionID; $this->session->set('regionID', $regionID, 'kanban'); + $this->kanbanZen->setUserAvatar(); + $this->view->title = $this->lang->kanban->view; $this->view->kanban = $kanban; $this->view->regions = $regions; diff --git a/module/kanban/js/view.ui.js b/module/kanban/js/view.ui.js index d7a54701fc..16b844d6b1 100644 --- a/module/kanban/js/view.ui.js +++ b/module/kanban/js/view.ui.js @@ -114,7 +114,7 @@ window.buildColCardActions = function(col) if(kanban.object.indexOf('releases') != -1) items.push({text: kanbanLang.importRelease, url: $.createLink('kanban', 'importRelease', `kanbanID=${kanbanID}®ionID=${col.region}&groupID=${col.group}&columnID=${col.id}`), 'data-toggle': 'modal', 'data-size': 'lg'}); if(kanban.object.indexOf('executions') != -1) items.push({text: kanbanLang.importExecution, url: $.createLink('kanban', 'importExecution', `kanbanID=${kanbanID}®ionID=${col.region}&groupID=${col.group}&columnID=${col.id}`), 'data-toggle': 'modal', 'data-size': 'lg'}); if(kanban.object.indexOf('builds') != -1) items.push({text: kanbanLang.importBuild, url: $.createLink('kanban', 'importBuild', `kanbanID=${kanbanID}®ionID=${col.region}&groupID=${col.group}&columnID=${col.id}`), 'data-toggle': 'modal', 'data-size': 'lg'}); - //{text: kanbanLang.importTicket, url: $.createLink('kanban', 'importTicket', `kanbanID=${kanbanID}®ionID=${col.region}&groupID=${col.group}&columnID=${col.id}`), 'data-toggle': 'modal', 'data-size': 'lg'}, + if(kanban.object.indexOf('tickets') != -1) items.push({text: kanbanLang.importTicket, url: $.createLink('kanban', 'importTicket', `kanbanID=${kanbanID}®ionID=${col.region}&groupID=${col.group}&columnID=${col.id}`), 'data-toggle': 'modal', 'data-type': 'iframe'}), actions.push( { text: kanbanLang.importAB, @@ -301,8 +301,41 @@ window.renderProductplanItem = function(info) info.item.contentClass = 'text-gray clip mr-2'; info.item.footer = {html: statusBox + date} } + window.renderTicketItem = function(info) { + info.item.icon = 'ticket'; + info.item.titleUrl = canViewTicket ? $.createLink('ticket', 'view', `id=${info.item.fromID}`) : ''; + info.item.titleAttrs = {'class': 'card-title clip', 'title': info.item.title}; + + if(info.item.deleted == '0') + { + statusBox = '' + ticketLang.statusList[info.item.objectStatus] + ''; + } + else + { + statusBox = '' + ticketLang.deleted + ''; + } + + const date = info.item.deadline && info.item.deadline != '0000-00-00' ? '' + info.item.deadline.slice(5) + ' ' + cardLang.deadlineAB + '' : ''; + + let avatar = ''; + if(info.item.assignedTo && typeof userList[info.item.assignedTo] != 'undefined') + { + const user = userList[info.item.assignedTo]; + const assignedTo = user.realname; + const userAvatar = user.avatar ? "" : info.item.assignedTo.substr(0, 1).toUpperCase(); + + avatar = "