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

This commit is contained in:
tianshujie
2023-04-19 13:13:35 +08:00
3 changed files with 23 additions and 8 deletions
+7
View File
@@ -490,6 +490,11 @@ CHANGE `editedBy` `editedBy` varchar(30) NOT NULL DEFAULT '',
CHANGE `editedDate` `editedDate` datetime NULL;
ALTER TABLE `zt_effort`
CHANGE `left` `left` float NOT NULL DEFAULT '0',
CHANGE `consumed` `consumed` float NOT NULL DEFAULT '0',
CHANGE `product` `product` text NULL,
CHANGE `project` `project` mediumint unsigned NOT NULL DEFAULT '0',
CHANGE `execution` `execution` mediumint unsigned NOT NULL DEFAULT '0',
CHANGE `begin` `begin` smallint(4) unsigned zerofill NOT NULL DEFAULT '0',
CHANGE `end` `end` smallint(4) unsigned zerofill NOT NULL DEFAULT '0';
@@ -1050,6 +1055,8 @@ CHANGE `editedBy` `editedBy` char(30) NOT NULL DEFAULT '',
CHANGE `editedDate` `editedDate` datetime NULL;
ALTER TABLE `zt_workflowfield`
CHANGE `default` `default` varchar(100) NOT NULL DEFAULT '',
CHANGE `rules` `rules` varchar(255) NOT NULL DEFAULT '',
CHANGE `expression` `expression` text NULL,
CHANGE `placeholder` `placeholder` varchar(100) NOT NULL DEFAULT '',
CHANGE `desc` `desc` text NULL,
+7 -7
View File
@@ -742,15 +742,15 @@ CREATE TABLE IF NOT EXISTS `zt_effort` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`objectType` varchar(30) NOT NULL,
`objectID` mediumint(8) unsigned NOT NULL,
`product` text NOT NULL,
`project` mediumint(8) unsigned NOT NULL,
`execution` mediumint(8) unsigned NOT NULL,
`product` text NULL,
`project` mediumint(8) unsigned NOT NULL DEFAULT '0',
`execution` mediumint(8) unsigned NOT NULL DEFAULT '0',
`account` varchar(30) NOT NULL,
`work` text,
`vision` varchar(10) NOT NULL DEFAULT 'rnd',
`date` date NOT NULL,
`left` float NOT NULL,
`consumed` float NOT NULL,
`left` float NOT NULL DEFAULT '0',
`consumed` float NOT NULL DEFAULT '0',
`begin` smallint(4) unsigned zerofill NOT NULL DEFAULT '0',
`end` smallint(4) unsigned zerofill NOT NULL DEFAULT '0',
`extra` text,
@@ -12257,8 +12257,8 @@ CREATE TABLE IF NOT EXISTS `zt_workflowfield` (
`control` varchar(20) NOT NULL,
`expression` text NULL,
`options` text NOT NULL,
`default` varchar(100) NOT NULL,
`rules` varchar(255) NOT NULL,
`default` varchar(100) NOT NULL DEFAULT '',
`rules` varchar(255) NOT NULL DEFAULT '',
`placeholder` varchar(100) NOT NULL DEFAULT '',
`order` smallint(5) unsigned NOT NULL,
`searchOrder` smallint(5) unsigned NOT NULL DEFAULT '0',
+9 -1
View File
@@ -128,6 +128,8 @@ class taskModel extends model
->stripTags($this->config->task->editor->create['id'], $this->config->allowedTags)
->join('mailto', ',')
->remove('after,files,labels,assignedTo,uid,storyEstimate,storyDesc,storyPri,team,teamSource,teamEstimate,teamConsumed,teamLeft,teamMember,multiple,teams,contactListMenu,selectTestStory,testStory,testPri,testEstStarted,testDeadline,testAssignedTo,testEstimate,sync,otherLane,region,lane,estStartedDitto,deadlineDitto')
->removeIF(empty($this->post->estStarted), 'estStarted')
->removeIF(empty($this->post->deadline), 'deadline')
->add('version', 1)
->get();
@@ -2318,7 +2320,7 @@ class taskModel extends model
->setDefault('assignedTo', '')
->setDefault('status', 'doing')
->setDefault('finishedBy, canceledBy, closedBy, closedReason', '')
->setDefault('finishedDate, canceledDate, closedDate', '0000-00-00 00:00:00')
->setDefault('finishedDate, canceledDate, closedDate', null)
->setDefault('lastEditedBy', $this->app->user->account)
->setDefault('lastEditedDate', helper::now())
->setDefault('assignedDate', helper::now())
@@ -2403,6 +2405,12 @@ class taskModel extends model
->andWhere('t1.vision')->eq($this->config->vision)
->fetch();
if(!$task) return false;
$task->openedDate = substr($task->openedDate, 0, 19);
$task->finishedDate = substr($task->finishedDate, 0, 19);
$task->canceledDate = substr($task->canceledDate, 0, 19);
$task->closedDate = substr($task->closedDate, 0, 19);
$task->lastEditedDate = substr($task->lastEditedDate, 0, 19);
$task->realStarted = substr($task->realStarted, 0, 19);
$children = $this->dao->select('*')->from(TABLE_TASK)->where('parent')->eq($taskID)->andWhere('deleted')->eq(0)->fetchAll('id');
$task->children = $children;