Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms into sprint/master_lanzongjun_fixbug

This commit is contained in:
Zongjun Lan
2022-03-11 15:06:54 +08:00
81 changed files with 1027 additions and 514 deletions
+2 -2
View File
@@ -131,7 +131,7 @@ zentaoxx:
sed -i 's/commonModel::getLicensePropertyValue/extCommonModel::getLicensePropertyValue/g' zentaoxx/extension/xuan/im/control.php
sed -i 's/commonModel::getLicensePropertyValue/extCommonModel::getLicensePropertyValue/g' zentaoxx/extension/xuan/im/model/conference.php
sed -i 's/xxb_/zt_/g' zentaoxx/db/*.sql
sed -i "s/\$this->app->getModuleRoot() . 'im/apischeme.json'/\$this->app->getExtensionRoot() . 'xuan/im/apischeme.json'/g" zentaoxx/extension/xuan/im/model.php
sed -i "s#\$this->app->getModuleRoot() . 'im/apischeme.json'#\$this->app->getExtensionRoot() . 'xuan/im/apischeme.json'#g" zentaoxx/extension/xuan/im/model.php
sed -i "/getModuleExtPath(/ r tools/fixxuan" zentaoxx/framework/xuanxuan.class.php
echo "ALTER TABLE \`zt_user\` ADD \`pinyin\` varchar(255) NOT NULL DEFAULT '' AFTER \`realname\`;" >> zentaoxx/db/xuanxuan.sql
mkdir zentaoxx/tools; cp tools/cn2tw.php zentaoxx/tools; cd zentaoxx/tools; php cn2tw.php
@@ -248,6 +248,6 @@ ci:
make en
rm -fr zentaopms zentaoxx zentaoxx.*.zip
php tools/mergezentaopms.php $(VERSION)
rm zentaobiz*.zip zentaomax*.zip $(BUILD_PATH)/ZenTaoPMS.$(VERSION).zip $(RELEASE_PATH)/ZenTaoALM.$(VERSION)*.zip $(RELEASE_PATH)/ZenTaoPMS.$(VERSION)*.zip $(RELEASE_PATH)/*.deb $(RELEASE_PATH)/*.rpm
rm -f zentaobiz*.zip zentaomax*.zip $(BUILD_PATH)/ZenTaoPMS.$(VERSION).zip $(RELEASE_PATH)/ZenTaoALM.$(VERSION)*.zip $(RELEASE_PATH)/ZenTaoPMS.$(VERSION)*.zip $(RELEASE_PATH)/*.deb $(RELEASE_PATH)/*.rpm
cp ZenTaoPMS.$(VERSION).zip $(BUILD_PATH)
mv *.zip *.deb *.rpm $(RELEASE_PATH)
+2
View File
@@ -130,6 +130,7 @@ $filter->svn->cat = new stdclass();
$filter->svn->diff = new stdclass();
$filter->task->create = new stdclass();
$filter->task->export = new stdclass();
$filter->execution->default = new stdclass();
$filter->execution->story = new stdclass();
$filter->testcase->default = new stdclass();
$filter->testcase->create = new stdclass();
@@ -279,6 +280,7 @@ $filter->productplan->browse->cookie['viewType'] = 'code';
$filter->task->create->cookie['lastTaskModule'] = 'int';
$filter->task->export->cookie['checkedItem'] = 'reg::checked';
$filter->execution->default->cookie['kanbanview'] = 'code';
$filter->execution->story->cookie['storyPreExecutionID'] = 'int';
$filter->execution->story->cookie['storyModuleParam'] = 'int';
$filter->execution->story->cookie['storyProductParam'] = 'int';
+9 -1
View File
@@ -22,11 +22,19 @@ ALTER TABLE `zt_story` ADD `vision` varchar(10) NOT NULL DEFAULT 'rnd' AFTER `id
ALTER TABLE `zt_story` ADD `activatedDate` datetime NOT NULL AFTER `closedReason`;
ALTER TABLE `zt_task` MODIFY `activatedDate` datetime NOT NULL AFTER `lastEditedDate`;
ALTER TABLE `zt_kanbancard` ADD `progress` float unsigned NOT NULL DEFAULT '0' AFTER `estimate`;
ALTER TABLE `zt_user` ADD `visions` varchar(20) NOT NULL AFTER `visits`;
UPDATE `zt_user` SET `visions`='rnd,lite';
INSERT INTO `zt_group` (`vision`, `name`, `role`, `desc`) VALUES
('lite', '迅捷版用户分组', 'liteUser', '迅捷版用户分组');
('lite', '管理员', 'liteUser', '迅捷版用户分组');
INSERT INTO `zt_group` (`vision`, `name`, `role`, `desc`) VALUES
('lite', '项目管理', 'liteUser', '迅捷版用户分组');
INSERT INTO `zt_group` (`vision`, `name`, `role`, `desc`) VALUES
('lite', '团队成员', 'liteUser', '迅捷版用户分组');
ALTER TABLE `zt_productplan` ADD `closedReason` varchar(20) NOT NULL AFTER `order`;
-1
View File
@@ -801,7 +801,6 @@ CREATE TABLE IF NOT EXISTS `zt_trainplan` (
`deleted` enum('0','1') NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
ALTER TABLE `zt_todo` CHANGE `type` `type` char(15) NOT NULL AFTER `feedback`;
-- DROP TABLE IF EXISTS `zt_gapanalysis`;
CREATE TABLE IF NOT EXISTS `zt_gapanalysis` (
+25 -248
View File
@@ -724,13 +724,14 @@ CREATE TABLE `zt_kanbancard` (
`fromID` mediumint(8) unsigned NOT NULL,
`fromType` varchar(30) NOT NULL,
`name` varchar(255) NOT NULL,
`status` varchar(30) NOT NULL,
`status` varchar(30) NOT NULL DEFAULT 'doing',
`pri` mediumint(8) unsigned NOT NULL,
`assignedTo` text NOT NULL,
`desc` text NOT NULL,
`begin` date NOT NULL,
`end` date NOT NULL,
`estimate` float unsigned NOT NULL,
`progress` float unsigned NOT NULL DEFAULT '0',
`color` char(7) NOT NULL,
`acl` char(30) NOT NULL DEFAULT 'open',
`whitelist` text NOT NULL,
@@ -785,7 +786,6 @@ CREATE TABLE IF NOT EXISTS `zt_kanbanlane` (
-- DROP TABLE IF EXISTS `zt_kanbancolumn`;
CREATE TABLE IF NOT EXISTS `zt_kanbancolumn` (
`id` int(8) NOT NULL AUTO_INCREMENT,
`lane` mediumint(8) NOT NULL DEFAULT '0',
`parent` mediumint(8) NOT NULL DEFAULT '0',
`type` char(30) NOT NULL,
`region` mediumint(8) unsigned NOT NULL,
@@ -794,7 +794,6 @@ CREATE TABLE IF NOT EXISTS `zt_kanbancolumn` (
`color` char(30) NOT NULL,
`limit` smallint(6) NOT NULL DEFAULT '-1',
`order` mediumint(8) NOT NULL DEFAULT '0',
`cards` text NULL,
`archived` enum('0', '1') NOT NULL DEFAULT '0',
`deleted` enum('0','1') NOT NULL default '0',
PRIMARY KEY (`id`)
@@ -1751,7 +1750,13 @@ INSERT INTO `zt_group` (`id`, `name`, `role`, `desc`) VALUES
(13, 'PROJECTADMIN', 'projectAdmin', 'Project Admins manage project privileges');
INSERT INTO `zt_group` (`id`, `vision`, `name`, `role`, `desc`) VALUES
(14, 'lite', '迅捷版用户分组', 'liteUser', '迅捷版用户分组');
(14, 'lite', '管理员', 'liteUser', '迅捷版用户分组');
INSERT INTO `zt_group` (`id`, `vision`, `name`, `role`, `desc`) VALUES
(15, 'lite', '项目管理', 'liteUser', '迅捷版用户分组');
INSERT INTO `zt_group` (`id`, `vision`, `name`, `role`, `desc`) VALUES
(16, 'lite', '团队成员', 'liteUser', '迅捷版用户分组');
INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(1,'action','comment'),
@@ -1919,8 +1924,6 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(1,'execution','importtask'),
(1,'execution','index'),
(1,'execution','kanban'),
(1,'execution','kanbanColsColor'),
(1,'execution','kanbanHideCols'),
(1,'execution','linkStory'),
(1,'execution','manageMembers'),
(1,'execution','manageProducts'),
@@ -3123,8 +3126,6 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(4,'execution','importtask'),
(4,'execution','index'),
(4,'execution','kanban'),
(4,'execution','kanbanColsColor'),
(4,'execution','kanbanHideCols'),
(4,'execution','linkStory'),
(4,'execution','manageMembers'),
(4,'execution','manageProducts'),
@@ -3621,8 +3622,6 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(5,'execution','importtask'),
(5,'execution','index'),
(5,'execution','kanban'),
(5,'execution','kanbanColsColor'),
(5,'execution','kanbanHideCols'),
(5,'execution','linkStory'),
(5,'execution','manageMembers'),
(5,'execution','manageProducts'),
@@ -4072,8 +4071,6 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(6,'execution','importtask'),
(6,'execution','index'),
(6,'execution','kanban'),
(6,'execution','kanbanColsColor'),
(6,'execution','kanbanHideCols'),
(6,'execution','linkStory'),
(6,'execution','manageMembers'),
(6,'execution','manageProducts'),
@@ -5980,232 +5977,6 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(11,'user','view'),
(12,'my','limited');
INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(14,'action','comment'),
(14,'action','editComment'),
(14,'action','trash'),
(14,'action','undelete'),
(14,'admin','checkWeak'),
(14,'admin','index'),
(14,'admin','safe'),
(14,'api','debug'),
(14,'company','browse'),
(14,'company','dynamic'),
(14,'company','edit'),
(14,'company','index'),
(14,'company','view'),
(14,'custom','execution'),
(14,'custom','flow'),
(14,'custom','index'),
(14,'custom','product'),
(14,'custom','restore'),
(14,'custom','set'),
(14,'custom','setPublic'),
(14,'datatable','setGlobal'),
(14,'dept','browse'),
(14,'dept','delete'),
(14,'dept','edit'),
(14,'dept','manageChild'),
(14,'dept','updateOrder'),
(14,'dev','api'),
(14,'dev','db'),
(14,'dev','editor'),
(14,'doc','allLibs'),
(14,'doc','browse'),
(14,'doc','collect'),
(14,'doc','create'),
(14,'doc','createLib'),
(14,'doc','delete'),
(14,'doc','deleteFile'),
(14,'doc','deleteLib'),
(14,'doc','edit'),
(14,'doc','editLib'),
(14,'doc','index'),
(14,'doc','objectLibs'),
(14,'doc','showFiles'),
(14,'doc','tableContents'),
(14,'doc','view'),
(14,'execution','all'),
(14,'execution','browse'),
(14,'execution','bug'),
(14,'execution','build'),
(14,'execution','burn'),
(14,'execution','burnData'),
(14,'execution','computeBurn'),
(14,'execution','doc'),
(14,'execution','dynamic'),
(14,'execution','executionkanban'),
(14,'execution','fixFirst'),
(14,'execution','grouptask'),
(14,'execution','kanban'),
(14,'execution','manageMembers'),
(14,'execution','printKanban'),
(14,'execution','story'),
(14,'execution','storyEstimate'),
(14,'execution','storyKanban'),
(14,'execution','task'),
(14,'execution','team'),
(14,'execution','tree'),
(14,'execution','treeStory'),
(14,'execution','treeTask'),
(14,'execution','view'),
(14,'execution','whitelist'),
(14,'file','delete'),
(14,'file','download'),
(14,'file','edit'),
(14,'file','setPublic'),
(14,'file','uploadImages'),
(14,'group','browse'),
(14,'index','index'),
(14,'message','browser'),
(14,'message','index'),
(14,'message','setting'),
(14,'misc','ping'),
(14,'my','bug'),
(14,'my','calendar'),
(14,'my','changePassword'),
(14,'my','contribute'),
(14,'my','deleteContacts'),
(14,'my','doc'),
(14,'my','dynamic'),
(14,'my','editProfile'),
(14,'my','execution'),
(14,'my','index'),
(14,'my','manageContacts'),
(14,'my','preference'),
(14,'my','profile'),
(14,'my','project'),
(14,'my','score'),
(14,'my','story'),
(14,'my','task'),
(14,'my','team'),
(14,'my','todo'),
(14,'my','uploadAvatar'),
(14,'my','work'),
(14,'personnel','accessible'),
(14,'personnel','invest'),
(14,'personnel','whitelist'),
(14,'product','all'),
(14,'product','browse'),
(14,'product','build'),
(14,'product','dashboard'),
(14,'product','dynamic'),
(14,'product','index'),
(14,'product','kanban'),
(14,'product','project'),
(14,'product','roadmap'),
(14,'product','view'),
(14,'product','whitelist'),
(14,'productplan','browse'),
(14,'productplan','view'),
(14,'program','browse'),
(14,'program','kanban'),
(14,'program','product'),
(14,'program','project'),
(14,'program','stakeholder'),
(14,'program','view'),
(14,'project','browse'),
(14,'project','bug'),
(14,'project','build'),
(14,'project','create'),
(14,'project','dynamic'),
(14,'project','edit'),
(14,'project','execution'),
(14,'project','index'),
(14,'project','kanban'),
(14,'project','manageMembers'),
(14,'project','programTitle'),
(14,'project','qa'),
(14,'project','team'),
(14,'project','testcase'),
(14,'project','testreport'),
(14,'project','testtask'),
(14,'project','view'),
(14,'project','whitelist'),
(14,'projectbuild','browse'),
(14,'projectrelease','browse'),
(14,'projectrelease','view'),
(14,'projectstory','story'),
(14,'projectstory','track'),
(14,'projectstory','view'),
(14,'report','bugAssign'),
(14,'report','bugCreate'),
(14,'report','index'),
(14,'report','productSummary'),
(14,'report','projectDeviation'),
(14,'report','workload'),
(14,'search','buildForm'),
(14,'search','buildIndex'),
(14,'search','buildQuery'),
(14,'search','deleteQuery'),
(14,'search','index'),
(14,'search','saveQuery'),
(14,'search','select'),
(14,'story','bugs'),
(14,'story','cases'),
(14,'story','report'),
(14,'story','tasks'),
(14,'story','track'),
(14,'story','view'),
(14,'task','activate'),
(14,'task','assignTo'),
(14,'task','batchAssignTo'),
(14,'task','batchCancel'),
(14,'task','batchChangeModule'),
(14,'task','batchClose'),
(14,'task','batchCreate'),
(14,'task','batchEdit'),
(14,'task','cancel'),
(14,'task','close'),
(14,'task','confirmStoryChange'),
(14,'task','create'),
(14,'task','delete'),
(14,'task','deleteEstimate'),
(14,'task','edit'),
(14,'task','editEstimate'),
(14,'task','export'),
(14,'task','finish'),
(14,'task','pause'),
(14,'task','recordEstimate'),
(14,'task','report'),
(14,'task','restart'),
(14,'task','start'),
(14,'task','view'),
(14,'todo','activate'),
(14,'todo','assignTo'),
(14,'todo','batchClose'),
(14,'todo','batchCreate'),
(14,'todo','batchEdit'),
(14,'todo','batchFinish'),
(14,'todo','close'),
(14,'todo','create'),
(14,'todo','createcycle'),
(14,'todo','delete'),
(14,'todo','edit'),
(14,'todo','export'),
(14,'todo','finish'),
(14,'todo','import2Today'),
(14,'todo','start'),
(14,'todo','view'),
(14,'tree','browse'),
(14,'tree','browseTask'),
(14,'tree','delete'),
(14,'tree','edit'),
(14,'tree','fix'),
(14,'tree','manageChild'),
(14,'tree','updateOrder'),
(14,'user','batchEdit'),
(14,'user','cropAvatar'),
(14,'user','dynamic'),
(14,'user','execution'),
(14,'user','issue'),
(14,'user','profile'),
(14,'user','risk'),
(14,'user','story'),
(14,'user','task'),
(14,'user','todo'),
(14,'user','view');
REPLACE INTO `zt_lang` (`lang`, `module`, `section`, `key`, `value`, `system`) VALUES
('zh-cn', 'custom', 'URSRList', '1', '{\"SRName\":\"\\u8f6f\\u4ef6\\u9700\\u6c42\",\"URName\":\"\\u7528\\u6237\\u9700\\u6c42\"}', '1'),('zh-cn', 'custom', 'URSRList', '2', '{\"SRName\":\"\\u7814\\u53d1\\u9700\\u6c42\",\"URName\":\"\\u7528\\u6237\\u9700\\u6c42\"}', '1'),
('zh-cn', 'custom', 'URSRList', '3', '{\"SRName\":\"\\u8f6f\\u9700\",\"URName\":\"\\u7528\\u9700\"}', '1'),('zh-cn', 'custom', 'URSRList', '4', '{\"SRName\":\"\\u6545\\u4e8b\",\"URName\":\"\\u53f2\\u8bd7\"}', '1'),
@@ -7040,8 +6811,6 @@ ALTER TABLE `zt_story` ADD `feedback` mediumint(8) unsigned NOT NULL DEFAULT '0'
ALTER TABLE `zt_user` ADD `feedback` enum('0', '1') NOT NULL DEFAULT '0' AFTER `locked`;
ALTER TABLE `zt_group` ADD `developer` enum('0', '1') NOT NULL DEFAULT '1' AFTER `acl`;
INSERT INTO `zt_group` (`name`, `role`, `desc`, `acl`, `developer`) VALUES ('FEEDBACK', 'feedback', 'Feedback', '', '0');
-- DROP TABLE IF EXISTS `zt_feedbackproduct`;
CREATE TABLE IF NOT EXISTS `zt_feedbackview` (
`account` char(30) NOT NULL,
@@ -7586,7 +7355,7 @@ CREATE VIEW `view_datasource_5` AS select `id`,`name` from `zt_task` where `del
DROP VIEW IF EXISTS `view_datasource_46`;
CREATE VIEW `view_datasource_46` AS select `id`,`name` from `zt_task` where `deleted` = '0' and vision = 'lite';
UPDATE `zt_user` SET `visions` = 'lite' WHERE `feedback` = '1';
UPDATE `zt_user` SET `visions` = 'lite', `feedback` = '0' WHERE `feedback` = '1';
REPLACE INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(1,'account','browse'),
@@ -8584,8 +8353,8 @@ REPLACE INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
-- DROP TABLE IF EXISTS `zt_workflow`;
CREATE TABLE IF NOT EXISTS `zt_workflow` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`parent` varchar(30) NOT NULL,
`child` varchar(30) NOT NULL,
`parent` varchar(30) NOT NULL,
`child` varchar(30) NOT NULL,
`type` varchar(10) NOT NULL DEFAULT 'flow',
`app` varchar(20) NOT NULL,
`position` varchar(30) NOT NULL,
@@ -8659,7 +8428,7 @@ CREATE TABLE IF NOT EXISTS `zt_workflowdatasource` (
`type` enum('system', 'sql', 'func', 'option', 'lang', 'category') NOT NULL DEFAULT 'option',
`name` varchar(30) NOT NULL,
`code` varchar(30) NOT NULL,
`datasource` text NOT NULL,
`datasource` text NOT NULL,
`view` varchar(20) NOT NULL,
`keyField` varchar(50) NOT NULL,
`valueField` varchar(50) NOT NULL,
@@ -8687,7 +8456,7 @@ CREATE TABLE IF NOT EXISTS `zt_workflowfield` (
`rules` varchar(255) NOT NULL,
`placeholder` varchar(100) NOT NULL,
`order` smallint(5) unsigned NOT NULL,
`searchOrder` smallint(5) unsigned NOT NULL DEFAULT '0',
`searchOrder` smallint(5) unsigned NOT NULL DEFAULT '0',
`exportOrder` smallint(5) unsigned NOT NULL DEFAULT '0',
`canExport` enum('0', '1') NOT NULL DEFAULT '0',
`canSearch` enum('0', '1') NOT NULL DEFAULT '0',
@@ -8760,7 +8529,7 @@ CREATE TABLE IF NOT EXISTS `zt_workflowlinkdata` (
-- DROP TABLE IF EXISTS `zt_workflowrelation`;
CREATE TABLE IF NOT EXISTS `zt_workflowrelation` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`prev` varchar(30) NOT NULL,
`prev` varchar(30) NOT NULL,
`next` varchar(30) NOT NULL,
`field` varchar(50) NOT NULL,
`actions` varchar(20) NOT NULL,
@@ -8792,7 +8561,7 @@ CREATE TABLE IF NOT EXISTS `zt_workflowrule` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`type` enum('system', 'regex', 'func') NOT NULL DEFAULT 'regex',
`name` varchar(30) NOT NULL,
`rule` text NOT NULL,
`rule` text NOT NULL,
`createdBy` char(30) NOT NULL,
`createdDate` datetime NOT NULL,
`editedBy` char(30) NOT NULL,
@@ -9843,7 +9612,6 @@ CREATE TABLE IF NOT EXISTS `zt_trainplan` (
`deleted` enum('0','1') NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
ALTER TABLE `zt_todo` CHANGE `type` `type` char(15) NOT NULL AFTER `feedback`;
-- DROP TABLE IF EXISTS `zt_gapanalysis`;
CREATE TABLE IF NOT EXISTS `zt_gapanalysis` (
@@ -13119,6 +12887,15 @@ REPLACE INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(11,'workloadbudget','unlink'),
(11,'workloadbudget','view');
Insert into `zt_grouppriv`(`module`, `method`,`group`)
select `module`, `method`,14 as `group` from `zt_grouppriv` where `group` in (select `group` from `zt_grouppriv` where `group` = 1);
Insert into `zt_grouppriv`(`module`, `method`,`group`)
select `module`, `method`,15 as `group` from `zt_grouppriv` where `group` in (select `group` from `zt_grouppriv` where `group` = 4);
Insert into `zt_grouppriv`(`module`, `method`,`group`)
select `module`, `method`,16 as `group` from `zt_grouppriv` where `group` in (select `group` from `zt_grouppriv` where `group` = 9);
REPLACE INTO `zt_lang` (`lang`, `module`, `section`, `key`, `value`, `system`) VALUES
('all', 'process', 'classify', 'support', '支持过程', '1'),
('all', 'process', 'classify', 'engineering', '工程支持', '1'),
+11 -1
View File
@@ -40,7 +40,17 @@ public function setMenu($executionID, $buildID = 0, $extra = '')
if(strpos('|task|calendar|gantt|tree|grouptask|', "|{$lowerMethod}|") !== false) $this->lang->TRActions = $this->getTRActions($lowerMethod);
if(strpos('|relation|maintainrelation|', "|{$lowerMethod}|") !== false) $this->lang->TRActions = $this->getTRActions('gantt');
if($lowerModule == 'task' || ($lowerModule == 'execution' and strpos('|kanban|task|calendar|gantt|tree|grouptask|', "|{$lowerMethod}|") === false)) $this->lang->TRActions = $this->getTRActions($this->session->kanbanview);
if($lowerModule == 'task' or ($lowerModule == 'execution' and strpos('|kanban|task|calendar|gantt|tree|grouptask|', "|{$lowerMethod}|") === false))
{
if($this->session->kanbanview)
{
$this->lang->TRActions = $this->getTRActions($this->session->kanbanview);
}
elseif($this->cookie->kanbanview)
{
$this->lang->TRActions = $this->getTRActions($this->cookie->kanbanview);
}
}
$this->lang->modulePageNav = $modulePageNav;
}
+1 -7
View File
@@ -435,8 +435,6 @@ $lang->resource->execution->tree = 'treeAction';
$lang->resource->execution->treeTask = 'treeOnlyTask';
$lang->resource->execution->treeStory = 'treeOnlyStory';
$lang->resource->execution->all = 'allExecutionAB';
$lang->resource->execution->kanbanHideCols = 'kanbanHideCols';
$lang->resource->execution->kanbanColsColor = 'kanbanColsColor';
$lang->resource->execution->export = 'exportAction';
$lang->resource->execution->storyKanban = 'storyKanban';
$lang->resource->execution->storySort = 'storySort';
@@ -444,8 +442,7 @@ $lang->resource->execution->whitelist = 'whitelist';
$lang->resource->execution->addWhitelist = 'addWhitelist';
$lang->resource->execution->unbindWhitelist = 'unbindWhitelist';
//$lang->resource->execution->storyEstimate = 'storyEstimate';
$lang->resource->execution->executionkanban = 'kanbanAction';
$lang->resource->execution->kanban = 'RDKanban';
$lang->resource->execution->kanban = 'kanban';
//if($config->systemMode == 'classic') $lang->resource->project->list = 'list';
//$lang->execution->methodOrder[0] = 'index';
@@ -489,8 +486,6 @@ $lang->execution->methodOrder[180] = 'batchUnlinkStory';
$lang->execution->methodOrder[185] = 'updateOrder';
$lang->execution->methodOrder[190] = 'taskKanban';
$lang->execution->methodOrder[195] = 'printKanban';
$lang->execution->methodOrder[200] = 'kanbanHideCols';
$lang->execution->methodOrder[205] = 'kanbanColsColor';
$lang->execution->methodOrder[210] = 'tree';
$lang->execution->methodOrder[215] = 'treeTask';
$lang->execution->methodOrder[220] = 'treeStory';
@@ -502,7 +497,6 @@ $lang->execution->methodOrder[245] = 'whitelist';
$lang->execution->methodOrder[250] = 'addWhitelist';
$lang->execution->methodOrder[255] = 'unbindWhitelist';
$lang->execution->methodOrder[260] = 'storyEstimate';
$lang->execution->methodOrder[265] = 'executionkanban';
$lang->execution->methodOrder[270] = 'kanban';
/* Task. */
+15 -15
View File
@@ -1393,30 +1393,30 @@ class baseRouter
if($this->checkModuleName($moduleName))
{
/* 1. 如果通用版本里有此模块,优先使用。 If module is in the open edition, use it. */
$modulePath = $this->getModuleRoot($appName) . $moduleName . DS;
if(is_dir($modulePath)) return $modulePath;
/* 1. 最后尝试在定制开发中寻找。 Finally, try to find the module in the custom dir. */
$modulePath = $this->getExtensionRoot() . 'custom' . DS . $moduleName . DS;
if(is_dir($modulePath) and (file_exists($modulePath . 'control.php') or file_exists($modulePath . 'model.php'))) return $modulePath;
/* 2. 尝试查找喧喧是否有此模块。 Try to find the module in xuan. */
$modulePath = $this->getExtensionRoot() . 'xuan' . DS . $moduleName . DS;
if(is_dir($modulePath)) return $modulePath;
/* 2. 如果设置过vision,尝试在vision中查找。 If vision is set, try to find the module in the vision. */
if($this->config->vision != 'rnd')
{
$modulePath = $this->getExtensionRoot() . $this->config->vision . DS . $moduleName . DS;
if(is_dir($modulePath) and (file_exists($modulePath . 'control.php') or file_exists($modulePath . 'model.php'))) return $modulePath;
}
/* 3. 尝试查找商业版本是否有此模块。 Try to find the module in other editon. */
if($this->config->edition != 'open')
{
$modulePath = $this->getExtensionRoot() . $this->config->edition . DS . $moduleName . DS;
if(is_dir($modulePath)) return $modulePath;
if(is_dir($modulePath) and (file_exists($modulePath . 'control.php') or file_exists($modulePath . 'model.php'))) return $modulePath;
}
/* 4. 如果设置过vision,尝试在vision中查找。 If vision is set, try to find the module in the vision. */
if($this->config->vision != 'rnd')
{
$modulePath = $this->getExtensionRoot() . $this->config->vision . DS . $moduleName . DS;
if(is_dir($modulePath)) return $modulePath;
}
/* 4. 尝试查找喧喧是否有此模块。 Try to find the module in xuan. */
$modulePath = $this->getExtensionRoot() . 'xuan' . DS . $moduleName . DS;
if(is_dir($modulePath) and (file_exists($modulePath . 'control.php') or file_exists($modulePath . 'model.php'))) return $modulePath;
/* 5. 最后尝试在定制开发中寻找。 Finally, try to find the module in the custom dir. */
return $this->getExtensionRoot() . 'custom' . DS . $moduleName . DS;
/* 5. 如果通用版本里有此模块,优先使用。 If module is in the open edition, use it. */
return $this->getModuleRoot($appName) . $moduleName . DS;
}
}
+1 -1
View File
@@ -1528,7 +1528,7 @@ class block extends control
count(assignedTo = '{$this->app->user->account}' or null) as assignedToMe,
count(status != 'closed' or null) as unclosed,
count((status != 'closed' and status != 'resolved') or null) as unresolved,
count(confirmed = '0' or null) as unconfirmed,
count((confirmed = '0' and toStory = '0') or null) as unconfirmed,
count((resolvedDate >= '$yesterday' and resolvedDate < '$today') or null) as yesterdayResolved,
count((closedDate >= '$yesterday' and closedDate < '$today') or null) as yesterdayClosed")
->from(TABLE_BUG)
+2
View File
@@ -37,6 +37,7 @@ $config->company->browse->search['fields']['dept'] = $lang->user->dept;
$config->company->browse->search['fields']['account'] = $lang->user->account;
$config->company->browse->search['fields']['role'] = $lang->user->role;
$config->company->browse->search['fields']['phone'] = $lang->user->phone;
$config->company->browse->search['fields']['visions'] = $lang->user->visions;
$config->company->browse->search['fields']['join'] = $lang->user->join;
$config->company->browse->search['fields']['id'] = $lang->user->id;
$config->company->browse->search['fields']['commiter'] = $lang->user->commiter;
@@ -57,6 +58,7 @@ $config->company->browse->search['params']['account'] = array('operator' => 'in
$config->company->browse->search['params']['role'] = array('operator' => '=', 'control' => 'select', 'values' => $lang->user->roleList);
$config->company->browse->search['params']['phone'] = array('operator' => 'include', 'control' => 'input', 'values' => '');
$config->company->browse->search['params']['join'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date');
$config->company->browse->search['params']['visions'] = array('operator' => 'include', 'control' => 'select', 'values' => $lang->visionList);
$config->company->browse->search['params']['id'] = array('operator' => '=', 'control' => 'input', 'values' => '');
$config->company->browse->search['params']['commiter'] = array('operator' => 'include', 'control' => 'select', 'values' => '');
$config->company->browse->search['params']['gender'] = array('operator' => '=', 'control' => 'select', 'values' => $lang->user->genderList);
+2 -1
View File
@@ -162,7 +162,8 @@ class companyModel extends model
{
$this->config->company->browse->search['actionURL'] = $actionURL;
$this->config->company->browse->search['queryID'] = $queryID;
$this->config->company->browse->search['params']['dept']['values'] = array('' => '') + $this->loadModel('dept')->getOptionMenu();
$this->config->company->browse->search['params']['dept']['values'] = array('' => '') + $this->loadModel('dept')->getOptionMenu();
$this->config->company->browse->search['params']['visions']['values'] = $this->loadModel('user')->getVisionList();
$this->loadModel('search')->setSearchParams($this->config->company->browse->search);
}
+3 -2
View File
@@ -149,12 +149,13 @@ class dept extends control
*
* @param int $dept
* @param string $user
* @param string $key id|account
* @access public
* @return void
*/
public function ajaxGetUsers($dept, $user = '')
public function ajaxGetUsers($dept, $user = '', $key = 'account')
{
$users = array('' => '') + $this->dept->getDeptUserPairs($dept);
$users = array('' => '') + $this->dept->getDeptUserPairs($dept, $key);
return print(html::select('user', $users, $user, "class='form-control chosen'"));
}
}
+7 -2
View File
@@ -501,7 +501,11 @@ class docModel extends model
*/
public function getById($docID, $version = 0, $setImgSize = false)
{
$doc = $this->dao->select('*')->from(TABLE_DOC)->where('id')->eq((int)$docID)->fetch();
$doc = $this->dao->select('*')->from(TABLE_DOC)
->where('id')->eq((int)$docID)
->andWhere('vision')->eq($this->config->vision)
->fetch();
if(!$doc) return false;
if(!$this->checkPrivDoc($doc))
{
@@ -1265,7 +1269,7 @@ class docModel extends model
->beginIF($type == 'book')->orderBy('id_desc')->fi()
->fetchAll('id');
}
else if($type != 'product' and $type != 'project' and $type != 'execution')
elseif($type != 'product' and $type != 'project' and $type != 'execution')
{
return false;
}
@@ -1389,6 +1393,7 @@ class docModel extends model
$executions = $this->dao->select('*')->from(TABLE_EXECUTION)
->where('deleted')->eq(0)
->andWhere('type')->in('sprint,stage,kanban')
->andWhere('vision')->eq($this->config->vision)
->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->sprints)->fi()
->orderBy('order_asc')
->fetchAll('id');
+7 -10
View File
@@ -19,22 +19,19 @@
</div>
<?php if($this->config->edition != 'open'):?>
<div class='alert alert-warning strong'>
<?php
if(common::hasPriv('custom', 'libreoffice'))
{
printf($lang->doc->notSetOffice, zget($lang->doc->typeList, $docType), $this->createLink('custom', 'libreoffice', 'onlybody=yes'));
}
else
{
printf($lang->doc->notSetOffice, zget($lang->doc->typeList, $docType), '###'); echo $lang->doc->accessDenied;
}
?>
<?php printf($lang->doc->notSetOffice, zget($lang->doc->typeList, $docType), common::hasPriv('custom', 'libreoffice') ? $this->createLink('custom', 'libreoffice', '', '', true) : '###');?>
</div>
<?php else:?>
<div class='alert alert-warning strong'><?php printf($lang->doc->cannotCreateOffice, zget($lang->doc->typeList, $docType));?></div>
<?php endif;?>
</div>
</div>
<script>
$("a[href^='###']").click(function()
{
alert('<?php echo $lang->doc->accessDenied;?>');
});
</script>
</body>
</html>
<?php else:?>
+1
View File
@@ -1 +1,2 @@
.thWidth {width: 130px !important;}
td.flex span.project-type-label {min-width: 60px;}
-6
View File
@@ -777,8 +777,6 @@ $lang->resource->execution->tree = 'treeAction';
$lang->resource->execution->treeTask = 'treeOnlyTask';
$lang->resource->execution->treeStory = 'treeOnlyStory';
$lang->resource->execution->all = 'allExecutionAB';
$lang->resource->execution->kanbanHideCols = 'kanbanHideCols';
$lang->resource->execution->kanbanColsColor = 'kanbanColsColor';
$lang->resource->execution->export = 'exportAction';
$lang->resource->execution->storyKanban = 'storyKanban';
$lang->resource->execution->storySort = 'storySort';
@@ -787,7 +785,6 @@ $lang->resource->execution->addWhitelist = 'addWhitelist';
$lang->resource->execution->unbindWhitelist = 'unbindWhitelist';
$lang->resource->execution->storyEstimate = 'storyEstimate';
$lang->resource->execution->executionkanban = 'kanbanAction';
$lang->resource->execution->kanban = 'RDKanban';
//if($config->systemMode == 'classic') $lang->resource->project->list = 'list';
//$lang->execution->methodOrder[0] = 'index';
@@ -831,8 +828,6 @@ $lang->execution->methodOrder[180] = 'batchUnlinkStory';
$lang->execution->methodOrder[185] = 'updateOrder';
$lang->execution->methodOrder[190] = 'taskKanban';
$lang->execution->methodOrder[195] = 'printKanban';
$lang->execution->methodOrder[200] = 'kanbanHideCols';
$lang->execution->methodOrder[205] = 'kanbanColsColor';
$lang->execution->methodOrder[210] = 'tree';
$lang->execution->methodOrder[215] = 'treeTask';
$lang->execution->methodOrder[220] = 'treeStory';
@@ -845,7 +840,6 @@ $lang->execution->methodOrder[250] = 'addWhitelist';
$lang->execution->methodOrder[255] = 'unbindWhitelist';
$lang->execution->methodOrder[260] = 'storyEstimate';
$lang->execution->methodOrder[265] = 'executionkanban';
$lang->execution->methodOrder[270] = 'kanban';
/* Task. */
$lang->resource->task = new stdclass();
+10 -9
View File
@@ -34,15 +34,16 @@ $config->kanban->editregion->requiredFields = 'name';
$config->kanban->splitcolumn->requiredFields = 'name,limit';
$config->kanban->editor = new stdclass();
$config->kanban->editor->create = array('id' => 'desc', 'tools' => 'simpleTools');
$config->kanban->editor->edit = array('id' => 'desc', 'tools' => 'simpleTools');
$config->kanban->editor->createspace = array('id' => 'desc', 'tools' => 'simpleTools');
$config->kanban->editor->editspace = array('id' => 'desc', 'tools' => 'simpleTools');
$config->kanban->editor->closespace = array('id' => 'comment', 'tools' => 'simpleTools');
$config->kanban->editor->createcard = array('id' => 'desc', 'tools' => 'simpleTools');
$config->kanban->editor->close = array('id' => 'comment', 'tools' => 'simpleTools');
$config->kanban->editor->editcard = array('id' => 'desc', 'tools' => 'simpleTools');
$config->kanban->editor->viewcard = array('id' => 'comment', 'tools' => 'simpleTools');
$config->kanban->editor->create = array('id' => 'desc', 'tools' => 'simpleTools');
$config->kanban->editor->edit = array('id' => 'desc', 'tools' => 'simpleTools');
$config->kanban->editor->createspace = array('id' => 'desc', 'tools' => 'simpleTools');
$config->kanban->editor->editspace = array('id' => 'desc', 'tools' => 'simpleTools');
$config->kanban->editor->closespace = array('id' => 'comment', 'tools' => 'simpleTools');
$config->kanban->editor->createcard = array('id' => 'desc', 'tools' => 'simpleTools');
$config->kanban->editor->close = array('id' => 'comment', 'tools' => 'simpleTools');
$config->kanban->editor->editcard = array('id' => 'desc', 'tools' => 'simpleTools');
$config->kanban->editor->viewcard = array('id' => 'comment', 'tools' => 'simpleTools');
$config->kanban->editor->activatecard = array('id' => 'comment', 'tools' => 'simpleTools');
$config->kanban->fromType = array('execution', 'productplan', 'release', 'build');
$config->kanban->executionField = array('name', 'status', 'end', 'PM', 'type', 'deleted');
+16 -12
View File
@@ -888,7 +888,7 @@ class kanban extends control
$this->loadModel('action');
$oldCard = $this->kanban->getCardByID($cardID);
$this->dao->update(TABLE_KANBANCARD)->set('status')->eq('done')->where('id')->eq($cardID)->exec();
$this->dao->update(TABLE_KANBANCARD)->set('progress')->eq(100)->set('status')->eq('done')->where('id')->eq($cardID)->exec();
$card = $this->kanban->getCardByID($cardID);
$changes = common::createChanges($oldCard, $card);
@@ -915,22 +915,26 @@ class kanban extends control
public function activateCard($cardID, $kanbanID)
{
$this->loadModel('action');
if(!empty($_POST))
{
$oldCard = $this->kanban->getCardByID($cardID);
$this->kanban->activateCard($cardID);
$card = $this->kanban->getCardByID($cardID);
$oldCard = $this->kanban->getCardByID($cardID);
$this->dao->update(TABLE_KANBANCARD)->set('status')->eq('doing')->where('id')->eq($cardID)->exec();
$card = $this->kanban->getCardByID($cardID);
$changes = common::createChanges($oldCard, $card);
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
$changes = common::createChanges($oldCard, $card);
$actionID = $this->action->create('kanbanCard', $cardID, 'activated');
$this->action->logHistory($actionID, $changes);
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent'));
}
$actionID = $this->action->create('kanbanCard', $cardID, 'activated');
$this->action->logHistory($actionID, $changes);
$this->view->card = $this->kanban->getCardByID($cardID);
$this->view->actions = $this->action->getList('kanbancard', $cardID);
$this->view->users = $this->loadModel('user')->getPairs('noclosed|nodeleted');
if(isonlybody()) return print(js::reload('parent.parent'));
$kanbanGroup = $this->kanban->getKanbanData($kanbanID);
return print(json_encode($kanbanGroup));
$this->display();
}
/**
+1 -1
View File
@@ -1 +1 @@
#c-done {width: 110px;}
#c-title {width: 130px;}
+4
View File
@@ -118,6 +118,10 @@
.kanban-card .label-finish {margin-right: 7px; margin-top: -1px; padding: 3px 5px; float: left; background-color:#2a5f29;}
.kanban-card .releaseTitle, .kanban-card .productplanTitle {width: 100%; float: left;}
.progress-box {display: flex; flex-direction: row; margin-top: 10px;}
.progress {flex: auto; margin: 5px auto 5px;}
.progress-number {padding-left: 5px;}
@-moz-document url-prefix(){ .region .kanban-lane-items{scrollbar-width:thin; padding:5px 0px 5px 5px !important;} .region .kanban-card .info .user{right: -6px !important;}}
#archivedCards .table-empty-tip {border-style: hidden;}
#archivedColumns .table-empty-tip {border-style: hidden;}
+11 -26
View File
@@ -357,6 +357,11 @@ function renderKanbanItem(item, $item)
'<div class="user"></div>',
'</div>'
].join('')).appendTo($item);
if(kanban.performable == 1)
{
var $progress = $item.children('.progress-box');
if(!$progress.length) $progress = $('<div class="progress-box"><div class="progress"><div class="progress-bar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width: ' + item.progress + '%;"></div></div><div class="progress-number">' + item.progress + '%</div></div>').appendTo($item);
}
$item.data('card', item);
@@ -366,6 +371,11 @@ function renderKanbanItem(item, $item)
$info.children('.pri')
.attr('class', 'pri label-pri label-pri-' + item.pri)
.text(item.pri);
if(kanban.performable == 1)
{
$progress.find('.progress-bar').css('width', item.progress + '%');
$progress.find('.progress-number').html(item.progress + '%');
}
$item.css('background-color', item.color);
$item.toggleClass('has-color', item.color != '#fff' && item.color != '');
@@ -808,31 +818,6 @@ function finishCard(cardID, kanbanID, regionID)
});
}
/**
* Activate a card.
*
* @param int $cardID
* @param int $kanbanID
* @param int $regionID
* @access public
* @return void
*/
function activateCard(cardID, kanbanID, regionID)
{
if(!cardID) return false;
var url = createLink('kanban', 'activateCard', 'cardID=' + cardID + '&kanbanID=' + kanbanID);
return $.ajax(
{
method: 'post',
dataType: 'json',
url: url,
success: function(data)
{
updateRegion(regionID, data[regionID]);
}
});
}
/**
* Update a region.
*
@@ -1091,7 +1076,7 @@ function createCardMenu(options)
{
if(card.status == 'done')
{
items.push({label: kanbanLang.activateCard, icon: 'magic', onClick: function(){activateCard(card.id, card.kanban, card.region);}});
items.push({label: kanbanLang.activateCard, icon: 'magic', url: createLink('kanban', 'activateCard', 'cardID=' + card.id + '&kanbanID=' + card.kanban, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
}
else
{
+11 -9
View File
@@ -44,8 +44,8 @@ $lang->kanban->assigntoCard = 'Assign';
$lang->kanban->setting = 'Setting';
$lang->kanban->enableArchived = 'Enable Archived';
$lang->kanban->archive = 'Archive';
$lang->kanban->performable = 'Set done function';
$lang->kanban->doneFunction = 'Done function';
$lang->kanban->performable = 'Set progress management';
$lang->kanban->manageProgress = 'Manage Progress';
$lang->kanban->splitColumn = 'Split Column';
$lang->kanban->createColumnOnLeft = 'Create Column On Left';
$lang->kanban->createColumnOnRight = 'Create Column On Right';
@@ -120,8 +120,8 @@ $lang->kanban->aclList['private'] = 'Private (For the kanban team, whitelist mem
$lang->kanban->archiveList['0'] = 'Disable';
$lang->kanban->archiveList['1'] = 'Enable';
$lang->kanban->enableFinished['0'] = 'Disable';
$lang->kanban->enableFinished['1'] = 'Enable';
$lang->kanban->enableList['0'] = 'Disable';
$lang->kanban->enableList['1'] = 'Enable';
$lang->kanban->type = array();
$lang->kanban->type['all'] = "All KanBan";
@@ -184,9 +184,9 @@ $lang->kanban->my = 'My';
$lang->kanban->other = 'Other';
$lang->kanban->error = new stdclass();
$lang->kanban->error->mustBeInt = 'The WIPs must be positive integer.';
$lang->kanban->error->parentLimitNote = 'The WIPs in the parent column cannot be < the sum of the WIPs in the child column.';
$lang->kanban->error->childLimitNote = 'The sum of products in the child column cannot be > the number of products in the parent column.';
$lang->kanban->error->mustBeInt = 'The WIPs must be positive integer.';
$lang->kanban->error->parentLimitNote = 'The WIPs in the parent column cannot be < the sum of the WIPs in the child column.';
$lang->kanban->error->childLimitNote = 'The sum of products in the child column cannot be > the number of products in the parent column.';
$lang->kanban->error->importObjNotEmpty = 'Please select at least one import object.';
$lang->kanban->importList = array();
@@ -340,6 +340,7 @@ $lang->kanbancard->beginAndEnd = 'Begin & End';
$lang->kanbancard->begin = 'Begin';
$lang->kanbancard->end = 'End';
$lang->kanbancard->pri = 'Priority';
$lang->kanbancard->progress = 'Progress';
$lang->kanbancard->desc = 'Description';
$lang->kanbancard->estimate = 'Estimate';
$lang->kanbancard->createdBy = 'Created By';
@@ -373,5 +374,6 @@ $lang->kanbancard->colorList['#cfa227'] = 'Warning';
$lang->kanbancard->colorList['#2a5f29'] = 'Urgent';
$lang->kanbancard->error = new stdClass();
$lang->kanbancard->error->recordMinus = 'Estimate cannot be negative!';
$lang->kanbancard->error->endSmall = '"End Date" cannot be less than "Begin Date"';
$lang->kanbancard->error->recordMinus = 'Estimate cannot be negative!';
$lang->kanbancard->error->endSmall = '"End Date" cannot be less than "Begin Date"';
$lang->kanbancard->error->progressIllegal = 'Please input correct progress.';
+8 -6
View File
@@ -44,8 +44,8 @@ $lang->kanban->assigntoCard = '指派';
$lang->kanban->setting = '设置';
$lang->kanban->enableArchived = '设置归档功能';
$lang->kanban->archive = '归档功能';
$lang->kanban->performable = '设置完成功能';
$lang->kanban->doneFunction = '完成功能';
$lang->kanban->performable = '设置进度管理';
$lang->kanban->manageProgress = '进度管理';
$lang->kanban->splitColumn = '新增子看板列';
$lang->kanban->createColumnOnLeft = '左侧新增看板列';
$lang->kanban->createColumnOnRight = '右侧新增看板列';
@@ -120,8 +120,8 @@ $lang->kanban->aclList['private'] = '私有(看板团队成员、白名单、
$lang->kanban->archiveList['0'] = '不启用';
$lang->kanban->archiveList['1'] = '启用';
$lang->kanban->enableFinished['0'] = '不启用';
$lang->kanban->enableFinished['1'] = '启用';
$lang->kanban->enableList['0'] = '不启用';
$lang->kanban->enableList['1'] = '启用';
$lang->kanban->type = array();
$lang->kanban->type['all'] = "综合看板";
@@ -340,6 +340,7 @@ $lang->kanbancard->beginAndEnd = '起止日期';
$lang->kanbancard->begin = '预计开始';
$lang->kanbancard->end = '截止日期';
$lang->kanbancard->pri = '优先级';
$lang->kanbancard->progress = '进度';
$lang->kanbancard->desc = '描述';
$lang->kanbancard->estimate = '预计';
$lang->kanbancard->createdBy = '由谁创建';
@@ -373,5 +374,6 @@ $lang->kanbancard->colorList['#cfa227'] = '警告';
$lang->kanbancard->colorList['#2a5f29'] = '加急';
$lang->kanbancard->error = new stdClass();
$lang->kanbancard->error->recordMinus = '预计不能为负数!';
$lang->kanbancard->error->endSmall = '"截止日期"不能小于"预计开始"!';
$lang->kanbancard->error->recordMinus = '预计不能为负数!';
$lang->kanbancard->error->endSmall = '"截止日期"不能小于"预计开始"!';
$lang->kanbancard->error->progressIllegal = '请输入正确的进度';
+23 -1
View File
@@ -2661,6 +2661,22 @@ class kanbanModel extends model
->andWhere('groupby')->eq('')
->exec();
}
/**
* Activate a card.
*
* @param int $cardID
* @access public
* @return array
*/
public function activateCard($cardID)
{
if($this->post->progress > 100 or $this->post->progress < 0)
{
dao::$errors[] = $this->lang->kanbancard->error->progressIllegal;
return false;
}
$this->dao->update(TABLE_KANBANCARD)->set('progress')->eq($this->post->progress)->set('status')->eq('doing')->where('id')->eq($cardID)->exec();
}
/**
* Update a card.
@@ -2683,6 +2699,12 @@ class kanbanModel extends model
return false;
}
if($this->post->progress > 100 or $this->post->progress < 0)
{
dao::$errors[] = $this->lang->kanbancard->error->progressIllegal;
return false;
}
$cardID = (int)$cardID;
$oldCard = $this->getCardByID($cardID);
@@ -2902,7 +2924,7 @@ class kanbanModel extends model
}
if(common::hasPriv('kanban', 'setColumnWidth')) $actions .= '<li>' . html::a(helper::createLink('kanban', 'setColumnWidth', "kanbanID=$kanban->id", '', true), '<i class="icon icon-size-width"></i>' . $this->lang->kanban->columnWidth, '', "class='iframe btn btn-link' data-width=30%") . '</li>';
if(common::hasPriv('kanban', 'performable')) $actions .= '<li>' . html::a(helper::createLink('kanban', 'performable', "kanbanID=$kanban->id", '', true), '<i class="icon icon-checked"></i>' . $this->lang->kanban->doneFunction, '', "class='iframe btn btn-link' data-width=30%") . '</li>';
if(common::hasPriv('kanban', 'performable')) $actions .= '<li>' . html::a(helper::createLink('kanban', 'performable', "kanbanID=$kanban->id", '', true), '<i class="icon icon-checked"></i>' . $this->lang->kanban->manageProgress, '', "class='iframe btn btn-link' data-width=40%") . '</li>';
$kanbanActions = '';
$attr = $kanban->status == 'closed' ? "disabled='disabled'" : '';
+49
View File
@@ -0,0 +1,49 @@
<?php
/**
* The activate card file of kanban module of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Mengyi Liu <liumengyi@easycorp.ltd>
* @package kanban
* @version $Id: close.html.php 935 2021-12-09 10:49:24Z $
* @link https://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
<h2>
<span class='label label-id'><?php echo $card->id;?></span>
<?php echo "<span title='$card->name'>" . $card->name . '</span>';?>
</h2>
</div>
<form class='main-form form-ajax' method='post' enctype='multipart/form-data' id='dataform'>
<table class='table table-form'>
<tr>
<th><?php echo $lang->kanbancard->progress;?></th>
<td>
<div class='input-group'>
<?php echo html::input('progress', '', "class='form-control'");?>
<span class='input-group-addon'>%</span>
</div>
</td>
</tr>
<tr>
<th><?php echo $lang->comment;?></th>
<td colspan='2'><?php echo html::textarea('comment', '', "rows='6'");?></td>
</tr>
<tr>
<td colspan='4' class='text-center form-actions'>
<?php echo html::submitButton($lang->kanban->activateCard);?>
</td>
</tr>
</table>
</form>
<hr class='small' />
<div class='main'><?php include '../../common/view/action.html.php';?></div>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
+18 -4
View File
@@ -58,14 +58,28 @@
<th><?php echo $lang->kanbancard->end;?></th>
<td><?php echo html::input('end', helper::isZeroDate($card->end) ? '' : $card->end, "class='form-control form-date'");?></td>
</tr>
<tr>
<th><?php echo $lang->kanbancard->estimate;?></th>
<td><?php echo html::input('estimate', $card->estimate, "class='form-control' placeholder='{$lang->kanbancard->lblHour}'");?></td>
</tr>
<tr>
<th><?php echo $lang->kanbancard->pri;?></th>
<td><?php echo html::select('pri', $lang->kanbancard->priList, $card->pri, "class='form-control'");?></td>
</tr>
<tr>
<th><?php echo $lang->kanbancard->estimate;?></th>
<td>
<div class='input-group'>
<?php echo html::input('estimate', $card->estimate, "class='form-control'");?>
<span class='input-group-addon'>h</span>
</div>
</td>
</tr>
<tr>
<th><?php echo $lang->kanbancard->progress;?></th>
<td>
<div class='input-group'>
<?php echo html::input('progress', $card->progress, "class='form-control'");?>
<span class='input-group-addon'>%</span>
</div>
</td>
</tr>
</table>
</div>
</div>
+2 -2
View File
@@ -19,8 +19,8 @@
<form class='main-form form-ajax' method='post' enctype='multipart/form-data' id='dataform'>
<table class='table table-form'>
<tr>
<th id='c-done'><?php echo $lang->kanban->doneFunction;?></th>
<td><?php echo nl2br(html::radio('performable', $lang->kanban->enableFinished, $kanban->performable));?></td>
<th id='c-title'><?php echo $lang->kanban->manageProgress;?></th>
<td><?php echo nl2br(html::radio('performable', $lang->kanban->enableList, $kanban->performable));?></td>
</tr>
<tr>
<td colspan='2' class='text-center form-actions'>
+1 -5
View File
@@ -39,11 +39,7 @@ js::set('colorList', $this->config->kanban->cardColorList);
js::set('displayCards', $kanban->displayCards);
js::set('fluidBoard', $kanban->fluidBoard);
js::set('mode', $config->systemMode);
js::set('priv',
array(
'canAssignCard' => common::hasPriv('kanban', 'assigncard'),
));
js::set('priv', array('canAssignCard' => common::hasPriv('kanban', 'assigncard')));
$canSortRegion = commonModel::hasPriv('kanban', 'sortRegion') && count($regions) > 1;
$canEditRegion = commonModel::hasPriv('kanban', 'editRegion');
+4
View File
@@ -114,6 +114,10 @@
<th><?php echo $lang->kanbancard->estimate;?></th>
<td><?php echo round($card->estimate, 2) . ' ' . $lang->kanbancard->lblHour;?></td>
</tr>
<tr>
<th><?php echo $lang->kanbancard->progress;?></th>
<td><?php echo round($card->progress, 2) . ' %';?></td>
</tr>
</tbody>
</table>
</div>
+13 -1
View File
@@ -1029,9 +1029,21 @@ EOF;
}
elseif($data->mode == 'edit')
{
$response['result'] = 'success';
$response['message'] = $this->lang->saveSuccess;
$this->user->updateContactList($data->listID, $data->listName, $data->users);
$this->user->setGlobalContacts($data->listID, isset($data->share));
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('manageContacts', "listID=$listID")));
if(dao::isError())
{
$response['result'] = 'fail';
$response['message'] = dao::getError();
return $this->send($response);
}
$response['locate'] = inlink('manageContacts', "listID=$listID");
return $this->send($response);
}
}
+2 -1
View File
@@ -672,11 +672,12 @@ class projectModel extends model
$projects = $this->dao->select('id, name, path')->from(TABLE_PROJECT)
->where('type')->eq('project')
->andWhere('deleted')->eq('0')
->andWhere('vision')->eq($this->config->vision)
->beginIF($programID)->andWhere('parent')->eq($programID)->fi()
->beginIF($this->config->vision)->andWhere('vision')->eq($this->config->vision)->fi()
->beginIF($model != 'all')->andWhere('model')->eq($model)->fi()
->beginIF(strpos($param, 'noclosed') !== false)->andWhere('status')->ne('closed')->fi()
->andWhere('deleted')->eq('0')
->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->projects)->fi()
->orderBy('id_desc')
->fetchAll();
+2
View File
@@ -31,6 +31,8 @@ class score extends control
*/
public function rule()
{
$this->app->loadLang('my');
$this->view->title = $this->lang->my->scoreRule;
$this->view->position[] = $this->lang->my->scoreRule;
$this->display();
+1 -1
View File
@@ -54,7 +54,7 @@
<tbody>
<?php foreach ($sonarqubeIssueList as $id => $sonarqubeIssue): ?>
<tr class='text'>
<td class='text' title="<?php echo $sonarqubeIssue->message;?>"><?php echo html::a(trim($sonarqube->url, '/') . '/issues?open=' . $sonarqubeIssue->key, $sonarqubeIssue->message, '_target');?></td>
<td class='text' title="<?php echo $sonarqubeIssue->message;?>"><?php echo html::a(trim($sonarqube->url, '/') . "/project/issues?id=$projectKey&issues={$sonarqubeIssue->key}&open={$sonarqubeIssue->key}", $sonarqubeIssue->message, '_target');?></td>
<td class='text' title='<?php echo $sonarqubeIssue->severity;?>'><?php echo $sonarqubeIssue->severity;?></td>
<td class='text' title='<?php echo $sonarqubeIssue->type;?>'><?php echo $sonarqubeIssue->type;?></td>
<td class='text' title='<?php echo $sonarqubeIssue->status;?>'><?php echo $sonarqubeIssue->status;?></td>
+4 -1
View File
@@ -24,7 +24,10 @@ class storyModel extends model
*/
public function getById($storyID, $version = 0, $setImgSize = false)
{
$story = $this->dao->findById((int)$storyID)->from(TABLE_STORY)->fetch();
$story = $this->dao->select('*')->from(TABLE_STORY)
->where('id')->eq($storyID)
->andWhere('vision')->eq($this->config->vision)
->fetch();
if(!$story) return false;
if(substr($story->closedDate, 0, 4) == '0000') $story->closedDate = '';
if($version == 0) $version = $story->version;
+22
View File
@@ -0,0 +1,22 @@
/* Set the story module. */
function setStoryModule()
{
var storyID = $('#story').val();
if(storyID)
{
var link = createLink('story', 'ajaxGetInfo', 'storyID=' + storyID);
$.getJSON(link, function(storyInfo)
{
if(storyInfo)
{
$('#module').val(storyInfo.moduleID);
$("#module").trigger("chosen:updated");
$('#storyEstimate').val(storyInfo.estimate);
$('#storyPri').val(storyInfo.pri);
$('#storyDesc').val(storyInfo.spec);
}
});
}
}
-22
View File
@@ -169,28 +169,6 @@ function setStoryRelated()
setStoryModule();
}
/* Set the story module. */
function setStoryModule()
{
var storyID = $('#story').val();
if(storyID)
{
var link = createLink('story', 'ajaxGetInfo', 'storyID=' + storyID);
$.getJSON(link, function(storyInfo)
{
if(storyInfo)
{
$('#module').val(storyInfo.moduleID);
$("#module").trigger("chosen:updated");
$('#storyEstimate').val(storyInfo.estimate);
$('#storyPri' ).val(storyInfo.pri);
$('#storyDesc' ).val(storyInfo.spec);
}
});
}
}
/* Set the story priview link. */
function setPreview()
{
+1
View File
@@ -1980,6 +1980,7 @@ class taskModel extends model
->leftJoin(TABLE_USER)->alias('t3')
->on('t1.assignedTo = t3.account')
->where('t1.id')->eq((int)$taskID)
->andWhere('t1.vision')->eq($this->config->vision)
->fetch();
if(!$task) return false;
+1 -1
View File
@@ -203,7 +203,7 @@ class testcase extends control
$this->view->productID = $productID;
$this->view->product = $product;
$this->view->productName = $this->products[$productID];
$this->view->modules = $this->tree->getOptionMenu($productID, $viewType = 'case', $startModuleID = 0, $branch);
$this->view->modules = $this->tree->getOptionMenu($productID, $viewType = 'case', $startModuleID = 0, $branch == 'all' ? '0' : $branch);
$this->view->moduleTree = $moduleTree;
$this->view->moduleName = $moduleID ? $tree->name : $this->lang->tree->all;
$this->view->moduleID = $moduleID;
+30 -19
View File
@@ -92,14 +92,14 @@ class upgradeModel extends model
$versions = $this->getVersionsToUpdate($fromOpenVersion, $fromEdition);
foreach($versions as $openVersion => $chargedVersions)
{
$executeXuanxuan = false;
$executedXuanxuan = false;
/* Execute open. */
if(str_replace('_', '.', $openVersion) == '10.1') $executeXuanxuan = true;
if(str_replace('_', '.', $openVersion) == '10.1') $executedXuanxuan = true;
$this->saveLogs("Execute $openVersion");
$this->execSQL($this->getUpgradeFile(str_replace('_', '.', $openVersion)));
$this->executeOpen($openVersion, $fromVersion, $executeXuanxuan);
$this->executeOpen($openVersion, $fromVersion, $executedXuanxuan);
/* Execute pro. */
foreach($chargedVersions['pro'] as $proVersion)
@@ -114,7 +114,7 @@ class upgradeModel extends model
{
$this->saveLogs("Execute $bizVersion");
$this->execSQL($this->getUpgradeFile(str_replace('_', '.', $bizVersion)));
$this->executeBiz($bizVersion, $executeXuanxuan);
$this->executeBiz($bizVersion, $executedXuanxuan);
}
/* Execute max. */
@@ -143,11 +143,11 @@ class upgradeModel extends model
*
* @param string $openVersion
* @param string $fromVersion
* @param bool $executeXuanxuan
* @param bool $executedXuanxuan
* @access public
* @return void
*/
public function executeOpen($openVersion, $fromVersion, $executeXuanxuan)
public function executeOpen($openVersion, $fromVersion, $executedXuanxuan)
{
switch($openVersion)
{
@@ -277,7 +277,7 @@ class upgradeModel extends model
case '10_1':
$xuanxuanSql = $this->app->getAppRoot() . 'db' . DS . 'xuanxuan.sql';
$this->execSQL($xuanxuanSql);
$executeXuanxuan = true;
$executedXuanxuan = true;
case '10_3_1':
$this->removeCustomMenu();
break;
@@ -285,7 +285,7 @@ class upgradeModel extends model
$this->changeTaskParentValue();
break;
case '10_6':
if(!$executeXuanxuan)
if(!$executedXuanxuan)
{
$this->saveLogs('Execute 10_6');
$xuanxuanSql = $this->app->getAppRoot() . 'db' . DS . 'upgradexuanxuan2.1.0.sql';
@@ -298,7 +298,7 @@ class upgradeModel extends model
case '11_1':
if(empty($this->config->isINT))
{
if(!$executeXuanxuan)
if(!$executedXuanxuan)
{
$xuanxuanSql = $this->app->getAppRoot() . 'db' . DS . 'upgradexuanxuan2.3.0.sql';
$this->execSQL($xuanxuanSql);
@@ -317,7 +317,7 @@ class upgradeModel extends model
$this->addPriv11_5();
if(empty($this->config->isINT))
{
if(!$executeXuanxuan)
if(!$executedXuanxuan)
{
$xuanxuanSql = $this->app->getAppRoot() . 'db' . DS . 'upgradexuanxuan2.4.0.sql';
$this->execSQL($xuanxuanSql);
@@ -343,7 +343,7 @@ class upgradeModel extends model
if(empty($this->config->isINT))
{
if(!$executeXuanxuan)
if(!$executedXuanxuan)
{
$xuanxuanSql = $this->app->getAppRoot() . 'db' . DS . 'upgradexuanxuan2.5.7.sql';
$this->execSQL($xuanxuanSql);
@@ -363,7 +363,7 @@ class upgradeModel extends model
case '12_1':
if(empty($this->config->isINT))
{
if(!$executeXuanxuan)
if(!$executedXuanxuan)
{
$xuanxuanSql = $this->app->getAppRoot() . 'db' . DS . 'upgradexuanxuan3.1.1.sql';
$this->execSQL($xuanxuanSql);
@@ -392,7 +392,7 @@ class upgradeModel extends model
case '15_0_rc3':
if(empty($this->config->isINT))
{
if(!$executeXuanxuan)
if(!$executedXuanxuan)
{
$xuanxuanSql = $this->app->getAppRoot() . 'db' . DS . 'upgradexuanxuan3.3.sql';
$this->execSQL($xuanxuanSql);
@@ -431,7 +431,7 @@ class upgradeModel extends model
case '15_4':
if(empty($this->config->isINT))
{
if(!$executeXuanxuan)
if(!$executedXuanxuan)
{
$xuanxuanSql = $this->app->getAppRoot() . 'db' . DS . 'upgradexuanxuan4.2.sql';
$this->execSQL($xuanxuanSql);
@@ -469,6 +469,17 @@ class upgradeModel extends model
{
$xuanxuanSql = $this->app->getAppRoot() . 'db' . DS . 'xuanxuan.sql';
$this->execSQL($xuanxuanSql);
$executedXuanxuan = true;
}
else
{
if(!$executedXuanxuan)
{
$xuanxuanSql = $this->app->getAppRoot() . 'db' . DS . 'upgradexuanxuan4.6.sql';
$this->execSQL($xuanxuanSql);
$xuanxuanSql = $this->app->getAppRoot() . 'db' . DS . 'upgradexuanxuan5.1.sql';
$this->execSQL($xuanxuanSql);
}
}
if($fromVersion[0] == 'p') break;
@@ -522,11 +533,11 @@ class upgradeModel extends model
* Process data for biz.
*
* @param int $bizVersion
* @param bool $executeXuanxuan
* @param bool $executedXuanxuan
* @access public
* @return void
*/
public function executeBiz($bizVersion, $executeXuanxuan)
public function executeBiz($bizVersion, $executedXuanxuan)
{
switch($bizVersion)
{
@@ -534,7 +545,7 @@ class upgradeModel extends model
$this->adjustFeedbackViewData();
break;
case 'biz3_0':
if(!empty($this->config->isINT) and !$executeXuanxuan)
if(!empty($this->config->isINT) and !$executedXuanxuan)
{
$xuanxuanSql = $this->app->getAppRoot() . 'db' . DS . 'upgradexuanxuan2.3.0.sql';
$this->execSQL($xuanxuanSql);
@@ -545,7 +556,7 @@ class upgradeModel extends model
case 'biz3_2_1':
if(!empty($this->config->isINT))
{
if(!$executeXuanxuan)
if(!$executedXuanxuan)
{
$xuanxuanSql = $this->app->getAppRoot() . 'db' . DS . 'upgradexuanxuan2.4.0.sql';
$this->execSQL($xuanxuanSql);
@@ -573,7 +584,7 @@ class upgradeModel extends model
$this->processWorkflowLayout();
$this->processWorkflowLabel();
$this->processWorkflowCondition();
if(!empty($this->config->isINT) and !$executeXuanxuan)
if(!empty($this->config->isINT) and !$executedXuanxuan)
{
$xuanxuanSql = $this->app->getAppRoot() . 'db' . DS . 'upgradexuanxuan3.1.1.sql';
$this->execSQL($xuanxuanSql);
+1 -1
View File
@@ -48,7 +48,7 @@
<script>
$(function()
{
$.get('<?php echo inlink('afterExec', "fromVersion=$fromVersion&processed=yes")?>');
$.get('<?php echo inlink('afterExec', "fromVersion=$fromVersion&processed=yes&skipMoveFile=yes")?>');
})
<?php
+21
View File
@@ -1286,6 +1286,27 @@ class user extends control
echo json_encode($newUsers);
}
/**
* Ajax get group by vision.
*
* @param string $visions rnd|lite
* @param int $i
* @param string $selected
* @access public
* @return string
*/
public function ajaxGetGroup($visions, $i = 0, $selected = '')
{
$visions = explode(',', $visions);
$groupList = $this->user->getGroupsByVisions($visions);
if($i)
{
if($i > 1) $groupList = $groupList + array('ditto' => $this->lang->user->ditto);
return print(html::select("group[$i][]", $groupList, $selected, 'size=3 multiple=multiple class="form-control chosen"'));
}
return print(html::select('group[]', $groupList, $selected, 'size=3 multiple=multiple class="form-control chosen"'));
}
/**
* Refresh random for login
*
+46 -1
View File
@@ -75,9 +75,54 @@ $(document).on('click', '.chosen-with-drop', function()
$(document).on('change', '[id^=visions]', function()
{
if($.inArray('ditto', $(this).val()) > 0)
if($.inArray('ditto', $(this).val()) >= 0)
{
$(this).val('ditto');
$(this).trigger("chosen:updated");
}
})
$('select[id^="visions"]').each(function()
{
var i = $(this).attr('id').replace(/[^0-9]/ig, '');
var vision = $('#visions1 option:selected').val();
$.post(createLink('user', 'ajaxGetGroup', "visions=" + vision + '&i=' + i + '&selected=' + $('#group' + i).val()), function(data)
{
$('#group' + i).replaceWith(data);
$('#group' + i + '_chosen').remove();
$('#group' + i).chosen();
})
})
$(document).on('change', "select[id^='visions']", function()
{
var i = parseInt($(this).attr('id').replace(/[^0-9]/ig, ''));
var visions = $('select[id="visions' + i + '"]').val();
var groups = $('#group' + i).val();
if($.inArray('ditto', groups) >= 0) groups = '';
$.post(createLink('user', 'ajaxGetGroup', "visions=" + visions + '&i=' + i + '&selected=' + groups), function(data)
{
$('#group' + i).replaceWith(data);
$('#group' + i + '_chosen').remove();
$('#group' + i).chosen();
})
for(n = i + 1; n <= batchCreateCount; n++)
{
if(n == i) continue;
if($.inArray('ditto', $('select[id="visions' + n + '"]').val()) < 0) break;
((function(n)
{
$.post(createLink('user', 'ajaxGetGroup', "visions=" + visions + '&i=' + n + '&selected=' + $('#group' + n).val()), function(data)
{
$('#group' + n).replaceWith(data);
$('#group' + n + '_chosen').remove();
$('#group' + n).chosen();
})
}(n)));
}
});
+13
View File
@@ -21,3 +21,16 @@ $(document).on('change', 'select', function()
$(this).trigger("change");
}
})
$('select[id^="visions"]').each(function()
{
var i = $(this).attr('id').replace(/[^0-9]/ig, '');
var vision = $('#visions1 option:selected').val();
$.post(createLink('user', 'ajaxGetGroup', "visions=" + vision + '&i=' + i + '&selected=' + $('#group' + i).val()), function(data)
{
$('#group' + i).replaceWith(data);
$('#group' + i + '_chosen').remove();
$('#group' + i).chosen();
})
})
+26 -2
View File
@@ -1,5 +1,7 @@
$(function()
{
changeVision();
$("input[name='new[]']").change(function()
{
if($(this).prop('checked'))
@@ -19,6 +21,28 @@ $(function()
})
})
$("input[name='visions[]']").change(function()
{
changeVision();
});
function changeVision()
{
var visions = [];
$('input[name="visions[]"]:checked').each(function()
{
visions.push($(this).val());
});
var link = createLink('user', 'ajaxGetGroup', 'visions=' + visions + '&i=0&selected=' + $('#group').val());
$.post(link, function(data)
{
$('#group').replaceWith(data);
$('#group_chosen').remove();
$('#group').chosen();
})
}
/**
* Change group when change role.
*
@@ -30,11 +54,11 @@ function changeGroup(role)
{
if(role && roleGroup[role])
{
$('#group').val(roleGroup[role]);
$('#group').val(roleGroup[role]);
}
else
{
$('#group').val('');
$('#group').val('');
}
$('#group').trigger("chosen:updated");
}
+16
View File
@@ -39,6 +39,7 @@ $(function()
})
changeType(type);
$('#visions').change();
});
/**
@@ -63,3 +64,18 @@ function changeType(type)
$('#dept, #commiter').closest('tr').addClass('hide');
}
}
var groups = $('#groups').val();
$(document).on('change', '#groups', function(){groups = $('#groups').val()});
$("#visions").change(function()
{
visions = $(this).val();
$.post(createLink('user', 'ajaxGetGroup', "visions=" + visions + '&i=' + 0 + '&selected=' + groups), function(data)
{
$('#groups').replaceWith(data);
$('#groups' + '_chosen').remove();
$('#group').attr('id', 'groups').attr('name', 'groups[]');
$('#groups').chosen();
});
});
+48 -14
View File
@@ -351,12 +351,17 @@ class userModel extends model
if(!dao::isError())
{
$userID = $this->dao->lastInsertID();
if($this->post->group)
/* Set usergroup for account. */
if(isset($_POST['group']))
{
$data = new stdClass();
$data->account = $this->post->account;
$data->group = $this->post->group;
$this->dao->insert(TABLE_USERGROUP)->data($data)->exec();
foreach($this->post->group as $groupID)
{
$data = new stdclass();
$data->account = $this->post->account;
$data->group = $groupID;
$this->dao->insert(TABLE_USERGROUP)->data($data)->exec();
}
}
$this->computeUserView($user->account);
@@ -382,7 +387,7 @@ class userModel extends model
$users = fixer::input('post')->get();
$data = array();
$accounts = array();
for($i = 0; $i < $this->config->user->batchCreate; $i++)
for($i = 1; $i < $this->config->user->batchCreate; $i++)
{
$users->account[$i] = trim($users->account[$i]);
if($users->account[$i] != '')
@@ -414,7 +419,7 @@ class userModel extends model
$data[$i]->type = 'inside';
$data[$i]->realname = $users->realname[$i];
$data[$i]->role = $role;
$data[$i]->group = $users->group[$i] == 'ditto' ? (isset($prev['group']) ? $prev['group'] : '') : $users->group[$i];
$data[$i]->group = in_array('ditto', $users->group[$i]) ? (isset($prev['group']) ? $prev['group'] : '') : $users->group[$i];
$data[$i]->email = $users->email[$i];
$data[$i]->gender = $users->gender[$i];
$data[$i]->password = md5(trim($users->password[$i]));
@@ -470,12 +475,15 @@ class userModel extends model
$userIDList = array();
foreach($data as $user)
{
if($user->group)
if(is_array($user->group))
{
$group = new stdClass();
$group->account = $user->account;
$group->group = $user->group;
$this->dao->replace(TABLE_USERGROUP)->data($group)->exec();
foreach($user->group as $group)
{
$groups = new stdClass();
$groups->account = $user->account;
$groups->group = $group;
$this->dao->insert(TABLE_USERGROUP)->data($groups)->exec();
}
}
unset($user->group);
$this->dao->insert(TABLE_USER)->data($user)->autoCheck()->exec();
@@ -1113,6 +1121,32 @@ class userModel extends model
return $this->dao->findByAccount($account)->from(TABLE_USERGROUP)->fields('`group`')->fetchPairs();
}
/**
* Get groups by visions.
*
* @param array $visions
* @access public
* @return array
*/
public function getGroupsByVisions($visions)
{
if(!is_array($visions)) return array();
$groups = $this->dao->select('id, name, vision')->from(TABLE_GROUP)
->where('project')->eq(0)
->andWhere('vision')->in($visions)
->fetchAll('id');
$visionList = $this->getVisionList();
foreach($groups as $key => $group)
{
$groups[$key] = $group->name;
if(count($visions) > 1) $groups[$key] = $visionList[$group->vision] . ' / ' . $group->name;
}
return $groups;
}
/**
* Get the project or execution in which the user participates..
*
@@ -1444,13 +1478,13 @@ class userModel extends model
if(empty($data->listName))
{
dao::$errors['listName'][] = sprintf($this->lang->error->notempty, $this->lang->user->contacts->listName);
return print(js::error(dao::getError()));
return false;
}
$this->dao->update(TABLE_USERCONTACT)->data($data)
->where('id')->eq($listID)
->exec();
if(dao::isError()) return print(js::error(dao::getError()));
if(dao::isError()) return false;
}
/**
+8 -7
View File
@@ -74,18 +74,18 @@
<?php $lang->user->roleList = $lang->user->roleList + array('ditto' => $lang->user->ditto)?>
<?php $groupList = $groupList + array('ditto' => $lang->user->ditto);?>
<?php $visionList = $visionList + array('ditto' => $lang->user->ditto);?>
<?php for($i = 0; $i < $config->user->batchCreate; $i++):?>
<?php for($i = 1; $i <= $config->user->batchCreate; $i++):?>
<tr class='text-center'>
<td><?php echo $i + 1;?></td>
<td class='text-left<?php echo zget($visibleFields, 'dept', ' hidden')?>' style='overflow:visible'><?php echo html::select("dept[$i]", $depts, $i > 0 ? 'ditto' : $deptID, "class='form-control chosen'");?></td>
<td><?php echo $i;?></td>
<td class='text-left<?php echo zget($visibleFields, 'dept', ' hidden')?>' style='overflow:visible'><?php echo html::select("dept[$i]", $depts, $i > 1 ? 'ditto' : $deptID, "class='form-control chosen'");?></td>
<td><?php echo html::input("account[$i]", '', "class='form-control account_$i' onchange='changeEmail($i)'");?></td>
<td><?php echo html::input("realname[$i]", '', "class='form-control'");?></td>
<td class="<?php echo $config->systemMode == 'new' ? 'text-left' : 'text-center';?>" style='overflow:visible'>
<?php if($config->systemMode == 'new') echo html::select("visions[$i][]", $visionList, $i > 0 ? 'ditto' : (isset($visionList[$this->config->vision]) ? $this->config->vision : key($visionList)), "class='form-control chosen' multiple");?>
<?php if($config->systemMode == 'new') echo html::select("visions[$i][]", $visionList, $i > 1 ? 'ditto' : (isset($visionList[$this->config->vision]) ? $this->config->vision : key($visionList)), "class='form-control chosen' multiple");?>
<?php if($config->systemMode == 'classic') echo $visionList['rnd'] . html::hidden("visions[$i][]", 'rnd');?>
</td>
<td><?php echo html::select("role[$i]", $lang->user->roleList, $i > 0 ? 'ditto' : '', "class='form-control' onchange='changeGroup(this.value, $i)'");?></td>
<td class='text-left' style='overflow:visible'><?php echo html::select("group[$i]", $groupList, $i > 0 ? 'ditto' : '', "class='form-control chosen'");?></td>
<td><?php echo html::select("role[$i]", $lang->user->roleList, $i > 1 ? 'ditto' : '', "class='form-control' onchange='changeGroup(this.value, $i)'");?></td>
<td class='text-left' style='overflow:visible'><?php echo html::select("group[$i][]", $groupList, $i > 1 ? 'ditto' : '', "class='form-control chosen' multiple");?></td>
<td <?php echo zget($visibleFields, 'email', "class='hidden'")?>><?php echo html::input("email[$i]", '', "class='form-control email_$i' onchange='setDefaultEmail($i)'");?></td>
<td <?php echo zget($visibleFields, 'gender', "class='hidden'")?>><?php echo html::radio("gender[$i]", (array)$lang->user->genderList, 'm');?></td>
<td align='left'>
@@ -93,7 +93,7 @@
<?php
echo html::input("password[$i]", '', "class='form-control' onkeyup='toggleCheck(this, $i)'");
echo "<span class='input-group-addon passwordStrength'></span>";
if($i != 0) echo "<span class='input-group-addon passwordBox'><input type='checkbox' name='ditto[$i]' id='ditto$i' " . ($i> 0 ? "checked" : '') . " /> {$lang->user->ditto}</span>";
if($i != 1) echo "<span class='input-group-addon passwordBox'><input type='checkbox' name='ditto[$i]' id='ditto$i' " . ($i > 1 ? "checked" : '') . " /> {$lang->user->ditto}</span>";
?>
</div>
</td>
@@ -134,4 +134,5 @@
</div>
<?php echo html::hidden('verifyRand', $rand);?>
<?php js::set('passwordStrengthList', $lang->user->passwordStrengthList)?>
<?php js::set('batchCreateCount', $config->user->batchCreate)?>
<?php include '../../common/view/footer.html.php';?>
+1 -1
View File
@@ -81,7 +81,7 @@
<?php if(common::hasPriv('group', 'managemember')):?>
<tr>
<th><?php echo $lang->user->group;?></th>
<td><?php echo html::select('group', $groupList, '', "class='form-control chosen'");?></td>
<td><?php echo html::select('group[]', $groupList, '', "multiple=multiple class='form-control chosen'");?></td>
<td><?php echo $lang->user->placeholder->group?></td>
</tr>
<?php endif;?>
+116 -2
View File
@@ -814,7 +814,7 @@ class executionTest
}
}
public function getTeamSkipTest($taskID, $begin, $end, $count)
public function getTeamSkipTest($taskID, $begin, $end)
{
global $tester;
$teams = $tester->dao->select('*')->from(TABLE_TEAM)->where('root')->eq($taskID)->andWhere('type')->eq('task')->orderBy('order')->fetchAll('account');
@@ -824,13 +824,127 @@ class executionTest
$error = dao::getError();
return $error;
}
else
{
if(empty($object))
{
return '无跳转数据';
}
else
{
return $object;
}
}
}
public function getTeams2ImportTest($account, $currentExecution, $count)
{
$object = $this->objectModel->getTeams2Import($account, $currentExecution);
if(dao::isError())
{
$error = dao::getError();
return $error;
}
elseif($count == "1")
{
return count($object);
}
else
{
return $object;
if(empty($object))
{
return '无数据';
}
else
{
return $object;
}
}
}
public function getMembers2ImportTest($execution, $currentMembers, $count)
{
$object = $this->objectModel->getMembers2Import($execution, $currentMembers);
if(dao::isError())
{
$error = dao::getError();
return $error;
}
elseif($count == "1")
{
return count($object);
}
else
{
if(empty($object))
{
return '无数据';
}
else
{
return $object;
}
}
}
public function getCanCopyObjectsTest($projectID = 0, $count)
{
$object = $this->objectModel->getCanCopyObjects($projectID);
if(dao::isError())
{
$error = dao::getError();
return $error;
}
elseif($count == "1")
{
return count($object);
}
else
{
if(empty($object))
{
return '无数据';
}
else
{
return $object;
}
}
}
public function manageMembersTest($executionID, $count, $param = array())
{
$realnames = array();
$roles = array();
$days = array();
$hours = array();
$accounts = array();
$limited = array();
$createFields = array('realnames' => $realnames, 'roles' => $roles, 'hours' => $hours, 'accounts' => $accounts,
'limited' => $limited, 'days' => $days);
foreach($createFields as $field => $defaultValue) $_POST[$field] = $defaultValue;
foreach($param as $key => $value) $_POST[$key] = $value;
$object = $this->objectModel->manageMembers($executionID);
unset($_POST);
if(dao::isError())
{
$error = dao::getError();
return $error;
}
elseif($count == "1")
{
return count($object);
}
else
{
if(empty($object))
{
return '无数据';
}
else
{
return $object;
}
}
}
}
+43
View File
@@ -622,4 +622,47 @@ class taskTest
return !empty($team) ? $result : $object;
}
}
public function getParentTaskPairsTest($executionID, $append = '')
{
$objectList = $this->objectModel->getParentTaskPairs($executionID, $append);
$objectList = count($objectList) == 1 ? array('name' => 0): $objectList;
if(dao::isError())
{
return dao::getError();
}
else
{
return $objectList;
}
}
public function processTaskTest($task)
{
$object = $this->objectModel->processTask($task);
if(dao::isError())
{
return dao::getError();
}
else
{
return $object;
}
}
public function processTasksTest($tasks)
{
$object = $this->objectModel->processTasks($tasks);
if(dao::isError())
{
return dao::getError();
}
else
{
return $object;
}
}
}
+1 -1
View File
@@ -34,7 +34,7 @@ fields:
format: ""
- field: account
note: "操作账号"
range: "admin"
range: po82{1},admin{1111111}
prefix: ""
postfix: ""
loop: 0
+2 -2
View File
@@ -28,9 +28,9 @@ fields:
note: "用户账号"
fields:
- field: account1
range: po,user,admin
range: po,user,user,po
- field: account2
range: 82,92,''
range: 82,92,92,82
prefix: ""
postfix: ""
loop: 0
+1
View File
@@ -154,6 +154,7 @@ class Processor
$parentID = implode(',', $parentIDList);
$this->dao->update(TABLE_TASK)->set('parent')->eq(-1)->where('id')->in($parentID)->andWhere('deleted')->eq(0)->exec();
$this->dao->update(TABLE_TASK)->set('assignedTo')->eq('po82')->where('id')->eq(1)->andWhere('deleted')->eq(0)->exec();
}
/**
+31
View File
@@ -0,0 +1,31 @@
#!/usr/bin/env php
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/execution.class.php';
su('admin');
/**
title=测试executionModel->getCanCopyObjectsTest();
cid=1
pid=1
敏捷执行关联用例 >> 101,1,1
瀑布执行关联用例 >> 131,43,169
看板执行关联用例 >> 161,68,269
敏捷执行关联用例统计 >> 4
瀑布执行关联用例统计 >> 4
看板执行关联用例统计 >> 4
*/
$projectIDList = array('11', '45', '71');
$count = array('0','1');
$execution = new executionTest();
r($execution->getCanCopyObjectsTest($projectIDList[0], $count[0])) && p('101') && e('迭代1'); // 敏捷项目数据查询
r($execution->getCanCopyObjectsTest($projectIDList[1], $count[0])) && p('135') && e('阶段35'); // 瀑布项目数据查询
r($execution->getCanCopyObjectsTest($projectIDList[2], $count[0])) && p('161') && e('看板61'); // 看板项目数据查询
r($execution->getCanCopyObjectsTest($projectIDList[0], $count[1])) && p() && e('8'); // 敏捷项目数据统计
r($execution->getCanCopyObjectsTest($projectIDList[1], $count[1])) && p() && e('9'); // 瀑布项目数据统计
r($execution->getCanCopyObjectsTest($projectIDList[2], $count[1])) && p() && e('7'); // 看板项目数据统计
+30
View File
@@ -0,0 +1,30 @@
#!/usr/bin/env php
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/execution.class.php';
su('admin');
/**
title=测试executionModel->getMembers2ImportTest();
cid=1
pid=1
敏捷执行关联用例 >> 101,1,1
瀑布执行关联用例 >> 131,43,169
看板执行关联用例 >> 161,68,269
敏捷执行关联用例统计 >> 4
瀑布执行关联用例统计 >> 4
看板执行关联用例统计 >> 4
*/
$executionID = '101';
$accountList = array('test7', 'test82');
$allAccountList = array('test82', 'po82', 'user92');
$count = array('0','1');
$execution = new executionTest();
r($execution->getMembers2ImportTest($executionID, $accountList, $count[0])) && p('po82:account,role') && e('po82,研发'); // 正常数据查询
r($execution->getMembers2ImportTest($executionID, $allAccountList, $count[0])) && p() && e('无数据'); // 无效数据查询
r($execution->getMembers2ImportTest($executionID, $accountList, $count[1])) && p() && e('2'); // 正常数据查询统计
+6 -9
View File
@@ -19,14 +19,11 @@ pid=1
*/
$teamList = array('test2', 'test12', 'test15');
$begin = 'test2';
$end = 'test17';
$count = array('0','1');
$taskID = 901;
$begin = 'admin';
$end = 'user92';
$execution = new executionTest();
var_dump($execution->getTeamSkipTest($teamList, $teamList[0], $end, $count[0]));die;
r($execution->getTeamSkipTest($teamList, $begin, $end, $count[0])) && p('0:root,account,realname') && e('101,po82,研发主管82');// 批量查询敏捷执行team
r($execution->getTeamSkipTest($executionIDList, $count[0])[$executionIDList[1]]) && p('0:root,account,realname') && e('131,test22,开发22'); // 批量查询瀑布执行team
r($execution->getTeamSkipTest($executionIDList, $count[0])[$executionIDList[2]]) && p('0:root,account,realname') && e('161,test52,开发52'); // 批量查询看板执行team
r($execution->getTeamSkipTest($executionIDList, $count[1])) && p() && e('3'); // 批量查询执行team统计
r($execution->getTeamSkipTest($taskID, $begin, $end)) && p('admin:root,account,role') && e('901,admin,研发'); // 正常跳过
r($execution->getTeamSkipTest($taskID, $begin, $begin)) && p() && e('无跳转数据'); // begin与end一致
r($execution->getTeamSkipTest($taskID, $end, $end)) && p() && e('无跳转数据'); // end与begin一致
+29
View File
@@ -0,0 +1,29 @@
#!/usr/bin/env php
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/execution.class.php';
su('admin');
/**
title=测试executionModel->getTeams2ImportTest();
cid=1
pid=1
敏捷执行关联用例 >> 101,1,1
瀑布执行关联用例 >> 131,43,169
看板执行关联用例 >> 161,68,269
敏捷执行关联用例统计 >> 4
瀑布执行关联用例统计 >> 4
看板执行关联用例统计 >> 4
*/
$executionID = '101';
$accountList = array('test7', 'test82');
$count = array('0','1');
$execution = new executionTest();
r($execution->getTeams2ImportTest($accountList[0], $executionID, $count[0])) && p() && e('无数据'); // 无效数据查询
r($execution->getTeams2ImportTest($accountList[1], $executionID, $count[0])) && p('191') && e('迭代91'); // 正常数据查询
r($execution->getTeams2ImportTest($accountList[1], $executionID, $count[1])) && p() && e('1'); // 正常数据查询统计
+8 -8
View File
@@ -10,7 +10,7 @@ title=taskModel->assign();
cid=1
pid=1
wite状态任务指派 >> assignedTo,,user92
wite状态任务指派 >> assignedTo,po82,user92
doing状态任务指派 >> assignedTo,,user93
done状态任务指派 >> assignedTo,,user94
pause状态任务指派 >> assignedTo,,user95
@@ -29,10 +29,10 @@ $cancelTask = array('assignedTo' => 'user96','status' => 'cancel');
$closedTask = array('assignedTo' => 'user97','status' => 'closed');
$task = new taskTest();
r($task->assignTest($taskIDlist[0],$waitTask)) && p('0:field,old,new') && e('assignedTo,,user92'); // wite状态任务指派
r($task->assignTest($taskIDlist[1],$doingTask)) && p('0:field,old,new') && e('assignedTo,,user93'); // doing状态任务指派
r($task->assignTest($taskIDlist[2],$doneTask)) && p('0:field,old,new') && e('assignedTo,,user94'); // done状态任务指派
r($task->assignTest($taskIDlist[3],$pauseTask)) && p('0:field,old,new') && e('assignedTo,,user95'); // pause状态任务指派
r($task->assignTest($taskIDlist[4],$cancelTask)) && p('0:field,old,new') && e('assignedTo,,user96'); // cancel状态任务指派
r($task->assignTest($taskIDlist[5],$closedTask)) && p('0:field,old,new') && e('assignedTo,,user97'); // closed状态任务指派
system("./ztest init");
r($task->assignTest($taskIDlist[0],$waitTask)) && p('0:field,old,new') && e('assignedTo,po82,user92'); // wite状态任务指派
r($task->assignTest($taskIDlist[1],$doingTask)) && p('0:field,old,new') && e('assignedTo,,user93'); // doing状态任务指派
r($task->assignTest($taskIDlist[2],$doneTask)) && p('0:field,old,new') && e('assignedTo,,user94'); // done状态任务指派
r($task->assignTest($taskIDlist[3],$pauseTask)) && p('0:field,old,new') && e('assignedTo,,user95'); // pause状态任务指派
r($task->assignTest($taskIDlist[4],$cancelTask)) && p('0:field,old,new') && e('assignedTo,,user96'); // cancel状态任务指派
r($task->assignTest($taskIDlist[5],$closedTask)) && p('0:field,old,new') && e('assignedTo,,user97'); // closed状态任务指派
system("./ztest init");
+5 -5
View File
@@ -10,8 +10,8 @@ title=taskModel->computeBeginAndEnd();
cid=1
pid=1
根据taskID计算没有父计划的开始结束时间 >> 1,2022-03-09,0000-00-00 00:00:00,2022-03-16
根据taskID计算有父计划的父开始结束时间 >> 601,,0000-00-00 00:00:00,2022-03-02
根据taskID计算没有父计划的开始结束时间 >> 1,2022-03-11,0000-00-00 00:00:00,2022-03-18
根据taskID计算有父计划的父开始结束时间 >> 601,,0000-00-00 00:00:00,2022-03-04
根据不存在的taskID计划开始结束时间 >> 0
*/
@@ -19,7 +19,7 @@ pid=1
$taskIDList = array('1', '901', '100001');
$task = new taskTest();
r($task->computeBeginAndEndTest($taskIDList[0])) && p('id,estStarted,realStarted,deadline') && e('1,2022-03-09,0000-00-00 00:00:00,2022-03-16'); //根据taskID计算没有父计划的开始结束时间
r($task->computeBeginAndEndTest($taskIDList[1])) && p('id,estStarted,realStarted,deadline') && e('601,,0000-00-00 00:00:00,2022-03-02'); //根据taskID计算有父计划的父开始结束时间
r($task->computeBeginAndEndTest($taskIDList[2])) && p('id,estStarted,realStarted,deadline') && e('0'); //根据不存在的taskID计算开始结束时间
r($task->computeBeginAndEndTest($taskIDList[0])) && p('id,estStarted,realStarted,deadline') && e('1,2022-03-11,0000-00-00 00:00:00,2022-03-18'); //根据taskID计算没有父计划的开始结束时间
r($task->computeBeginAndEndTest($taskIDList[1])) && p('id,estStarted,realStarted,deadline') && e('601,,0000-00-00 00:00:00,2022-03-04'); //根据taskID计算有父计划的父开始结束时间
r($task->computeBeginAndEndTest($taskIDList[2])) && p('id,estStarted,realStarted,deadline') && e('0'); //根据不存在的taskID计算开始结束时间
system("./ztest init");
+2 -2
View File
@@ -80,12 +80,12 @@ $user1->consumed = 1;
$user1->left = 1;
$user2 = new stdclass();
$user2->account = 'user93';
$user2->account = 'user92';
$user2->estimate = 2;
$user2->consumed = 2;
$user2->left = 2;
$team = array('po82' => $user1, 'user93' => $user2);
$team = array('po82' => $user1, 'user92' => $user2);
$autoStatusList = array(true, false);
+1 -1
View File
@@ -20,6 +20,6 @@ $taskIDList = array('1', '601', '100001');
$task = new taskTest();
r($task->computeWorkingHoursTest($taskIDList[0])) && p('id,estimate,consumed,left') && e('1,0,3,0'); //根据taskID计算没有子任务的计划工时
r($task->computeWorkingHoursTest($taskIDList[1])) && p('id,estimate,consumed,left') && e('601,18,31,13'); //根据taskID计算有父任务的子任务工时
r($task->computeWorkingHoursTest($taskIDList[1])) && p('id,estimate,consumed,left') && e('601,18,30,18'); //根据taskID计算有父任务的子任务工时
r($task->computeWorkingHoursTest($taskIDList[2])) && p('id,estimate,consumed,left') && e('0'); //根据不存在的taskID计算工时
system("./ztest init");
+3 -3
View File
@@ -10,12 +10,12 @@ title=taskModel->deleteEstimate();
cid=1
pid=1
根据estimateID查看预计工时 >> consumed,3,0
根据estimateID查看预计工时 >> consumed,3,2
*/
$estimateID = '1';
$task = new taskTest();
r($task->deleteEstimateTest($estimateID)) && p('0:field,old,new') && e('consumed,3,0'); // 根据estimateID查看预计工时
system("./ztest init");
r($task->deleteEstimateTest($estimateID)) && p('0:field,old,new') && e('consumed,3,2'); // 根据estimateID查看预计工时
system("./ztest init");
-1
View File
@@ -18,4 +18,3 @@ $taskID = '50';
$task = new taskTest();
r($task->getByIdTest($taskID)) && p('name') && e('开发任务60'); //根据taskID查找任务详情
system("./ztest init");
-1
View File
@@ -18,4 +18,3 @@ $taskID = '51';
$task = new taskTest();
r($task->getByListTest($taskID)) && p('51:name') && e('开发任务61'); //根据taskID查找任务详情
system("./ztest init");
-1
View File
@@ -18,4 +18,3 @@ $estimateID = '1';
$task = new taskTest();
r($task->getEstimateByIdTest($estimateID)) && p('work') && e('这里是工作内容1'); // 根据estimateID查看预计工时
system("./ztest init");
@@ -18,4 +18,3 @@ $executionID = '102';
$task = new taskTest();
r($task->getExecutionTaskPairsTest($executionID)) && p('2') && e('2::开发任务12'); //根据执行id查出任务id与name
system("./ztest init");
-1
View File
@@ -21,4 +21,3 @@ $count = array('0','1');
$task = new taskTest();
r($task->getExecutionTasksTest($executionID,$count[0])) && p('1:name') && e('开发任务11'); //根据执行id获取任务列表
r($task->getExecutionTasksTest($executionID,$count[1])) && p() && e('4'); //根据执行id获取任务数量
system("./ztest init");
+44
View File
@@ -0,0 +1,44 @@
#!/usr/bin/env php
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/task.class.php';
su('admin');
/**
title=taskModel->getParentTaskPairs();
cid=1
pid=1
查找有父任务的执行下的父任务 普通任务和特定任务601 >> 更多任务1
查找有父任务的执行下的父任务 普通任务和特定任务602 >> 更多任务2
查找有父任务的执行下的父任务 普通任务和特定任务603 >> 更多任务3
查找有父任务的执行下的父任务 普通任务和特定任务11 >> 开发任务21
查找有父任务的执行下的父任务 普通任务和特定任务22 >> 开发任务32
查找有父任务的执行下的父任务 普通任务601 >> 更多任务1
查找有父任务的执行下的父任务 普通任务602 >> 更多任务2
查找有父任务的执行下的父任务 普通任务603 >> 更多任务3
查找没有父任务的执行下的父任务 普通任务2 >> 开发任务12
查找没有父任务的执行下的父任务 普通任务64 >> 更多任务4
查找不是执行的父任务 >> 0
查找不存在的执行下的父任务 >> 0
*/
$executionIDList = array('101','102','1','100001');
$append = '11,22';
$task = new taskTest();
r($task->getParentTaskPairsTest($executionIDList[0], $append)) && p('601') && e('更多任务1'); // 查找有父任务的执行下的父任务 普通任务和特定任务601
r($task->getParentTaskPairsTest($executionIDList[0], $append)) && p('602') && e('更多任务2'); // 查找有父任务的执行下的父任务 普通任务和特定任务602
r($task->getParentTaskPairsTest($executionIDList[0], $append)) && p('603') && e('更多任务3'); // 查找有父任务的执行下的父任务 普通任务和特定任务603
r($task->getParentTaskPairsTest($executionIDList[0], $append)) && p('11') && e('开发任务21');// 查找有父任务的执行下的父任务 普通任务和特定任务11
r($task->getParentTaskPairsTest($executionIDList[0], $append)) && p('22') && e('开发任务32');// 查找有父任务的执行下的父任务 普通任务和特定任务22
r($task->getParentTaskPairsTest($executionIDList[0])) && p('601') && e('更多任务1'); // 查找有父任务的执行下的父任务 普通任务601
r($task->getParentTaskPairsTest($executionIDList[0])) && p('602') && e('更多任务2'); // 查找有父任务的执行下的父任务 普通任务602
r($task->getParentTaskPairsTest($executionIDList[0])) && p('603') && e('更多任务3'); // 查找有父任务的执行下的父任务 普通任务603
r($task->getParentTaskPairsTest($executionIDList[1])) && p('2') && e('开发任务12'); // 查找没有父任务的执行下的父任务 普通任务12
r($task->getParentTaskPairsTest($executionIDList[1])) && p('604') && e('更多任务4'); // 查找没有父任务的执行下的父任务 普通任务604
r($task->getParentTaskPairsTest($executionIDList[2])) && p('name') && e('0'); // 查找不是执行的父任务
r($task->getParentTaskPairsTest($executionIDList[3])) && p('name') && e('0'); // 查找不存在的执行下的父任务
-1
View File
@@ -18,4 +18,3 @@ $executionID = '101';
$task = new taskTest();
r($task->getProjectIDTest($executionID)) && p('project') && e('11'); //根据executionID查找projectID
system("./ztest init");
-1
View File
@@ -20,4 +20,3 @@ $storyIDList = array(2, 1000001);
$task = new taskTest();
r($task->getStoryCommentsTest($storyIDList[0])) && p('0:comment') && e('这是一个系统日志测试备注2'); //根据storyID查找comment
r($task->getStoryCommentsTest($storyIDList[1])) && p('0:comment') && e('0'); //根据不存在的storyID查找comment
system("./ztest init");
-1
View File
@@ -22,4 +22,3 @@ $task = new taskTest();
r($task->getStoryTaskCountsTest($storyIDList)) && p('1') && e('6'); // 根据需求1查看任务数量
r($task->getStoryTaskCountsTest($storyIDList)) && p('5') && e('6'); // 根据需求5查看任务数量
r($task->getStoryTaskCountsTest($storyIDList)) && p('9') && e('6'); // 根据需求9查看任务数量
system("./ztest init");
-1
View File
@@ -21,4 +21,3 @@ $count = array('0','1');
$task = new taskTest();
r($task->getStoryTasksTest($storyID,$count[0])) && p('1:name') && e('开发任务11'); // 根据需求查看任务
r($task->getStoryTasksTest($storyID,$count[1])) && p() && e('6'); // 根据需求查看任务数量统计
system("./ztest init");
-1
View File
@@ -20,4 +20,3 @@ $waitstart = array('assignedTo' => 'user92','consumed' => '10');
$task = new taskTest();
$task->startTest($taskID,$waitstart);
r($task->getTaskEstimateTest($taskID)) && p('0:task') && e('55'); // 查看任务预计
system("./ztest init");
-1
View File
@@ -23,4 +23,3 @@ $count = array('0','1');
$task = new taskTest();
r($task->getTasksByModuleTest($executionID,$moduleIdList,$count[0])) && p('0:name') && e('子任务10'); //根据模块获取任务列表
r($task->getTasksByModuleTest($executionID,$moduleIdList,$count[1])) && p() && e('1'); //根据模块获取任务数量
system("./ztest init");
@@ -20,4 +20,3 @@ $assignedTo = 'test14';
$task = new taskTest();
//var_dump($task->getUserSuspendedTasksTest($taskID,$assignedTo));die;
r($task->getUserSuspendedTasksTest($taskID,$assignedTo)) && p(''.$taskID.':name') && e('开发任务33'); // 根据指派人员查看执行和任务对应关系
system("./ztest init");
-1
View File
@@ -19,4 +19,3 @@ $assignedTo = 'user95';
$task = new taskTest();
r($task->getUserTaskPairsTest($taskID,$assignedTo)) && p('3') && e('迭代3 / 开发任务13'); // 根据指派人员查看执行和任务对应关系
system("./ztest init");
-1
View File
@@ -19,4 +19,3 @@ $assignedTo = 'user92';
$task = new taskTest();
r($task->getUserTasksTest($taskID,$assignedTo)) && p('2:name') && e('开发任务12'); // 根据指派人员查看任务
system("./ztest init");
+98
View File
@@ -0,0 +1,98 @@
#!/usr/bin/env php
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/task.class.php';
su('admin');
/**
title=taskModel->processTask();
cid=1
pid=1
根据taskID计算wait 未延迟的任务进度 >> ,,normal,75
根据taskID计算wait 延迟的任务进度 >> 1,,normal,75
根据taskID计算doing 延迟的任务进度 >> 1,,normal,80
根据taskID计算doing 未延迟的任务进度 >> ,,normal,80
根据taskID计算done 延迟的任务进度 >> ,,normal,100
根据taskID计算算done 未延迟的任务进度 >> ,,normal,100
*/
$now = helper::now();
$task1 = new stdclass();
$task1->status = 'wait';
$task1->deadline = date("Y-m-d",strtotime("+1 day"));
$task1->storyStatus = 'draft';
$task1->latestStoryVersion = '1';
$task1->storyVersion = '1';
$task1->product = '1';
$task1->assignedTo = 'po82';
$task1->consumed = '3';
$task1->left = '1';
$task2 = new stdclass();
$task2->status = 'doing';
$task2->deadline = date("Y-m-d",strtotime("-1 day"));
$task2->storyStatus = 'draft';
$task2->latestStoryVersion = '1';
$task2->storyVersion = '1';
$task2->product = '9';
$task2->assignedTo = '';
$task2->consumed = '3';
$task2->left = '1';
$task3 = new stdclass();
$task3->status = 'doing';
$task3->deadline = date("Y-m-d",strtotime("-1 day"));
$task3->storyStatus = 'draft';
$task3->latestStoryVersion = '1';
$task3->storyVersion = '1';
$task3->product = '2';
$task3->assignedTo = '';
$task3->consumed = '4';
$task3->left = '1';
$task4 = new stdclass();
$task4->status = 'doing';
$task4->deadline = date("Y-m-d",strtotime("+1 day"));
$task4->storyStatus = 'draft';
$task4->latestStoryVersion = '1';
$task4->storyVersion = '1';
$task4->product = '2';
$task4->assignedTo = '';
$task4->consumed = '4';
$task4->left = '1';
$task5 = new stdclass();
$task5->status = 'done';
$task5->deadline = date("Y-m-d",strtotime("-1 day"));
$task5->deadline = '2022-03-10';
$task5->storyStatus = 'draft';
$task5->latestStoryVersion = '1';
$task5->storyVersion = '1';
$task5->product = '9';
$task5->assignedTo = '';
$task5->consumed = '11';
$task5->left = '0';
$task6 = new stdclass();
$task6->status = 'done';
$task6->deadline = date("Y-m-d",strtotime("+1 day"));
$task6->storyStatus = 'draft';
$task6->latestStoryVersion = '1';
$task6->storyVersion = '1';
$task6->product = '9';
$task6->assignedTo = '';
$task6->consumed = '11';
$task6->left = '0';
$task = new taskTest();
r($task->processTaskTest($task1)) && p('delay,needConfirm,productType,progress') && e(',,normal,75'); //根据taskID计算wait 未延迟的任务进度
r($task->processTaskTest($task2)) && p('delay,needConfirm,productType,progress') && e('1,,normal,75'); //根据taskID计算wait 延迟的任务进度
r($task->processTaskTest($task3)) && p('delay,needConfirm,productType,progress') && e('1,,normal,80'); //根据taskID计算doing 延迟的任务进度
r($task->processTaskTest($task4)) && p('delay,needConfirm,productType,progress') && e(',,normal,80'); //根据taskID计算doing 未延迟的任务进度
r($task->processTaskTest($task5)) && p('delay,needConfirm,productType,progress') && e(',,normal,100'); //根据taskID计算done 延迟的任务进度
r($task->processTaskTest($task6)) && p('delay,needConfirm,productType,progress') && e(',,normal,100'); //根据taskID计算算done 未延迟的任务进度
+82
View File
@@ -0,0 +1,82 @@
#!/usr/bin/env php
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/task.class.php';
su('admin');
/**
title=taskModel->processTasks();
cid=1
pid=1
根据tasks计算executionID为1的执行下所有任务的进度 任务1 >> ,100
根据tasks计算executionID为1的执行下所有任务的进度 任务601 >> ,100
根据tasks计算executionID为1的执行下所有任务的进度 任务602 >> ,80
根据tasks计算executionID为1的执行下所有任务的进度 任务602 >> ,71
根据tasks计算executionID为2的执行下所有任务的进度 任务2 >> ,80
根据tasks计算executionID为2的执行下所有任务的进度 任务602 >> 10,67
根据tasks计算executionID为2的执行下所有任务的进度 任务602 >> ,64
根据tasks计算executionID为2的执行下所有任务的进度 任务602 >> ,62
*/
$now = helper::now();
$tasks1 = $dao->select('*')->from(TABLE_TASK)->where('execution')->eq('101')->andWhere('deleted')->eq(0)->fetchAll('id');
$parents = array();
foreach($tasks1 as $task)
{
if($task->parent > 0) $parents[$task->parent] = $task->parent;
}
$parents = $dao->select('*')->from(TABLE_TASK)->where('id')->in($parents)->fetchAll('id');
foreach($tasks1 as $task)
{
if($task->parent > 0)
{
if(isset($tasks[$task->parent]))
{
$tasks[$task->parent]->children[$task->id] = $task;
unset($tasks[$task->id]);
}
else
{
$parent = $parents[$task->parent];
$task->parentName = $parent->name;
}
}
}
$tasks2 = $dao->select('*')->from(TABLE_TASK)->where('execution')->eq('102')->andWhere('deleted')->eq(0)->fetchAll('id');
$parents = array();
foreach($tasks2 as $task)
{
if($task->parent > 0) $parents[$task->parent] = $task->parent;
}
$parents = $dao->select('*')->from(TABLE_TASK)->where('id')->in($parents)->fetchAll('id');
foreach($tasks2 as $task)
{
if($task->parent > 0)
{
if(isset($tasks[$task->parent]))
{
$tasks[$task->parent]->children[$task->id] = $task;
unset($tasks[$task->id]);
}
else
{
$parent = $parents[$task->parent];
$task->parentName = $parent->name;
}
}
}
$task = new taskTest();
r($task->processTasksTest($tasks1)) && p('1:delay,progress') && e(',100'); //根据tasks计算executionID为1的执行下所有任务的进度 任务1
r($task->processTasksTest($tasks1)) && p('601:delay,progress') && e(',100'); //根据tasks计算executionID为1的执行下所有任务的进度 任务601
r($task->processTasksTest($tasks1)) && p('602:delay,progress') && e(',80'); //根据tasks计算executionID为1的执行下所有任务的进度 任务602
r($task->processTasksTest($tasks1)) && p('603:delay,progress') && e(',71'); //根据tasks计算executionID为1的执行下所有任务的进度 任务603
r($task->processTasksTest($tasks2)) && p('2:delay,progress') && e(',80'); //根据tasks计算executionID为2的执行下所有任务的进度 任务2
r($task->processTasksTest($tasks2)) && p('604:delay,progress') && e('10,67'); //根据tasks计算executionID为2的执行下所有任务的进度 任务604
r($task->processTasksTest($tasks2)) && p('605:delay,progress') && e(',64'); //根据tasks计算executionID为2的执行下所有任务的进度 任务605
r($task->processTasksTest($tasks2)) && p('606:delay,progress') && e(',62'); //根据tasks计算executionID为2的执行下所有任务的进度 任务606
+15 -15
View File
@@ -18,14 +18,14 @@ pid=1
测试修改任务状态 >> status,cancel,doing
测试修改任务优先级 >> pri,2,1
测试修改任务所属执行 >> execution,107,101
测试修改任务预计开始时间 >> estStarted,,2022-02-27
测试修改任务截止时间 >> deadline,,2022-03-01
测试修改任务预计开始时间 >> estStarted,2022-03-11,2022-02-27
测试修改任务截止时间 >> deadline,2022-03-10,2022-03-11
测试修改任务关闭原因 >> 『关闭原因』必须为空。
*/
$estStarted = '2022-02-27';
$deadline = '2022-03-01';
$deadline = '2022-03-11';
$taskIDList = array('1','2','3','4','5','6','7','8','9');
$changename = array('name' => '任务名修改','estStarted' => $estStarted,'deadline' => $deadline);
@@ -40,16 +40,16 @@ $changedeadline = array('deadline' => $deadline);
$ckclosedReason = array('closedReason' => '关闭原因');
$task = new taskTest();
r($task->updateObject($taskIDList[0], $changename)) && p('2:field,old,new') && e('name,开发任务11,任务名修改'); // 测试修改任务名称
r($task->updateObject($taskIDList[0], $changename)) && p() && e('没有数据更新'); // 测试无修改
r($task->updateObject($taskIDList[1], $changemodule)) && p('2:field,old,new') && e('module,24,25'); // 测试修改任务模块
r($task->updateObject($taskIDList[2], $changeassign)) && p('3:field,old,new') && e('assignedTo,,user94'); // 测试修改任务指派人
r($task->updateObject($taskIDList[3], $changetype)) && p('2:field,old,new') && e('type,study,devel'); // 测试修改任务类型
r($task->updateObject($taskIDList[4], $changestatus)) && p('2:field,old,new') && e('status,cancel,doing'); // 测试修改任务状态
r($task->updateObject($taskIDList[5], $changepri)) && p('2:field,old,new') && e('pri,2,1'); // 测试修改任务优先级
r($task->updateObject($taskIDList[6], $changeexecution)) && p('2:field,old,new') && e('execution,107,101'); // 测试修改任务所属执行
r($task->updateObject($taskIDList[7], $changeestStarted)) && p('0:field,old,new') && e('estStarted,,2022-02-27'); // 测试修改任务预计开始时间
r($task->updateObject($taskIDList[8], $changedeadline)) && p('1:field,old,new') && e('deadline,,2022-03-01'); // 测试修改任务截止时间
r($task->updateObject($taskIDList[0], $ckclosedReason)) && p('closedReason:0') && e(' 『关闭原因』必须为空。'); // 测试修改任务关闭原因
r($task->updateObject($taskIDList[0], $changename)) && p('2:field,old,new') && e('name,开发任务11,任务名修改'); // 测试修改任务名称
r($task->updateObject($taskIDList[0], $changename)) && p() && e('没有数据更新'); // 测试无修改
r($task->updateObject($taskIDList[1], $changemodule)) && p('0:field,old,new') && e('module,24,25'); // 测试修改任务模块
r($task->updateObject($taskIDList[2], $changeassign)) && p('1:field,old,new') && e('assignedTo,,user94'); // 测试修改任务指派人
r($task->updateObject($taskIDList[3], $changetype)) && p('0:field,old,new') && e('type,study,devel'); // 测试修改任务类型
r($task->updateObject($taskIDList[4], $changestatus)) && p('0:field,old,new') && e('status,cancel,doing'); // 测试修改任务状态
r($task->updateObject($taskIDList[5], $changepri)) && p('0:field,old,new') && e('pri,2,1'); // 测试修改任务优先级
r($task->updateObject($taskIDList[6], $changeexecution)) && p('0:field,old,new') && e('execution,107,101'); // 测试修改任务所属执行
r($task->updateObject($taskIDList[7], $changeestStarted)) && p('0:field,old,new') && e('estStarted,2022-03-11,2022-02-27'); // 测试修改任务预计开始时间
r($task->updateObject($taskIDList[8], $changedeadline)) && p('0:field,old,new') && e('deadline,2022-03-10,2022-03-11'); // 测试修改任务截止时间
r($task->updateObject($taskIDList[0], $ckclosedReason)) && p('closedReason:0') && e(' 『关闭原因』必须为空。'); // 测试修改任务关闭原因
system("./ztest init");
system("./ztest init");
+8 -8
View File
@@ -10,14 +10,14 @@ title=taskModel->updateEstimate();
cid=1
pid=1
根据estimateID查看预计工时 >> consumed,3,1
根据estimateID查看预计工时 >> consumed,4,1
根据estimateID查看预计工时 >> consumed,1,5
根据estimateID查看预计工时 >> consumed,5,1
根据estimateID查看预计工时 >> status,wait,done
根据estimateID查看预计工时 >> status,doing,done
*/
$estimateID = '1';
$estimateID = '2';
$updateDate = array('date' => '2022-02-22');
$updateConsumed = array('consumed' => '5');
@@ -25,8 +25,8 @@ $updateLeft = array('left' => '1');
$noLeft = array('left' => '0');
$task = new taskTest();
r($task->updateEstimateTest($estimateID, $updateDate)) && p('0:field,old,new') && e('consumed,3,1'); // 根据estimateID查看预计工时
r($task->updateEstimateTest($estimateID, $updateConsumed)) && p('0:field,old,new') && e('consumed,1,5'); // 根据estimateID查看预计工时
r($task->updateEstimateTest($estimateID, $updateLeft)) && p('0:field,old,new') && e('consumed,5,1'); // 根据estimateID查看预计工时
r($task->updateEstimateTest($estimateID, $noLeft)) && p('1:field,old,new') && e('status,wait,done'); // 根据estimateID查看预计工时
system("./ztest init");
r($task->updateEstimateTest($estimateID, $updateDate)) && p('0:field,old,new') && e('consumed,4,1'); // 根据estimateID查看预计工时
r($task->updateEstimateTest($estimateID, $updateConsumed)) && p('0:field,old,new') && e('consumed,1,5'); // 根据estimateID查看预计工时
r($task->updateEstimateTest($estimateID, $updateLeft)) && p('0:field,old,new') && e('consumed,5,1'); // 根据estimateID查看预计工时
r($task->updateEstimateTest($estimateID, $noLeft)) && p('1:field,old,new') && e('status,doing,done'); // 根据estimateID查看预计工时
system("./ztest init");