diff --git a/module/action/model.php b/module/action/model.php index 4080a25cb6..997b88179d 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -172,8 +172,8 @@ class actionModel extends model { $actionName = strtolower($action->action); - if(substr($actionName, 0, 7) == 'linked2') $this->actionTao->getLinked2Extra($action, substr($actionName, 7)); - if(substr($actionName, 0, 12) == 'unlinkedfrom') $this->actionTao->getUnlinkedFromExtra($action, substr($actionName, 12)); + if(substr($actionName, 0, 7) == 'linked2') $this->actionTao->getLinkedExtra($action, substr($actionName, 7)); + if(substr($actionName, 0, 12) == 'unlinkedfrom') $this->actionTao->getLinkedExtra($action, substr($actionName, 12)); if(in_array($actionName, array('svncommited', 'gitcommited')) && isset($commiters[$action->actor])) $action->actor = $commiters[$action->actor]; if(!in_array($action->objectType, array('feedback', 'ticket')) && $actionName == 'tostory') $this->actionTao->processToStoryActionExtra($action); @@ -185,10 +185,9 @@ class actionModel extends model if($actionName == 'createrequirements') $this->actionTao->processCreateRequirementsActionExtra($action); if($actionName == 'buildopened') $this->actionTao->processActionExtra(TABLE_BUILD, $action, 'name', 'build', 'view'); if($actionName == 'fromlib' && $action->objectType == 'case') $this->actionTao->processActionExtra(TABLE_TESTSUITE, $action, 'name', 'caselib', 'browse'); - if($actionName == 'finished' && $objectType == 'todo') $this->actionTao->finishToDoActionExtra($action); - if(($actionName == 'closed' && $action->objectType == 'story') || ($actionName == 'resolved' && $action->objectType == 'bug')) $this->actionTao->processClosedStoryAndResolvedBugActionExtra($action); + if(($actionName == 'finished' && $objectType == 'todo') || ($actionName == 'closed' && in_array($action->objectType, array('story', 'demand'))) || ($actionName == 'resolved' && $action->objectType == 'bug')) $this->actionTao->processAppendLinkByExtra($action); - if(in_array($actionName, array('totask', 'linkchildtask', 'un', 'linkparenttask', 'unlinkparenttask', 'deletechildrentask')) && $action->objectType != 'feedback') $this->actionTao->processActionExtra(TABLE_TASK, $action, 'name', 'task', 'view');; + if(in_array($actionName, array('totask', 'linkchildtask', 'unlinkchildrentask', 'linkparenttask', 'unlinkparenttask', 'deletechildrentask')) && $action->objectType != 'feedback') $this->actionTao->processActionExtra(TABLE_TASK, $action, 'name', 'task', 'view');; if(in_array($actionName, array('linkchildstory', 'unlinkchildrenstory', 'linkparentstory', 'unlinkparentstory', 'deletechildrenstory'))) $this->actionTao->processActionExtra(TABLE_STORY, $action, 'title', 'story', 'view'); if(in_array($actionName, array('testtaskopened', 'testtaskstarted', 'testtaskclosed'))) $this->actionTao->processActionExtra(TABLE_TESTTASK, $action, 'name', 'testtask', 'view'); if(in_array($actionName, array('importfromstorylib', 'importfromrisklib', 'importfromissuelib', 'importfromopportunitylib')) && $this->config->edition == 'max') $this->actionTao->processActionExtra(TABLE_ASSETLIB, $action, 'name', 'assetlib', $action->objectType); @@ -1933,7 +1932,7 @@ class actionModel extends model $action->extra = ''; if($linkedProducts && $this->config->vision == 'rnd') { - foreach($linkedProducts as $productID => $productName) $linkedProducts[$productID] = html::a(helper::createLink('product', 'browse', "productID=$productID"), "#{$productID} {$productName}"); + foreach($linkedProducts as $productID => $productName) $linkedProducts[$productID] = html::a(helper::createLink('product', 'browse', "productID={$productID}"), "#{$productID} {$productName}"); $action->extra = sprintf($this->lang->execution->action->extra, '' . join(', ', $linkedProducts) . ''); } } diff --git a/module/action/tao.php b/module/action/tao.php index 3f9ca906d2..5c241ace71 100644 --- a/module/action/tao.php +++ b/module/action/tao.php @@ -340,23 +340,26 @@ class actionTao extends actionModel } /** - * 获取linked操作记录的附加信息。 + * 获取 linked 和 unlinked 操作记录的附加信息。 * Get action extra info. * - * @param object $action - * @param string $type + * @param object $action + * @param string $type * @access protected * @return bool */ - protected function getLinked2Extra(object $action, string $type): bool + protected function getLinkedExtra(object $action, string $type): bool { - $table = $this->getTableByType($type); + if($type == 'plan') $type = 'productplan'; + if($type == 'revision') $type = 'repohistory'; + if($type == 'bug') $type = 'build'; + $table = zget($this->config->objectTables, $type, ''); if(empty($table)) return false; $method = 'view'; if(in_array($type, array('execution', 'kanban'))) { - $execution = $this->fetchObjectInfoByID($table, (int)$action->extra, 'name, type, multiple'); + $execution = $this->fetchObjectInfoByID(TABLE_EXECUTION, (int)$action->extra, 'name, type, multiple'); if($execution->type != 'project' && empty($execution->multiple)) return false; $name = $execution->name; @@ -374,7 +377,7 @@ class actionTao extends actionModel } elseif($type == 'plan' || $type == 'productplan') { - $plan = $this->fetchObjectInfoByID($table, (int)$action->extra, 'title'); + $plan = $this->fetchObjectInfoByID($table, (int)$action->extra, 'title'); if($plan && $plan->title) $action->extra = common::hasPriv('productplan', 'view') ? html::a(helper::createLink('productplan', $method, "planID={$action->extra}"), $plan->title) : $plan->title; } elseif(in_array($type, array('build', 'bug', 'release', 'testtask'))) @@ -384,7 +387,12 @@ class actionTao extends actionModel } elseif($type == 'revision') { - $this->processRevision($action, $table); + $commit = $this->fetchObjectInfoByID($table, $action->extra, 'repo, revision'); + if($commit) + { + $revision = substr($commit->revision, 0, 10); + $action->extra = common::hasPriv('repo', 'revision') ? html::a(helper::createLink('repo', 'revision', "repoID={$commit->repo}&objectID=0&revision={$commit->revision}"), $revision) : $revision; + } } return true; } @@ -403,34 +411,6 @@ class actionTao extends actionModel return $this->dao->select($field)->from($table)->where('id')->eq($objectID)->fetch(); } - /** - * 获取unlinked操作记录的附加信息。 - * Get unlinked action extra info. - * - * @param object $action - * @param string $type - * @access protected - * @return bool - */ - protected function getUnlinkedFromExtra(object $action, string $type): bool - { - if($type == 'plan') $type = 'productplan'; - $table = $this->getTableByType($type); - if(empty($table)) return false; - - $method = 'view'; - if($type == 'revision') - { - $this->processRevision($action, $table); - } - elseif(in_array($type, array('execution', 'project', 'build', 'release', 'testtask', 'productplan'))) - { - $fields = $type == 'productplan' ? 'title' : 'name'; - $this->processActionExtra($table, $action, $fields, $type, $method); - } - return true; - } - /** * 组建Action的extra信息。 * Build action extra info. @@ -452,42 +432,6 @@ class actionTao extends actionModel if($object && $object->{$fields}) $action->extra = $condition ? html::a(helper::createLink($type, $method, $this->processParamString($action, $type)), "#{$action->extra} " . $object->{$fields}) : "#{$action->extra} " . $object->{$fields}; } - /** - * 处理revision - * Process revision. - * - * @param object $action - * @param string $table - * @access protected - * @return void - */ - protected function processRevision(object $action, string $table) - { - $fields = 'repo, revision'; - $commit = $this->fetchObjectInfoByID($table, $action->extra, $fields); - if($commit) - { - $revision = substr($commit->revision, 0, 10); - $action->extra = common::hasPriv('repo', 'revision') ? html::a(helper::createLink('repo', 'revision', "repoID={$commit->repo}&objectID=0&revision={$commit->revision}"), $revision) : $revision; - } - } - - /** - * 根据类型获取对象表。 - * Get object table by type. - * - * @param string $type - * @access protected - * @return string - */ - protected function getTableByType(string &$type): string - { - if($type == 'plan') $type = 'productplan'; - if($type == 'revision') $type = 'repohistory'; - if($type == 'bug') $type = 'build'; - return $this->config->objectTables[$type] ?? ''; - } - /** * 处理属性。 * Process attribute. @@ -574,61 +518,38 @@ class actionTao extends actionModel */ protected function processCreateRequirementsActionExtra(object $action): void { - $names = $this->dao->select('id,title')->from(TABLE_STORY)->where('id')->in($action->extra)->fetchPairs('id', 'title'); + $names = $this->dao->select('id,title')->from(TABLE_STORY)->where('id')->in($action->extra)->fetchPairs(); $action->extra = ''; if($names) { - foreach($names as $id => $name) $action->extra .= common::hasPriv('requriement', 'view') ? html::a(helper::createLink('story', 'view', "storyID=$id"), "#{$id} " . $name) . ', ' : "#{$id} " . $name . ', '; + foreach($names as $id => $name) $action->extra .= common::hasPriv('requriement', 'view') ? html::a(helper::createLink('story', 'view', "storyID={$id}"), "#{$id} " . $name) . ', ' : "#{$id} " . $name . ', '; } $action->extra = trim(trim($action->extra), ','); } /** - * 搭建关闭用户故事和解决bug的Action的extra信息。 - * Build closed story and resolve bug action extra info. + * 通过 extra 获取对象的 appendLink。 + * Get object appendLink by extra. * * @param object $action * @access protected * @return void */ - protected function processClosedStoryAndResolvedBugActionExtra(object $action): void + protected function processAppendLinkByExtra(object $action): void { $action->appendLink = ''; if(strpos($action->extra, '|') !== false) $action->extra = substr($action->extra, 0, strpos($action->extra, '|')); if(strpos($action->extra, ':') !== false) { list($extra, $id) = explode(':', $action->extra); - $action->extra = $extra; if($id) { - $table = $action->objectType == 'story' ? TABLE_STORY : TABLE_BUG; - $name = $this->dao->select('title')->from($table)->where('id')->eq($id)->fetch('title'); - if($name) $action->appendLink = html::a(helper::createLink($action->objectType, 'view', "id={$id}"), "#{$id} " . $name); - } - } - } - - /** - * 结束待办Action的extra信息。 - * Finish todo action extra info. - * - * @param object $action - * @access protected - * @return void - */ - protected function finishToDoActionExtra(object $action): void - { - $action->appendLink = ''; - if(strpos($action->extra, ':')!== false) - { - list($extra, $id) = explode(':', $action->extra); - $action->extra = strtolower($extra); - if($id) - { - $table = $this->config->objectTables[$action->extra]; - $field = $this->config->action->objectNameFields[$action->extra]; - $name = $this->dao->select($field)->from($table)->where('id')->eq($id)->fetch($field); - if($name) $action->appendLink = html::a(helper::createLink($action->extra, 'view', "id={$id}"), "#{$id} " . $name); + $extra = strtolower($extra); + $module = $action->objectType == 'todo' ? $extra : $action->objectType; + $table = $this->config->objectTables[$module]; + $field = $this->config->action->objectNameFields[$module]; + $name = $this->dao->select($field)->from($table)->where('id')->eq($id)->fetch($field); + if($name) $action->appendLink = html::a(helper::createLink($module, 'view', "id={$id}"), "#{$id} " . $name); } } } @@ -646,7 +567,7 @@ class actionTao extends actionModel protected function processLinkStoryAndBugActionExtra(object $action, string $module, string $method): void { $extra = ''; - foreach(explode(',', $action->extra) as $id) $extra .= common::hasPriv($module, $method) ? html::a(helper::createLink($module, $method, "{$module}ID=$id"), "#$id ") . ', ' : "#$id, "; + foreach(explode(',', $action->extra) as $id) $extra .= common::hasPriv($module, $method) ? html::a(helper::createLink($module, $method, "{$module}ID={$id}"), "#{$id} ") . ', ' : "#{$id}, "; $action->extra = trim(trim($extra), ','); } @@ -662,15 +583,15 @@ class actionTao extends actionModel { $productShadow = $this->dao->select('shadow')->from(TABLE_PRODUCT)->where('id')->in(trim($action->product, ','))->fetch('shadow'); $title = $this->dao->select('title')->from(TABLE_STORY)->where('id')->eq($action->extra)->fetch('title'); - $defaultExtra = "#$action->extra " . $title; + $defaultExtra = "#{$action->extra} {$title}"; if($productShadow) { $projectID = $this->dao->select('project')->from(TABLE_PROJECTSTORY)->where('story')->eq($action->extra)->fetch('project'); - if($title) $action->extra = (common::hasPriv('projectstory', 'view') && $projectID) ? html::a(helper::createLink('projectstory', 'view', "storyID={$action->extra}&projectID=$projectID"), $defaultExtra) : $defaultExtra; + if($title) $action->extra = common::hasPriv('projectstory', 'view') && $projectID ? html::a(helper::createLink('projectstory', 'view', "storyID={$action->extra}&projectID={$projectID}"), $defaultExtra) : $defaultExtra; } else { - if($title) $action->extra = common::hasPriv('story', 'view') ? html::a(helper::createLink('story', 'view', "storyID=$action->extra"), $defaultExtra) : $defaultExtra; + if($title) $action->extra = common::hasPriv('story', 'view') ? html::a(helper::createLink('story', 'view', "storyID={$action->extra}"), $defaultExtra) : $defaultExtra; } } diff --git a/module/action/test/action.class.php b/module/action/test/action.class.php index 14c1e57684..af8b9da74c 100644 --- a/module/action/test/action.class.php +++ b/module/action/test/action.class.php @@ -107,22 +107,38 @@ class actionTest * * @param string $objectType * @param int $objectID + * @param string $edition * @access public - * @return object + * @return string */ - public function getListTest($objectType, $objectID) + public function getListTest(string $objectType, int $objectID, string $edition = 'pms'): string { - $objects = $this->objectModel->getList($objectType, $objectID); + global $tester; + $oldEdition = $tester->config->edition; + $tester->config->edition = $edition; + + $objects = $this->objectModel->getList($objectType, $objectID); + + $tester->config->edition = $oldEdition; + + global $tester; + $modules = $objectType == 'module' ? $tester->dao->select('id')->from(TABLE_MODULE)->where('root')->in($objectID)->fetchPairs('id') : array(); + $actions = $this->objectModel->getActionListByTypeAndID($objectType, $objectID, $modules); if(dao::isError()) return dao::getError(); - $dirname = dirname(__DIR__) . DS; + $actionID = key($actions); - $objects[$objectID]->extra = str_replace($dirname, '', $objects[$objectID]->extra); - $objects[$objectID]->extra = trim($objects[$objectID]->extra, "\n"); - if(strpos($objects[$objectID]->extra, 'href') !== false) $objects[$objectID]->extra = 'a'; + if(isset($objects[$actionID]->appendLink)) return 'link'; - return $objects[$objectID]; + if($objects[$actionID]->extra == $actions[$actionID]->extra) return 'nochanged'; + + $dirname = dirname(__DIR__) . DS; + $newExtra = str_replace($dirname, '', $objects[$actionID]->extra); + $newExtra = trim($newExtra, "\n"); + $newExtra = strpos($newExtra, 'href') !== false ? 'link' : 'title'; + + return $newExtra; } /** diff --git a/module/action/test/model/getlist.php b/module/action/test/model/getlist.php index 88edd8af78..d59a2a08ae 100755 --- a/module/action/test/model/getlist.php +++ b/module/action/test/model/getlist.php @@ -2,98 +2,298 @@ gen(45); +zdTable('action')->config('action')->gen(99); +zdTable('project')->gen(20, true, false); +zdTable('project')->config('execution')->gen(90, false, false); +zdTable('product')->config('product')->gen(50, true, false); +zdTable('projectstory')->gen(10); +zdTable('productplan')->gen(10); +zdTable('story')->gen(10); +zdTable('task')->gen(20); +zdTable('bug')->gen(10); +zdTable('kanban')->gen(1); +zdTable('build')->gen(10); +zdTable('release')->gen(10); +zdTable('testsuite')->gen(10); +zdTable('testtask')->gen(10); +zdTable('assetlib')->gen(10); +zdTable('user')->gen(10); + +su('admin'); /** title=测试 actionModel->getList(); cid=1 pid=1 - -测试获取objectType product objectId 1的动态信息 >> 1,admin,1 -测试获取objectType story objectId 2的动态信息 >> 2,dev17,1 -测试获取objectType productplan objectId 3的动态信息 >> 3,test18,1 -测试获取objectType release objectId 4的动态信息 >> 4,admin,1 -测试获取objectType project objectId 5的动态信息 >> 5,dev17,11 -测试获取objectType task objectId 6的动态信息 >> 6,test18,1 -测试获取objectType build objectId 7的动态信息 >> 7,admin,1 -测试获取objectType bug objectId 8的动态信息 >> 8,dev17,1 -测试获取objectType testcase objectId 9的动态信息 >> 9,test18,2 -测试获取objectType case objectId 10的动态信息 >> 10,admin,1 -测试获取objectType testtask objectId 11的动态信息 >> 11,dev17,1 -测试获取objectType user objectId 12的动态信息 >> 12,test18,1 -测试获取objectType doc objectId 13的动态信息 >> 13,admin,1 -测试获取objectType doclib objectId 14的动态信息 >> 14,dev17,1 -测试获取objectType todo objectId 15的动态信息 >> 15,test18,1 -测试获取objectType branch objectId 16的动态信息 >> 16,admin,1 -测试获取objectType module objectId 17的动态信息 >> 17,dev17,1 -测试获取objectType testsuite objectId 18的动态信息 >> 18,test18,a -测试获取objectType caselib objectId 19的动态信息 >> 19,admin,1 -测试获取objectType testreport objectId 20的动态信息 >> 20,dev17,1 -测试获取objectType entry objectId 21的动态信息 >> 21,test18,1 -测试获取objectType webhook objectId 22的动态信息 >> 22,admin,a -测试获取objectType review objectId 23的动态信息 >> 23,dev17,1 -测试获取objectType product objectId 24的动态信息 >> 24,test18,1 -测试获取objectType story objectId 25的动态信息 >> 25,admin,1 -测试获取objectType productplan objectId 26的动态信息 >> 26,dev17,1 -测试获取objectType release objectId 27的动态信息 >> 27,test18,1 -测试获取objectType project objectId 28的动态信息 >> 28,admin,33 -测试获取objectType task objectId 29的动态信息 >> 29,dev17,1 -测试获取objectType build objectId 30的动态信息 >> 30,test18,1 -测试获取objectType bug objectId 31的动态信息 >> 31,admin,1 -测试获取objectType testcase objectId 32的动态信息 >> 32,项目经理17,1 -测试获取objectType case objectId 33的动态信息 >> 33,test18,1 -测试获取objectType testtask objectId 34的动态信息 >> 34,admin,1 -测试获取objectType user objectId 35的动态信息 >> 35,dev17,1 -测试获取objectType doc objectId 36的动态信息 >> 36,test18,1 -测试获取objectType doclib objectId 37的动态信息 >> 37,admin,1 -测试获取objectType todo objectId 38的动态信息 >> 38,dev17,1 -测试获取objectType branch objectId 39的动态信息 >> 39,test18,a */ -$objectType = array('product', 'story', 'productplan', 'release', 'project', 'task', 'build', 'bug', 'testcase', 'case', 'testtask', 'user', 'doc', 'doclib', 'todo', 'branch', 'module', 'testsuite', 'caselib', 'testreport', 'entry', 'webhook', 'review'); -$objectId = array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39); +$objectType = array('story', 'task', 'bug', 'feedback', 'ticket', 'module', 'release', 'case', 'todo', 'testtask', 'risk', 'issue', 'opportunity', 'execution', 'project'); +$storyID = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43); +$taskID = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16); +$bugID = array(1, 2, 3, 4, 5, 6, 7, 8, 9); +$feedbackID = array(1, 2, 3, 4, 5, 6, 7); +$hasOneID = array(1); +$hasTwoID = array(1, 2); +$todoID = array(1, 2, 3, 4, 5); +$testtaskID = array(1, 2, 3); +$executionID = array(101, 102, 103, 104); +$projectID = array(11, 12, 13, 14); $action = new actionTest(); -r($action->getListTest($objectType[0], $objectId[0])) && p('id,actor,extra') && e('1,admin,1'); // 测试获取objectType product objectId 1的动态信息 -r($action->getListTest($objectType[1], $objectId[1])) && p('id,actor,extra') && e('2,dev17,1'); // 测试获取objectType story objectId 2的动态信息 -r($action->getListTest($objectType[2], $objectId[2])) && p('id,actor,extra') && e('3,test18,1'); // 测试获取objectType productplan objectId 3的动态信息 -r($action->getListTest($objectType[3], $objectId[3])) && p('id,actor,extra') && e('4,admin,1'); // 测试获取objectType release objectId 4的动态信息 -r($action->getListTest($objectType[4], $objectId[4])) && p('id,actor,extra') && e('5,dev17,11'); // 测试获取objectType project objectId 5的动态信息 -r($action->getListTest($objectType[5], $objectId[5])) && p('id,actor,extra') && e('6,test18,1'); // 测试获取objectType task objectId 6的动态信息 -r($action->getListTest($objectType[6], $objectId[6])) && p('id,actor,extra') && e('7,admin,1'); // 测试获取objectType build objectId 7的动态信息 -r($action->getListTest($objectType[7], $objectId[7])) && p('id,actor,extra') && e('8,dev17,1'); // 测试获取objectType bug objectId 8的动态信息 -r($action->getListTest($objectType[8], $objectId[8])) && p('id,actor,extra') && e('9,test18,2'); // 测试获取objectType testcase objectId 9的动态信息 -r($action->getListTest($objectType[9], $objectId[9])) && p('id,actor,extra') && e('10,admin,1'); // 测试获取objectType case objectId 10的动态信息 -r($action->getListTest($objectType[10], $objectId[10])) && p('id,actor,extra') && e('11,dev17,1'); // 测试获取objectType testtask objectId 11的动态信息 -r($action->getListTest($objectType[11], $objectId[11])) && p('id,actor,extra') && e('12,test18,1'); // 测试获取objectType user objectId 12的动态信息 -r($action->getListTest($objectType[12], $objectId[12])) && p('id,actor,extra') && e('13,admin,1'); // 测试获取objectType doc objectId 13的动态信息 -r($action->getListTest($objectType[13], $objectId[13])) && p('id,actor,extra') && e('14,dev17,1'); // 测试获取objectType doclib objectId 14的动态信息 -r($action->getListTest($objectType[14], $objectId[14])) && p('id,actor,extra') && e('15,test18,1'); // 测试获取objectType todo objectId 15的动态信息 -r($action->getListTest($objectType[15], $objectId[15])) && p('id,actor,extra') && e('16,admin,1'); // 测试获取objectType branch objectId 16的动态信息 -r($action->getListTest($objectType[16], $objectId[16])) && p('id,actor,extra') && e('17,dev17,1'); // 测试获取objectType module objectId 17的动态信息 -r($action->getListTest($objectType[17], $objectId[17])) && p('id,actor,extra') && e('18,test18,a'); // 测试获取objectType testsuite objectId 18的动态信息 -r($action->getListTest($objectType[18], $objectId[18])) && p('id,actor,extra') && e('19,admin,1'); // 测试获取objectType caselib objectId 19的动态信息 -r($action->getListTest($objectType[19], $objectId[19])) && p('id,actor,extra') && e('20,dev17,1'); // 测试获取objectType testreport objectId 20的动态信息 -r($action->getListTest($objectType[20], $objectId[20])) && p('id,actor,extra') && e('21,test18,1'); // 测试获取objectType entry objectId 21的动态信息 -r($action->getListTest($objectType[21], $objectId[21])) && p('id,actor,extra') && e('22,admin,a'); // 测试获取objectType webhook objectId 22的动态信息 -r($action->getListTest($objectType[22], $objectId[22])) && p('id,actor,extra') && e('23,dev17,1'); // 测试获取objectType review objectId 23的动态信息 -r($action->getListTest($objectType[0], $objectId[23])) && p('id,actor,extra') && e('24,test18,1'); // 测试获取objectType product objectId 24的动态信息 -r($action->getListTest($objectType[1], $objectId[24])) && p('id,actor,extra') && e('25,admin,1'); // 测试获取objectType story objectId 25的动态信息 -r($action->getListTest($objectType[2], $objectId[25])) && p('id,actor,extra') && e('26,dev17,1'); // 测试获取objectType productplan objectId 26的动态信息 -r($action->getListTest($objectType[3], $objectId[26])) && p('id,actor,extra') && e('27,test18,1'); // 测试获取objectType release objectId 27的动态信息 -r($action->getListTest($objectType[4], $objectId[27])) && p('id,actor,extra') && e('28,admin,33'); // 测试获取objectType project objectId 28的动态信息 -r($action->getListTest($objectType[5], $objectId[28])) && p('id,actor,extra') && e('29,dev17,1'); // 测试获取objectType task objectId 29的动态信息 -r($action->getListTest($objectType[6], $objectId[29])) && p('id,actor,extra') && e('30,test18,1'); // 测试获取objectType build objectId 30的动态信息 -r($action->getListTest($objectType[7], $objectId[30])) && p('id,actor,extra') && e('31,admin,1'); // 测试获取objectType bug objectId 31的动态信息 -r($action->getListTest($objectType[8], $objectId[31])) && p('id,actor,extra') && e('32,dev17,1'); // 测试获取objectType testcase objectId 32的动态信息 -r($action->getListTest($objectType[9], $objectId[32])) && p('id,actor,extra') && e('33,test18,1'); // 测试获取objectType case objectId 33的动态信息 -r($action->getListTest($objectType[10], $objectId[33])) && p('id,actor,extra') && e('34,admin,1'); // 测试获取objectType testtask objectId 34的动态信息 -r($action->getListTest($objectType[11], $objectId[34])) && p('id,actor,extra') && e('35,dev17,1'); // 测试获取objectType user objectId 35的动态信息 -r($action->getListTest($objectType[12], $objectId[35])) && p('id,actor,extra') && e('36,test18,1'); // 测试获取objectType doc objectId 36的动态信息 -r($action->getListTest($objectType[13], $objectId[36])) && p('id,actor,extra') && e('37,admin,1'); // 测试获取objectType doclib objectId 37的动态信息 -r($action->getListTest($objectType[14], $objectId[37])) && p('id,actor,extra') && e('38,dev17,1'); // 测试获取objectType todo objectId 38的动态信息 -r($action->getListTest($objectType[15], $objectId[38])) && p('id,actor,extra') && e('39,test18,a'); // 测试获取objectType branch objectId 39的动态信息 +// 操作以 linked2 或 unlinked2 开头 +r($action->getListTest($objectType[0], $storyID[0])) && p() && e('nochanged'); // 测试获取对象类型 story 对象ID 1 的动态信息 +r($action->getListTest($objectType[0], $storyID[1])) && p() && e('link'); // 测试获取对象类型 story 对象ID 2 的动态信息 +r($action->getListTest($objectType[0], $storyID[2])) && p() && e('nochanged'); // 测试获取对象类型 story 对象ID 3 的动态信息 +r($action->getListTest($objectType[0], $storyID[3])) && p() && e('link'); // 测试获取对象类型 story 对象ID 4 的动态信息 +r($action->getListTest($objectType[0], $storyID[4])) && p() && e('nochanged'); // 测试获取对象类型 story 对象ID 5 的动态信息 +r($action->getListTest($objectType[0], $storyID[5])) && p() && e('link'); // 测试获取对象类型 story 对象ID 6 的动态信息 +r($action->getListTest($objectType[0], $storyID[6])) && p() && e('nochanged'); // 测试获取对象类型 story 对象ID 7 的动态信息 +r($action->getListTest($objectType[0], $storyID[7])) && p() && e('link'); // 测试获取对象类型 story 对象ID 8 的动态信息 +r($action->getListTest($objectType[0], $storyID[8])) && p() && e('link'); // 测试获取对象类型 story 对象ID 9 的动态信息 +r($action->getListTest($objectType[0], $storyID[9])) && p() && e('link'); // 测试获取对象类型 story 对象ID 10 的动态信息 +r($action->getListTest($objectType[0], $storyID[10])) && p() && e('link'); // 测试获取对象类型 story 对象ID 11 的动态信息 +r($action->getListTest($objectType[0], $storyID[11])) && p() && e('link'); // 测试获取对象类型 story 对象ID 12 的动态信息 +r($action->getListTest($objectType[0], $storyID[12])) && p() && e('link'); // 测试获取对象类型 story 对象ID 13 的动态信息 +r($action->getListTest($objectType[0], $storyID[13])) && p() && e('nochanged'); // 测试获取对象类型 story 对象ID 14 的动态信息 +r($action->getListTest($objectType[0], $storyID[14])) && p() && e('link'); // 测试获取对象类型 story 对象ID 15 的动态信息 +r($action->getListTest($objectType[0], $storyID[15])) && p() && e('nochanged'); // 测试获取对象类型 story 对象ID 16 的动态信息 +r($action->getListTest($objectType[0], $storyID[16])) && p() && e('link'); // 测试获取对象类型 story 对象ID 17 的动态信息 +r($action->getListTest($objectType[0], $storyID[17])) && p() && e('nochanged'); // 测试获取对象类型 story 对象ID 18 的动态信息 +r($action->getListTest($objectType[0], $storyID[18])) && p() && e('link'); // 测试获取对象类型 story 对象ID 19 的动态信息 +r($action->getListTest($objectType[0], $storyID[19])) && p() && e('nochanged'); // 测试获取对象类型 story 对象ID 20 的动态信息 +r($action->getListTest($objectType[0], $storyID[20])) && p() && e('link'); // 测试获取对象类型 story 对象ID 21 的动态信息 +r($action->getListTest($objectType[0], $storyID[21])) && p() && e('link'); // 测试获取对象类型 story 对象ID 22 的动态信息 +r($action->getListTest($objectType[0], $storyID[22])) && p() && e('link'); // 测试获取对象类型 story 对象ID 23 的动态信息 +r($action->getListTest($objectType[0], $storyID[23])) && p() && e('link'); // 测试获取对象类型 story 对象ID 24 的动态信息 +r($action->getListTest($objectType[0], $storyID[24])) && p() && e('link'); // 测试获取对象类型 story 对象ID 25 的动态信息 +r($action->getListTest($objectType[0], $storyID[25])) && p() && e('link'); // 测试获取对象类型 story 对象ID 26 的动态信息 +r($action->getListTest($objectType[0], $storyID[26])) && p() && e('nochanged'); // 测试获取对象类型 story 对象ID 27 的动态信息 + +// 操作是 tostory 对象类型 bug +r($action->getListTest($objectType[2], $bugID[0])) && p() && e('link'); // 测试获取对象类型 bug 对象ID 1 的动态信息 +r($action->getListTest($objectType[2], $bugID[1])) && p() && e('link'); // 测试获取对象类型 bug 对象ID 2 的动态信息 +r($action->getListTest($objectType[2], $bugID[2])) && p() && e('link'); // 测试获取对象类型 bug 对象ID 3 的动态信息 + +// 操作是 tostory 对象类型 feedback +r($action->getListTest($objectType[3], $feedbackID[0])) && p() && e('nochanged'); // 测试获取对象类型 feedback 对象ID 1 的动态信息 + +// 操作是 tostory 对象类型 ticket +r($action->getListTest($objectType[4], $hasOneID[0])) && p() && e('nochanged'); // 测试获取对象类型 ticket 对象ID 1 的动态信息 + +// 操作是 moved 对象类型是 task +r($action->getListTest($objectType[1], $taskID[0])) && p() && e('link'); // 测试获取对象类型 task 对象ID 1 的动态信息 + +// 操作是 moved 对象类型是 module +r($action->getListTest($objectType[5], $hasOneID[0])) && p() && e('nochanged'); // 测试获取对象类型 module 对象ID 1 的动态信息 + +// 操作 frombug +r($action->getListTest($objectType[0], $storyID[27])) && p() && e('link'); // 测试获取对象类型 story 对象ID 28 的动态信息 + +// 操作 importedcard 对象存在 +r($action->getListTest($objectType[1], $taskID[1])) && p() && e('link'); // 测试获取对象类型 task 对象ID 2 的动态信息 + +// 操作 importedcard 对象不存在 +r($action->getListTest($objectType[1], $taskID[2])) && p() && e('nochanged'); // 测试获取对象类型 task 对象ID 3 的动态信息 + +// 操作 createchildren 关联任务非空 +r($action->getListTest($objectType[1], $taskID[3])) && p() && e('link'); // 测试获取对象类型 task 对象ID 4 的动态信息 + +// 操作 createchildren 关联任务为空 +r($action->getListTest($objectType[1], $taskID[4])) && p() && e('title'); // 测试获取对象类型 task 对象ID 5 的动态信息 + +// 操作 createrequirements 关联需求非空 +r($action->getListTest($objectType[0], $storyID[28])) && p() && e('link'); // 测试获取对象类型 story 对象ID 29 的动态信息 + +// 操作 createrequirements 关联需求为空 +r($action->getListTest($objectType[0], $storyID[29])) && p() && e('title'); // 测试获取对象类型 story 对象ID 30 的动态信息 + +// 操作 buildopened 关联发布非空 +r($action->getListTest($objectType[6], $hasTwoID[0])) && p() && e('link'); // 测试获取对象类型 release 对象ID 1 的动态信息 + +// 操作 buildopened 关联发布为空 +r($action->getListTest($objectType[6], $hasTwoID[1])) && p() && e('nochanged'); // 测试获取对象类型 release 对象ID 2 的动态信息 + +// 操作 fromlib 对象类型是 case 关联用例非空 +r($action->getListTest($objectType[7], $hasTwoID[0])) && p() && e('link'); // 测试获取对象类型 case 对象ID 1 的动态信息 + +// 操作 fromlib 对象类型是 case 关联用例为空 +r($action->getListTest($objectType[7], $hasTwoID[1])) && p() && e('nochanged'); // 测试获取对象类型 case 对象ID 2 的动态信息 + +// 操作 fromlib 对象类型是 story +r($action->getListTest($objectType[0], $storyID[30])) && p() && e('nochanged'); // 测试获取对象类型 story 对象ID 31 的动态信息 + +// 操作 finished 对象类型 todo extra task 存在 +r($action->getListTest($objectType[8], $todoID[0])) && p() && e('link'); // 测试获取对象类型 todo 对象ID 1 的动态信息 + +// 操作 finished 对象类型 todo extra task 不存在 +r($action->getListTest($objectType[8], $todoID[1])) && p() && e('link'); // 测试获取对象类型 todo 对象ID 2 的动态信息 + +// 操作 finished 对象类型 todo extra 为空 +r($action->getListTest($objectType[8], $todoID[2])) && p() && e('link'); // 测试获取对象类型 todo 对象ID 3 的动态信息 + +// 操作 finished 对象类型 story +r($action->getListTest($objectType[0], $storyID[31])) && p() && e('nochanged'); // 测试获取对象类型 story 对象ID 32 的动态信息 + +// 操作 closed 对象类型 story extra story 存在 +r($action->getListTest($objectType[0], $storyID[32])) && p() && e('link'); // 测试获取对象类型 story 对象ID 33 的动态信息 + +// 操作 closed 对象类型 story extra story 不存在 +r($action->getListTest($objectType[0], $storyID[33])) && p() && e('link'); // 测试获取对象类型 story 对象ID 34 的动态信息 + +// 操作 closed 对象类型 story extra 为空 +r($action->getListTest($objectType[0], $storyID[34])) && p() && e('link'); // 测试获取对象类型 story 对象ID 35 的动态信息 + +// 操作 closed 对象类型 todo +r($action->getListTest($objectType[8], $todoID[3])) && p() && e('nochanged'); // 测试获取对象类型 todo 对象ID 4 的动态信息 + +// 操作 resolved 对象类型 bug extra bug 存在 +r($action->getListTest($objectType[2], $bugID[3])) && p() && e('link'); // 测试获取对象类型 bug 对象ID 4 的动态信息 + +// 操作 resolved 对象类型 bug extra bug 不存在 +r($action->getListTest($objectType[2], $bugID[4])) && p() && e('link'); // 测试获取对象类型 bug 对象ID 5 的动态信息 + +// 操作 resolved 对象类型 bug extra 为空 +r($action->getListTest($objectType[2], $bugID[5])) && p() && e('link'); // 测试获取对象类型 bug 对象ID 6 的动态信息 + +// 操作 resolved 对象类型 todo +r($action->getListTest($objectType[8], $todoID[4])) && p() && e('nochanged'); // 测试获取对象类型 todo 对象ID 5 的动态信息 + +// 操作 totask 对象类型 task +r($action->getListTest($objectType[1], $taskID[5])) && p() && e('link'); // 测试获取对象类型 task 对象ID 6 的动态信息 + +// 操作 linkchildtask 对象类型 task +r($action->getListTest($objectType[1], $taskID[6])) && p() && e('link'); // 测试获取对象类型 task 对象ID 7 的动态信息 + +// 操作 unlinkchildrentask 对象类型 task +r($action->getListTest($objectType[1], $taskID[7])) && p() && e('link'); // 测试获取对象类型 task 对象ID 8 的动态信息 + +// 操作 linkparenttask 对象类型 task +r($action->getListTest($objectType[1], $taskID[8])) && p() && e('link'); // 测试获取对象类型 task 对象ID 9 的动态信息 + +// 操作 unlinkparenttask 对象类型 task +r($action->getListTest($objectType[1], $taskID[9])) && p() && e('link'); // 测试获取对象类型 task 对象ID 10 的动态信息 + +// 操作 deletechildrentask 对象类型 task +r($action->getListTest($objectType[1], $taskID[10])) && p() && e('link'); // 测试获取对象类型 task 对象ID 11 的动态信息 + +// 操作 totask 对象类型 feedback +r($action->getListTest($objectType[3], $feedbackID[1])) && p() && e('nochanged'); // 测试获取对象类型 feedback 对象ID 2 的动态信息 + +// 操作 linkchildtask 对象类型 feedback +r($action->getListTest($objectType[3], $feedbackID[2])) && p() && e('nochanged'); // 测试获取对象类型 feedback 对象ID 3 的动态信息 + +// 操作 unlinkchildrentask 对象类型 feedback +r($action->getListTest($objectType[3], $feedbackID[3])) && p() && e('nochanged'); // 测试获取对象类型 feedback 对象ID 4 的动态信息 + +// 操作 linkparenttask 对象类型 feedback +r($action->getListTest($objectType[3], $feedbackID[4])) && p() && e('nochanged'); // 测试获取对象类型 feedback 对象ID 5 的动态信息 + +// 操作 unlinkparenttask 对象类型 feedback +r($action->getListTest($objectType[3], $feedbackID[5])) && p() && e('nochanged'); // 测试获取对象类型 feedback 对象ID 6 的动态信息 + +// 操作 deletechildrentask 对象类型 feedback +r($action->getListTest($objectType[3], $feedbackID[6])) && p() && e('nochanged'); // 测试获取对象类型 feedback 对象ID 7 的动态信息 + +// 操作 linkchildstory +r($action->getListTest($objectType[0], $storyID[35])) && p() && e('link'); // 测试获取对象类型 story 对象ID 36 的动态信息 + +// 操作 unlinkchildrenstory +r($action->getListTest($objectType[0], $storyID[36])) && p() && e('link'); // 测试获取对象类型 story 对象ID 37 的动态信息 + +// 操作 linkparentstory +r($action->getListTest($objectType[0], $storyID[37])) && p() && e('link'); // 测试获取对象类型 story 对象ID 38 的动态信息 + +// 操作 unlinkparentstory +r($action->getListTest($objectType[0], $storyID[38])) && p() && e('link'); // 测试获取对象类型 story 对象ID 39 的动态信息 + +// 操作 deletechildrenstory +r($action->getListTest($objectType[0], $storyID[39])) && p() && e('link'); // 测试获取对象类型 story 对象ID 40 的动态信息 + +// 操作 testtaskopened +r($action->getListTest($objectType[9], $testtaskID[0])) && p() && e('link'); // 测试获取对象类型 testtask 对象ID 1 的动态信息 + +// 操作 testtaskstarted +r($action->getListTest($objectType[9], $testtaskID[1])) && p() && e('link'); // 测试获取对象类型 testtask 对象ID 2 的动态信息 + +// 操作 testtaskclosed +r($action->getListTest($objectType[9], $testtaskID[2])) && p() && e('link'); // 测试获取对象类型 testtask 对象ID 3 的动态信息 + +// 开源版 导入资产库相关 +// 操作 importfromstorylib +r($action->getListTest($objectType[1], $taskID[11])) && p() && e('nochanged'); // 测试获取对象类型 task 对象ID 12 的动态信息 + +// 操作 importfromrisklib +r($action->getListTest($objectType[10], $hasOneID[0])) && p() && e('nochanged'); // 测试 开源版 获取对象类型 risk 对象ID 1 的动态信息 + +// 操作 importfromissuelib +r($action->getListTest($objectType[11], $hasOneID[0])) && p() && e('nochanged'); // 测试 开源版 获取对象类型 isue 对象ID 1 的动态信息 + +// 操作 importfromopportunitylib +r($action->getListTest($objectType[12], $hasOneID[0])) && p() && e('nochanged'); // 测试 开源版 获取对象类型 opportunity 对象ID 1 的动态信息 + +// 旗舰版 导入资产库相关 +// 操作 importfromstorylib +r($action->getListTest($objectType[1], $taskID[11], 'max')) && p() && e('link'); // 测试获取对象类型 task 对象ID 12 的动态信息 + +// 操作 importfromrisklib +r($action->getListTest($objectType[10], $hasOneID[0], 'max')) && p() && e('link'); // 测试 开源版 获取对象类型 risk 对象ID 1 的动态信息 + +// 操作 importfromissuelib +r($action->getListTest($objectType[11], $hasOneID[0], 'max')) && p() && e('link'); // 测试 开源版 获取对象类型 isue 对象ID 1 的动态信息 + +// 操作 importfromopportunitylib +r($action->getListTest($objectType[12], $hasOneID[0], 'max')) && p() && e('link'); // 测试 开源版 获取对象类型 opportunity 对象ID 1 的动态信息 + +// 操作 opened 对象类型 execution +r($action->getListTest($objectType[13], $executionID[0])) && p() && e('link'); // 测试获取对象类型 execution 对象ID 1 的动态信息 + +// 操作 managed 对象类型 execution +r($action->getListTest($objectType[13], $executionID[1])) && p() && e('link'); // 测试获取对象类型 execution 对象ID 2 的动态信息 + +// 操作 edited 对象类型 execution +r($action->getListTest($objectType[13], $executionID[2])) && p() && e('link'); // 测试获取对象类型 execution 对象ID 3 的动态信息 + +// 操作 closed 对象类型 execution +r($action->getListTest($objectType[13], $executionID[3])) && p() && e('nochanged'); // 测试获取对象类型 execution 对象ID 4 的动态信息 + +// 操作 opened 对象类型 project +r($action->getListTest($objectType[14], $projectID[0])) && p() && e('link'); // 测试获取对象类型 project 对象ID 1 的动态信息 + +// 操作 managed 对象类型 project +r($action->getListTest($objectType[14], $projectID[1])) && p() && e('link'); // 测试获取对象类型 project 对象ID 2 的动态信息 + +// 操作 edited 对象类型 project +r($action->getListTest($objectType[14], $projectID[2])) && p() && e('link'); // 测试获取对象类型 project 对象ID 3 的动态信息 + +// 操作 closed 对象类型 project +r($action->getListTest($objectType[14], $projectID[3])) && p() && e('nochanged'); // 测试获取对象类型 project 对象ID 4 的动态信息 + +// 操作 linkstory +r($action->getListTest($objectType[0], $storyID[40])) && p() && e('link'); // 测试获取对象类型 story 对象ID 41 的动态信息 + +// 操作 unlinkstory +r($action->getListTest($objectType[0], $storyID[41])) && p() && e('link'); // 测试获取对象类型 story 对象ID 42 的动态信息 + +// 操作 createchildrenstory +r($action->getListTest($objectType[0], $storyID[42])) && p() && e('link'); // 测试获取对象类型 story 对象ID 43 的动态信息 + +// 操作 linkbug +r($action->getListTest($objectType[2], $bugID[6])) && p() && e('link'); // 测试获取对象类型 bug 对象ID 7 的动态信息 + +// 操作 unlinkbug +r($action->getListTest($objectType[2], $bugID[7])) && p() && e('link'); // 测试获取对象类型 bug 对象ID 8 的动态信息 + +// 操作 svncommited 操作者存在 +r($action->getListTest($objectType[1], $taskID[12])) && p() && e('nochanged'); // 测试获取对象类型 task 对象ID 13 的动态信息 + +// 操作 svncommited 操作者不存在 +r($action->getListTest($objectType[1], $taskID[13])) && p() && e('nochanged'); // 测试获取对象类型 task 对象ID 14 的动态信息 + +// 操作 gitcommited 操作者存在 +r($action->getListTest($objectType[1], $taskID[15])) && p() && e('nochanged'); // 测试获取对象类型 task 对象ID 16 的动态信息 + +// 操作 gitcommited 操作者不存在 +r($action->getListTest($objectType[1], $taskID[14])) && p() && e('nochanged'); // 测试获取对象类型 task 对象ID 15 的动态信息 diff --git a/module/action/test/model/yaml/getlist/action.yaml b/module/action/test/model/yaml/getlist/action.yaml new file mode 100644 index 0000000000..ee51f6e2d5 --- /dev/null +++ b/module/action/test/model/yaml/getlist/action.yaml @@ -0,0 +1,143 @@ +title: table zt_action +desc: "系统日志" +author: Mengyi Liu +version: "1.0" +fields: + - field: objectType + note: "对象类型" + range: "story, + story{13}, + story{13}, + bug{3},feedback,ticket, + task,module, + story, + task{2}, + task{2}, + story{2}, + release{2}, + case{2},story, + todo{3},story, + story{3},todo, + bug{3},todo, + task{6}, + feedback{6}, + story{5}, + testtask{3}, + task,risk,issue,opportunity, + execution{4},project{4}, + story{3}, + bug{2}, + task{2}, + task{2}" + - field: objectID + note: "对象ID" + range: "1, + 2-14, + 15-27, + 1-3,1{2}, + 1{2}, + 28, + 2-3, + 4-5, + 29-30, + 1-2, + 1-2,31, + 1-3,32, + 33-35,4, + 4-6,5, + 6-11, + 2-7, + 36-40, + 1-3, + 12,1,1,1, + 101-104,11-14, + 41-43, + 7-8, + 13-14, + 15-16" + - field: product + note: "产品" + range: "1, + 1{13}, + 1{13}, + 1,2,3,1{2}, + 0{2}, + 0, + 0{2}, + 0{2}, + 1{2}, + 1{2}, + 1{3}, + 0{4}, + 1{4}, + 1{4}, + 0{6}, + 0{6}, + 1{5}, + 1{3}, + 0{4}, + 0{4}, + 0{4}, + 0{2}, + 0{2}" + - field: project + note: "项目" + range: 1-86,11-14 + - field: action + note: "动作" + range: "linked2product, + linked2project{2},linked2execution{2},linked2kanban{2},linked2plan,linked2productplan,linked2build,linked2bug,linked2release,linked2testtask,linked2revision, + unlinkedfromproject{2},unlinkedfromexecution{2},unlinkedfromkanban{2},unlinkedfromplan,unlinkedfromproductplan,unlinkedfrombuild,unlinkedfrombug,unlinkedfromrelease,unlinkedfromtesttask,unlinkedfromrevision, + tostory{5}, + moved{2}, + frombug, + importedcard{2}, + createchildren{2}, + createrequirements{2}, + buildopened{2}, + fromlib{3}, + finished{4}, + closed{4}, + resolved{4}, + totask,linkchildtask,unlinkchildrentask,linkparenttask,unlinkparenttask,deletechildrentask, + totask,linkchildtask,unlinkchildrentask,linkparenttask,unlinkparenttask,deletechildrentask, + linkchildstory,unlinkchildrenstory,linkparentstory,unlinkparentstory,deletechildrenstory, + testtaskopened,testtaskstarted,testtaskclosed, + importfromstorylib,importfromrisklib,importfromissuelib,importfromopportunitylib, + opened,managed,edited,closed,opened,managed,edited,closed, + linkstory,unlinkstory,createchildrenstory, + linkbug,unlinkbug, + svncommited{2}, + gitcommited{2}" + - field: extra + note: "附加参数" + range: "1, + 11,102,101,102,161,162,1{7}, + 11,102,101,102,161,162,1{7}, + 2,6,9,1{2}, + 1{2}, + 1, + 1,2, + `2,3`,0, + `2,3`,0, + `2,3`,0, + `2,3`,0{2}, + `task:1`,`task:10000`,0{2}, + `story:1`,`story:10000`,0{2}, + `bug:1`,`bug:10000`,0{2}, + 1{6}, + 1{6}, + 1{5}, + 1{3}, + `1,2`{8}, + 1{4}, + 1{4}, + 1{2}, + 1{2}" + - field: actor + note: "操作者" + fields: + - field: actor1 + range: admin,user,admin,test + - field: actor2 + range: "[],1,[],2" diff --git a/module/action/test/model/yaml/getlist/product.yaml b/module/action/test/model/yaml/getlist/product.yaml new file mode 100644 index 0000000000..f64182119e --- /dev/null +++ b/module/action/test/model/yaml/getlist/product.yaml @@ -0,0 +1,8 @@ +title: table zt_product +desc: "产品" +author: Mengyi Liu +version: "1.0" +fields: + - field: shadow + note: "影子产品" + range: 0,1,0{38} diff --git a/module/action/test/yaml/execution.yaml b/module/action/test/yaml/execution.yaml index c01c1e03cb..58ae592b14 100644 --- a/module/action/test/yaml/execution.yaml +++ b/module/action/test/yaml/execution.yaml @@ -73,3 +73,5 @@ fields: - from: common.user.v1.yaml use: three{8} prefix: "," + - field: multiple + range: 1,0,1{28} diff --git a/test/data/assetlib.yaml b/test/data/assetlib.yaml new file mode 100644 index 0000000000..19cd939ab6 --- /dev/null +++ b/test/data/assetlib.yaml @@ -0,0 +1,29 @@ +title: zt_assetlib +author: Mengyi liu +version: "1.0" +fields: + - field: id + range: 1-1000 + - field: name + fields: + - field: name1 + range: 需求,风险,问题,机会 + - field: name2 + range: 库 + - field: name3 + range: 1-10000{4} + - field: type + range: story,risk,issue,opportunity + - field: desc + range: "" + - field: order + range: 0 + - field: createdBy + range: admin + - field: createdDate + note: "创建日期" + range: "(M)-(w)" + type: timestamp + format: "YY/MM/DD" + - field: deleted + range: 0 diff --git a/test/data/kanban.yaml b/test/data/kanban.yaml index 0df05382ee..4bf2a498f2 100644 --- a/test/data/kanban.yaml +++ b/test/data/kanban.yaml @@ -69,13 +69,5 @@ fields: type: timestamp format: "YYYY-MM-DD" prefix: "\t" - - field: lastEditedBy - range: "" - - field: lastEditedDate - range: "" - - field: closedBy - range: "" - - field: closedDate - range: "" - field: deleted range: "0"