Merge branch 'master' into zenops_46_tanghucheng
This commit is contained in:
@@ -63,7 +63,7 @@ $config->action->majorList['project'] = array('opened', 'edited');
|
||||
$config->action->majorList['execution'] = array('opened', 'edited');
|
||||
|
||||
$config->action->needGetProjectType = 'build,task,bug,case,testcase,caselib,testtask,testsuite,testreport,doc,issue,release,risk,design,opportunity,trainplan,gapanalysis,researchplan,researchreport,';
|
||||
$config->action->needGetRelateField = ',story,productplan,release,task,build,bug,testcase,case,testtask,testreport,doc,doclib,issue,risk,opportunity,trainplan,gapanalysis,team,whitelist,researchplan,researchreport,meeting,kanbanlane,kanbancolumn,module,';
|
||||
$config->action->needGetRelateField = ',story,productplan,release,task,build,bug,testcase,case,testtask,testreport,doc,doclib,issue,risk,opportunity,trainplan,gapanalysis,team,whitelist,researchplan,researchreport,meeting,kanbanlane,kanbancolumn,module,review,';
|
||||
$config->action->noLinkModules = ',doclib,module,webhook,gitlab,gitea,gogs,sonarqube,pipeline,jenkins,kanban,kanbanspace,kanbancolumn,kanbanlane,kanbanregion,kanbancard,execution,project,traincategory,apistruct,program,product,user,entry,repo,';
|
||||
$config->action->ignoreObjectType4Dynamic = 'kanbanregion,kanbanlane,kanbancolumn';
|
||||
|
||||
|
||||
@@ -231,6 +231,7 @@ $lang->action->desc->suspend = '$date, the ZenAgent Node is suspend
|
||||
$lang->action->desc->resume = '$date, the ZenAgent Node is resumed by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->reboot = '$date, the ZenAgent Node is reboot by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->destroy = '$date, the ZenAgent Node is destroyed by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->relieved = '$date, relieved by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->switchtolight = '$date, Switch from ALM mode to light mode by <strong>'. $lang->admin->system .'</strong>.' . "\n";
|
||||
$lang->action->desc->getvnc = '$date, Remote control <strong>$extra</strong> by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->unlinkproduct = '$date, the project is disassociated from the $extra, synchronization disassociates the ' . $lang->executionCommon . 's of the project from the $extra.' . "\n";
|
||||
@@ -408,6 +409,8 @@ $lang->action->label->suspend = 'suspended';
|
||||
$lang->action->label->resume = 'resumed';
|
||||
$lang->action->label->reboot = 'reboot';
|
||||
$lang->action->label->destroy = 'destroyed';
|
||||
$lang->action->label->synctwins = 'synchronized changes';
|
||||
$lang->action->label->relieved = 'relieved';
|
||||
$lang->action->label->switchtolight = 'switch from ALM mode to light mode';
|
||||
$lang->action->label->linkedrepo = 'Linked Code Repo';
|
||||
$lang->action->label->unlinkedrepo = 'Unlinked Code Repo';
|
||||
|
||||
@@ -231,6 +231,7 @@ $lang->action->desc->suspend = '$date, the ZenAgent Node is suspend
|
||||
$lang->action->desc->resume = '$date, the ZenAgent Node is resumed by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->reboot = '$date, the ZenAgent Node is reboot by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->destroy = '$date, the ZenAgent Node is destroyed by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->relieved = '$date, relieved by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->switchtolight = '$date, Switch from ALM mode to light mode by <strong>'. $lang->admin->system .'</strong>.' . "\n";
|
||||
$lang->action->desc->getvnc = '$date, Remote control <strong>$extra</strong> by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->unlinkproduct = '$date, the project is disassociated from the $extra, synchronization disassociates the ' . $lang->executionCommon . 's of the project from the $extra.' . "\n";
|
||||
@@ -408,6 +409,8 @@ $lang->action->label->suspend = 'suspended';
|
||||
$lang->action->label->resume = 'resumed';
|
||||
$lang->action->label->reboot = 'reboot';
|
||||
$lang->action->label->destroy = 'destroyed';
|
||||
$lang->action->label->synctwins = 'synchronized changes';
|
||||
$lang->action->label->relieved = 'relieved';
|
||||
$lang->action->label->switchtolight = 'switch from ALM mode to light mode';
|
||||
$lang->action->label->linkedrepo = 'Linked Code Repo';
|
||||
$lang->action->label->unlinkedrepo = 'Unlinked Code Repo';
|
||||
|
||||
@@ -231,6 +231,7 @@ $lang->action->desc->suspend = '$date, the ZenAgent Node is suspend
|
||||
$lang->action->desc->resume = '$date, the ZenAgent Node is resumed by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->reboot = '$date, the ZenAgent Node is reboot by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->destroy = '$date, the ZenAgent Node is destroyed by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->relieved = '$date, relieved by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->switchtolight = '$date, Switch from ALM mode to light mode by <strong>'. $lang->admin->system .'</strong>.' . "\n";
|
||||
$lang->action->desc->getvnc = '$date, Remote control <strong>$extra</strong> by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->unlinkproduct = '$date, the project is disassociated from the $extra, synchronization disassociates the ' . $lang->executionCommon . 's of the project from the $extra.' . "\n";
|
||||
@@ -408,6 +409,8 @@ $lang->action->label->suspend = 'suspended';
|
||||
$lang->action->label->resume = 'resumed';
|
||||
$lang->action->label->reboot = 'reboot';
|
||||
$lang->action->label->destroy = 'destroyed';
|
||||
$lang->action->label->synctwins = 'synchronized changes';
|
||||
$lang->action->label->relieved = 'relieved';
|
||||
$lang->action->label->switchtolight = 'switch from ALM mode to light mode';
|
||||
$lang->action->label->linkedrepo = 'Linked Code Repo';
|
||||
$lang->action->label->unlinkedrepo = 'Unlinked Code Repo';
|
||||
|
||||
@@ -318,6 +318,7 @@ $lang->action->label->suspend = 'suspended';
|
||||
$lang->action->label->resume = 'resumed';
|
||||
$lang->action->label->reboot = 'reboot';
|
||||
$lang->action->label->destroy = 'destroyed';
|
||||
$lang->action->label->synctwins = 'synchronized changes';
|
||||
$lang->action->label->linkedrepo = 'Linked Code Repo';
|
||||
$lang->action->label->unlinkedrepo = 'Unlinked Code Repo';
|
||||
|
||||
|
||||
@@ -231,6 +231,7 @@ $lang->action->desc->suspend = '$date, 由 <strong>$actor</strong>
|
||||
$lang->action->desc->resume = '$date, 由 <strong>$actor</strong> 恢复。' . "\n";
|
||||
$lang->action->desc->reboot = '$date, 由 <strong>$actor</strong> 重启。' . "\n";
|
||||
$lang->action->desc->destroy = '$date, 由 <strong>$actor</strong> 销毁。' . "\n";
|
||||
$lang->action->desc->relieved = '$date, 由 <strong>$actor</strong> 解除孪生需求关系。' . "\n";
|
||||
$lang->action->desc->switchtolight = '$date, 由于 <strong>'. $lang->admin->system .'</strong> 从全生命周期管理模式切换为轻量管理模式,项目访问控制由项目集内公开调整为私有。' . "\n";
|
||||
$lang->action->desc->getvnc = '$date, <strong>$actor</strong>对执行节点 <strong>$extra</strong> 进行了远程操控。' . "\n";
|
||||
$lang->action->desc->unlinkproduct = '$date, 系统判断由于' . $lang->executionCommon . '所属项目与$extra取消关联,同步将' . $lang->executionCommon . '与$extra取消关联。' . "\n";
|
||||
@@ -409,6 +410,8 @@ $lang->action->label->resume = '恢复了';
|
||||
$lang->action->label->reboot = '重启了';
|
||||
$lang->action->label->destroy = '销毁了';
|
||||
$lang->action->label->getvnc = '远程操控';
|
||||
$lang->action->label->synctwins = '同步修改了';
|
||||
$lang->action->label->relieved = '解除了';
|
||||
$lang->action->label->switchtolight = '从全生命周期管理模式切换为轻量管理模式';
|
||||
$lang->action->label->linkedrepo = '关联代码库到';
|
||||
$lang->action->label->unlinkedrepo = '取消了项目与代码库的关联';
|
||||
|
||||
+26
-1
@@ -50,7 +50,7 @@ class actionModel extends model
|
||||
$action->extra = $extra;
|
||||
if(!defined('IN_UPGRADE')) $action->vision = $this->config->vision;
|
||||
|
||||
if($objectType == 'story' and strpos(',reviewpassed,reviewrejected,reviewclarified,reviewreverted,', ",$actionType,") !== false) $action->actor = $this->lang->action->system;
|
||||
if($objectType == 'story' and strpos(',reviewpassed,reviewrejected,reviewclarified,reviewreverted,synctwins,', ",$actionType,") !== false) $action->actor = $this->lang->action->system;
|
||||
|
||||
/* Use purifier to process comment. Fix bug #2683. */
|
||||
$action->comment = fixer::stripDataTags($comment);
|
||||
@@ -289,6 +289,15 @@ class actionModel extends model
|
||||
if(strpos(',deleted,', ",$actionType,") !== false) $module = $this->dao->select('*')->from(TABLE_MODULE)->where('id')->eq($objectID)->fetch();
|
||||
if(!empty($module) and $module->type == 'story') $record['product'] = $module->root;
|
||||
break;
|
||||
case 'review':
|
||||
$result = $this->dao->select('*')->from($this->config->objectTables[$objectType])->where('id')->eq($objectID)->fetch();
|
||||
if($result)
|
||||
{
|
||||
$products = $this->dao->select('product')->from(TABLE_PROJECTPRODUCT)->where('project')->eq($result->project)->fetchPairs('product');
|
||||
$record['product'] = join(',', array_keys($products));
|
||||
$record['project'] = zget($result, 'project', 0);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
$result = $this->dao->select('*')->from($this->config->objectTables[$objectType])->where('id')->eq($objectID)->fetch();
|
||||
$record['product'] = zget($result, 'product', '0');
|
||||
@@ -964,6 +973,17 @@ class actionModel extends model
|
||||
}
|
||||
}
|
||||
|
||||
if($action->objectType == 'story' and $action->action == 'synctwins')
|
||||
{
|
||||
if(!empty($extra) and strpos($extra, '|') !== false)
|
||||
{
|
||||
list($operate, $storyID) = explode('|', $extra);
|
||||
$desc['operate'] = $this->lang->$objectType->{$desc['operate']};
|
||||
$link = common::hasPriv('story', 'view') ? html::a(helper::createLink('story', 'view', "storyID=$storyID"), "#$storyID ") : "#$storyID";
|
||||
$actionDesc = str_replace(array('$extra', '$operate'), array($link, $desc['operate'][$operate]), $desc['main']);
|
||||
}
|
||||
}
|
||||
|
||||
if($action->objectType == 'module' and strpos(',created,moved,', $action->action) !== false)
|
||||
{
|
||||
$moduleNames = $this->loadModel('tree')->getOptionMenu($action->objectID, 'story', 0, 'all', '');
|
||||
@@ -1834,6 +1854,11 @@ class actionModel extends model
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif($action->objectType == 'release')
|
||||
{
|
||||
$release = $this->dao->select('*')->from(TABLE_RELEASE)->where('id')->eq($action->objectID)->fetch();
|
||||
if($release->shadow) $this->dao->update(TABLE_BUILD)->set('deleted')->eq(0)->where('id')->eq($release->shadow)->exec();
|
||||
}
|
||||
|
||||
/* Update deleted field in object table. */
|
||||
$table = $this->config->objectTables[$action->objectType];
|
||||
|
||||
Reference in New Issue
Block a user