* [bug] for batch create test task speed.
This commit is contained in:
+6
-1
@@ -199,11 +199,16 @@ class mailTao extends mailModel
|
||||
$objectModel = $objectType == 'kanbancard' ? $this->loadModel('kanban') : $this->loadModel($objectType);
|
||||
if(!$objectModel) return false;
|
||||
|
||||
$getObjectMethod = $objectType == 'kanbancard' ? 'getCardByID' : 'fetchByID';
|
||||
$getObjectMethod = $objectType == 'kanbancard' ? 'getCardByID' : 'getByID';
|
||||
if($objectType == 'task') $getObjectMethod = 'fetchByID';
|
||||
if(method_exists($objectModel, $getObjectMethod))
|
||||
{
|
||||
$object = call_user_func(array($objectModel, $getObjectMethod), $objectID);
|
||||
}
|
||||
else
|
||||
{
|
||||
$object = $objectModel->fetchByID($objectID);
|
||||
}
|
||||
|
||||
if(!$object) return false;
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
/**
|
||||
|
||||
title=测试 mailModel->getObjectForMail();
|
||||
timeout=0
|
||||
cid=0
|
||||
|
||||
- 不传入任何参数 @0
|
||||
@@ -96,4 +97,4 @@ r((array)$mailModel->getObjectForMail('story', 1)) && p('id,product,type,ti
|
||||
r((array)$mailModel->getObjectForMail('task', 1)) && p('id,project,execution,name,desc,type,status') && e('1,11,101,开发任务11,这里是任务描述1,design,wait'); //获取任务ID=1的数据
|
||||
r((array)$mailModel->getObjectForMail('bug', 1)) && p('id,product,title,steps,status') && e('1,1,BUG1,<p>【步骤】</p><br/><p>【结果】</p><br/><p>【期望】</p><br/>,active'); //获取Bug ID=1的数据
|
||||
r((array)$mailModel->getObjectForMail('kanbancard', 1)) && p('id,kanban,name,status,assignedTo') && e('1,1,卡片1,doing,admin'); //获取看板卡片ID=1的数据
|
||||
r((array)$mailModel->getObjectForMail('release', 1)) && p('id,product,build,name,status') && e('1,1,1,产品正常的正常的发布1,normal'); //获取发布ID=1的数据
|
||||
r((array)$mailModel->getObjectForMail('release', 1)) && p('id,product,build,name,status') && e('1,1,1,产品正常的正常的发布1,normal'); //获取发布ID=1的数据
|
||||
Reference in New Issue
Block a user