* Code for trashes.
This commit is contained in:
@@ -54,4 +54,4 @@ $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,case,testtask,testreport,doc,doclib,issue,risk,opportunity,trainplan,gapanalysis,team,whitelist,researchplan,researchreport,meeting,kanbanlane,kanbancolumn,';
|
||||
$config->action->noLinkModules = ',doclib,module,webhook,gitlab,pipeline,jenkins,';
|
||||
$config->action->noLinkModules = ',doclib,module,webhook,gitlab,pipeline,jenkins,kanbancolumn,kanbanlane,kanbanregion,kanbancard,';
|
||||
|
||||
+2
-22
@@ -608,7 +608,6 @@ class actionModel extends model
|
||||
$typeTrashes[$object->objectType][] = $object->objectID;
|
||||
}
|
||||
|
||||
$kanbanModuleList = array('kanbanspace', 'kanban', 'kanbanregion', 'kanbanlane', 'kanbancolumn', 'kanbancard');
|
||||
foreach($typeTrashes as $objectType => $objectIdList)
|
||||
{
|
||||
if(!isset($this->config->objectTables[$objectType])) continue;
|
||||
@@ -621,10 +620,6 @@ class actionModel extends model
|
||||
$objectNames['jenkins'] = $this->dao->select("id, $field AS name")->from($table)->where('id')->in($objectIdList)->andWhere('type')->eq('jenkins')->fetchPairs();
|
||||
$objectNames['gitlab'] = $this->dao->select("id, $field AS name")->from($table)->where('id')->in($objectIdList)->andWhere('type')->eq('gitlab')->fetchPairs();
|
||||
}
|
||||
elseif(in_array($objectType, $kanbanModuleList))
|
||||
{
|
||||
$objectNames[$objectType] = $this->dao->select("*")->from($table)->where('id')->in($objectIdList)->fetchAll('id');
|
||||
}
|
||||
else
|
||||
{
|
||||
$objectNames[$objectType] = $this->dao->select("id, $field AS name")->from($table)->where('id')->in($objectIdList)->fetchPairs();
|
||||
@@ -640,24 +635,9 @@ class actionModel extends model
|
||||
if(isset($objectNames['gitlab'][$trash->objectID])) $objectType = 'gitlab';
|
||||
if(isset($objectNames['jenkins'][$trash->objectID])) $objectType = 'jenkins';
|
||||
$trash->objectType = $objectType;
|
||||
$trash->objectName = isset($objectNames[$objectType][$trash->objectID]) ? $objectNames[$objectType][$trash->objectID] : '';
|
||||
}
|
||||
elseif(in_array($objectType, $kanbanModuleList))
|
||||
{
|
||||
if($trash->objectID == 0)
|
||||
{
|
||||
$trash->kanbanID = 0;
|
||||
}
|
||||
elseif($objectType == 'kanbanregion')
|
||||
{
|
||||
$trash->kanbanID = $objectNames[$objectType][$trash->objectID]->kanban;
|
||||
}
|
||||
elseif(in_array($objectType, array('kanbanlane', 'kanbancolumn', 'kanbancard')))
|
||||
{
|
||||
$trash->kanbanID = $this->loadModel('kanban')->getRegionById($objectNames[$objectType][$trash->objectID]->region)->kanban;
|
||||
}
|
||||
$trash->objectName = isset($objectNames[$objectType][$trash->objectID]->name) ? $objectNames[$objectType][$trash->objectID]->name : '';
|
||||
}
|
||||
|
||||
$trash->objectName = isset($objectNames[$objectType][$trash->objectID]) ? $objectNames[$objectType][$trash->objectID] : '';
|
||||
}
|
||||
return $trashes;
|
||||
}
|
||||
|
||||
@@ -75,10 +75,6 @@
|
||||
{
|
||||
echo html::a($this->createLink('kanban', 'space'), $action->objectName, '_self', "title={$action->objectName}");
|
||||
}
|
||||
elseif(in_array($action->objectType, array('kanbanregion', 'kanbanlane', 'kanbancolumn', 'kanbancard')))
|
||||
{
|
||||
echo html::a($this->createLink('kanban', 'view', "kanbanID={$action->kanbanID}"), $action->objectName, '_self', "title={$action->objectName}");
|
||||
}
|
||||
else
|
||||
{
|
||||
$tab = '';
|
||||
|
||||
Reference in New Issue
Block a user