diff --git a/api/v1/entries/options.php b/api/v1/entries/options.php
new file mode 100644
index 0000000000..651ebd7d7b
--- /dev/null
+++ b/api/v1/entries/options.php
@@ -0,0 +1,46 @@
+
+ * @package entries
+ * @version 1
+ * @link http://www.zentao.net
+ */
+class optionsEntry extends entry
+{
+ /**
+ * GET method.
+ *
+ * @param string $type
+ * @access public
+ * @return void
+ */
+ public function get($type = '')
+ {
+ if(!$type) return $this->sendError(400, 'error');
+
+ $options = array();
+ switch($type)
+ {
+ case 'bug':
+ $this->app->loadLang('bug');
+ $options['type'] = $this->lang->bug->typeList;
+ $options['pri'] = $this->lang->bug->priList;
+ $options['severity'] = $this->lang->bug->severityList;
+
+ $options['modules'] = new stdclass();
+ $product = $this->param('product', 0);
+ if($product) $options['modules'] = $this->loadModel('tree')->getOptionMenu($product, 'bug');
+
+ $execution = $this->param('execution', 0);
+ $options['build'] = $this->loadModel('build')->getBuildPairs($product, 'all', '', $execution, 'execution');
+
+ break;
+ }
+
+ return $this->send(200, array('options' => $options));
+ }
+}
diff --git a/config/routes.php b/config/routes.php
index c7af65ffab..035417268a 100644
--- a/config/routes.php
+++ b/config/routes.php
@@ -16,6 +16,8 @@ $routes['/tabs/:module'] = 'tabs';
$routes['/files'] = 'files';
$routes['/files/:id'] = 'file';
+$routes['/options/:type'] = 'options';
+
$routes['/configurations'] = 'configs';
$routes['/configurations/:name'] = 'config';
diff --git a/extension/lite/common/ext/lang/en/lite.php b/extension/lite/common/ext/lang/en/lite.php
index c52725fcb6..44395058dd 100644
--- a/extension/lite/common/ext/lang/en/lite.php
+++ b/extension/lite/common/ext/lang/en/lite.php
@@ -139,9 +139,11 @@ $lang->doc->menuOrder[30] = 'custom';
$lang->doc->menu->project['subMenu'] = new stdclass();
$lang->doc->menu->custom['subMenu'] = new stdclass();
+$xuanxuanMenu = $lang->admin->menu->xuanxuan;
/* Admin menu. */
$lang->admin->menu = new stdclass();
$lang->admin->menu->index = array('link' => "$lang->indexPage|admin|index", 'alias' => 'register,certifytemail,certifyztmobile,ztcompany');
+$lang->admin->menu->xuanxuan = $xuanxuanMenu;
$lang->admin->menu->company = array('link' => "{$lang->personnel->common}|company|browse|", 'subModule' => ',user,dept,group,');
$lang->admin->menu->custom = array('link' => "{$lang->custom->common}|custom|index", 'exclude' => 'custom-browsestoryconcept,custom-timezone,custom-estimate');
$lang->admin->menu->extension = array('link' => "{$lang->extension->common}|extension|browse", 'subModule' => 'extension');
@@ -149,9 +151,12 @@ $lang->admin->menu->dev = array('link' => "$lang->redev|dev|api", 'alias'
$lang->admin->menu->message = array('link' => "{$lang->message->common}|message|index", 'subModule' => 'message,mail,webhook,sms');
$lang->admin->menu->system = array('link' => "{$lang->admin->system}|backup|index", 'subModule' => 'cron,backup,action,admin,search,ldap', 'exclude' => 'admin-index,admin-xuanxuan,admin-register,admin-ztcompany');
+$lang->admin->menu->xuanxuan['link'] = 'Chat|admin|xuanxuan';
+
/* Admin menu order. */
$lang->admin->menuOrder = array();
$lang->admin->menuOrder[5] = 'index';
+$lang->admin->menuOrder[6] = 'xuanxuan';
$lang->admin->menuOrder[10] = 'company';
$lang->admin->menuOrder[15] = 'custom';
$lang->admin->menuOrder[20] = 'message';
diff --git a/extension/lite/common/ext/lang/zh-cn/lite.php b/extension/lite/common/ext/lang/zh-cn/lite.php
index 9c77550db4..c01a054394 100644
--- a/extension/lite/common/ext/lang/zh-cn/lite.php
+++ b/extension/lite/common/ext/lang/zh-cn/lite.php
@@ -139,9 +139,11 @@ $lang->doc->menuOrder[30] = 'custom';
$lang->doc->menu->project['subMenu'] = new stdclass();
$lang->doc->menu->custom['subMenu'] = new stdclass();
+$xuanxuanMenu = $lang->admin->menu->xuanxuan;
/* Admin menu. */
$lang->admin->menu = new stdclass();
$lang->admin->menu->index = array('link' => "$lang->indexPage|admin|index", 'alias' => 'register,certifytemail,certifyztmobile,ztcompany');
+$lang->admin->menu->xuanxuan = $xuanxuanMenu;
$lang->admin->menu->company = array('link' => "{$lang->personnel->common}|company|browse|", 'subModule' => ',user,dept,group,');
$lang->admin->menu->custom = array('link' => "{$lang->custom->common}|custom|index", 'exclude' => 'custom-browsestoryconcept,custom-timezone,custom-estimate');
$lang->admin->menu->extension = array('link' => "{$lang->extension->common}|extension|browse", 'subModule' => 'extension');
@@ -149,9 +151,12 @@ $lang->admin->menu->dev = array('link' => "$lang->redev|dev|api", 'alias'
$lang->admin->menu->message = array('link' => "{$lang->message->common}|message|index", 'subModule' => 'message,mail,webhook,sms');
$lang->admin->menu->system = array('link' => "{$lang->admin->system}|backup|index", 'subModule' => 'cron,backup,action,admin,search,ldap', 'exclude' => 'admin-index,admin-xuanxuan,admin-register,admin-ztcompany');
+$lang->admin->menu->xuanxuan['link'] = '聊天|admin|xuanxuan';
+
/* Admin menu order. */
$lang->admin->menuOrder = array();
$lang->admin->menuOrder[5] = 'index';
+$lang->admin->menuOrder[6] = 'xuanxuan';
$lang->admin->menuOrder[10] = 'company';
$lang->admin->menuOrder[15] = 'custom';
$lang->admin->menuOrder[20] = 'message';
diff --git a/module/bug/control.php b/module/bug/control.php
index f692cd8dc7..2f7ae401a4 100644
--- a/module/bug/control.php
+++ b/module/bug/control.php
@@ -1260,13 +1260,13 @@ class bug extends control
}
}
if(defined('RUN_MODE') && RUN_MODE == 'api')
- {
+ {
return $this->send(array('status' => 'success', 'data' => $bugID));
- }
- else
- {
+ }
+ else
+ {
return print(js::locate($this->createLink('bug', 'view', "bugID=$bugID"), 'parent'));
- }
+ }
}
if($this->app->tab == 'project')
@@ -2235,7 +2235,7 @@ class bug extends control
}
/**
- * Ajax get bug filed options for auto test.
+ * Ajax get bug field options for auto test.
*
* @param int $productID
* @param int $executionID
diff --git a/module/doc/css/editlib.css b/module/doc/css/editlib.css
index da498e6a63..b69d2fa8e3 100644
--- a/module/doc/css/editlib.css
+++ b/module/doc/css/editlib.css
@@ -2,3 +2,5 @@ form {margin-right: 30px;}
#whiteListBox div.input-group {margin-bottom: 2px;}
#whiteListBox .input-group:last-child {margin-top: 10px;}
+
+.center-block {margin-top: 20px;}
diff --git a/module/execution/css/batchedit.en.css b/module/execution/css/batchedit.en.css
new file mode 100644
index 0000000000..d076cb8a7a
--- /dev/null
+++ b/module/execution/css/batchedit.en.css
@@ -0,0 +1,2 @@
+.c-user {width: 150px !important;}
+.c-date {width: 125px;}
diff --git a/module/execution/model.php b/module/execution/model.php
index 8785d4c451..77f3417d65 100644
--- a/module/execution/model.php
+++ b/module/execution/model.php
@@ -718,6 +718,8 @@ class executionModel extends model
->limit(1)
->exec();
+ if(dao::isError()) return false;
+
if(!empty($execution->project) and $oldExecution->project != $execution->project)
{
$execution->parent = $execution->project;
diff --git a/module/group/lang/resource.php b/module/group/lang/resource.php
index 4c9e654c9a..e9307dd88c 100644
--- a/module/group/lang/resource.php
+++ b/module/group/lang/resource.php
@@ -784,7 +784,7 @@ $lang->resource->execution->whitelist = 'whitelist';
$lang->resource->execution->addWhitelist = 'addWhitelist';
$lang->resource->execution->unbindWhitelist = 'unbindWhitelist';
$lang->resource->execution->storyEstimate = 'storyEstimate';
-$lang->resource->execution->executionkanban = 'kanbanAction';
+if($config->systemMode == 'new') $lang->resource->execution->executionkanban = 'kanbanAction';
$lang->resource->execution->kanban = 'RDKanban';
//if($config->systemMode == 'classic') $lang->resource->project->list = 'list';
diff --git a/module/product/model.php b/module/product/model.php
index 263dee40b4..5ec8aa627e 100644
--- a/module/product/model.php
+++ b/module/product/model.php
@@ -1819,8 +1819,9 @@ class productModel extends model
$totalEstimate += $story->estimate;
/* When the status is not closed or closedReason is done or postponed then add cases rate..*/
if(
- $story->status != 'closed' or
- ($story->status == 'closed' and ($story->closedReason == 'done' or $story->closedReason == 'postponed'))
+ empty($story->children) and
+ ($story->status != 'closed' or
+ ($story->status == 'closed' and ($story->closedReason == 'done' or $story->closedReason == 'postponed')))
)
{
$storyIdList[] = $story->id;
diff --git a/module/program/control.php b/module/program/control.php
index cd7e6c2adf..54e34c9fa2 100644
--- a/module/program/control.php
+++ b/module/program/control.php
@@ -464,6 +464,7 @@ class program extends control
*/
public function stakeholder($programID = 0, $orderBy = 't1.id_desc', $recTotal = 0, $recPerPage = 15, $pageID = 1)
{
+ $this->app->loadLang('stakeholder');
$this->program->setMenu($programID);
/* Load pager and get tasks. */
diff --git a/module/program/view/stakeholder.html.php b/module/program/view/stakeholder.html.php
index 74b51fbcbf..86a6ebe8d4 100644
--- a/module/program/view/stakeholder.html.php
+++ b/module/program/view/stakeholder.html.php
@@ -51,7 +51,7 @@
key ? " " : '';?>
key ? $lang->program->isStakeholderKey : '';?>
realname . $isKey;?> |
- '>program->stakeholderTypeList, $stakeholder->type, '');?> |
+ '>stakeholder->fromList, $stakeholder->from, '');?> |
user->roleList, $stakeholder->role, '');?> |
phone;?> |
qq;?> |
diff --git a/module/stakeholder/lang/en.php b/module/stakeholder/lang/en.php
index ebe2002d9f..6909e0f42c 100644
--- a/module/stakeholder/lang/en.php
+++ b/module/stakeholder/lang/en.php
@@ -33,7 +33,7 @@ $lang->stakeholder->viewIssueAction = 'Issue List';
/* Fields. */
$lang->stakeholder->id = 'ID';
$lang->stakeholder->user = 'User';
-$lang->stakeholder->type = 'Type';
+$lang->stakeholder->type = 'User Type';
$lang->stakeholder->name = 'Name';
$lang->stakeholder->phone = 'Mobile';
$lang->stakeholder->qq = 'QQ';
@@ -42,7 +42,7 @@ $lang->stakeholder->email = 'EMail';
$lang->stakeholder->isKey = 'Key Stakeholder';
$lang->stakeholder->inside = 'Internal Stakeholder';
$lang->stakeholder->outside = 'External Stakeholder';
-$lang->stakeholder->from = 'Type';
+$lang->stakeholder->from = 'Stakeholder Type';
$lang->stakeholder->company = 'Company';
$lang->stakeholder->nature = 'Personality';
$lang->stakeholder->analysis = 'Impact Analysis';
diff --git a/module/stakeholder/lang/zh-cn.php b/module/stakeholder/lang/zh-cn.php
index e59da0129a..8e5b132015 100644
--- a/module/stakeholder/lang/zh-cn.php
+++ b/module/stakeholder/lang/zh-cn.php
@@ -33,7 +33,7 @@ $lang->stakeholder->viewIssueAction = '问题列表';
/* Fields. */
$lang->stakeholder->id = '编号';
$lang->stakeholder->user = '用户';
-$lang->stakeholder->type = '类型';
+$lang->stakeholder->type = '用户类型';
$lang->stakeholder->name = '姓名';
$lang->stakeholder->phone = '手机';
$lang->stakeholder->qq = 'QQ';
@@ -42,7 +42,7 @@ $lang->stakeholder->email = '邮箱';
$lang->stakeholder->isKey = '关键干系人';
$lang->stakeholder->inside = '内部干系人';
$lang->stakeholder->outside = '外部干系人';
-$lang->stakeholder->from = '类型';
+$lang->stakeholder->from = '干系人类型';
$lang->stakeholder->company = '所属公司';
$lang->stakeholder->nature = '性格特征';
$lang->stakeholder->analysis = '影响分析';
diff --git a/module/stakeholder/view/browse.html.php b/module/stakeholder/view/browse.html.php
index 9647151380..f51394f4b6 100644
--- a/module/stakeholder/view/browse.html.php
+++ b/module/stakeholder/view/browse.html.php
@@ -47,7 +47,7 @@
idAB);?>
stakeholder->name;?> |
- stakeholder->common . $lang->stakeholder->type;?> |
+ stakeholder->from;?> |
stakeholder->phone;?> |
stakeholder->qq;?> |
stakeholder->weixin;?> |
@@ -69,7 +69,7 @@
name . $isKey;?> |
- '>stakeholder->typeList, $stakeholder->type, '');?> |
+ '>stakeholder->fromList, $stakeholder->from, '');?> |
phone;?> |
qq;?> |
weixin;?> |
diff --git a/module/task/control.php b/module/task/control.php
index f869833fb1..2c360a27e5 100644
--- a/module/task/control.php
+++ b/module/task/control.php
@@ -1905,6 +1905,7 @@ class task extends control
$task->desc = htmlspecialchars_decode($task->desc);
$task->desc = str_replace("
", "\n", $task->desc);
$task->desc = str_replace('"', '""', $task->desc);
+ $task->desc = str_replace(' ', ' ', $task->desc);
}
/* fill some field with useful value. */
diff --git a/test/class/kanban.class.php b/test/class/kanban.class.php
index 033497aef7..6e22e60c08 100644
--- a/test/class/kanban.class.php
+++ b/test/class/kanban.class.php
@@ -233,13 +233,20 @@ class kanbanTest
return $object;
}
+ /**
+ * Test get kanban by id.
+ *
+ * @param int $kanbanID
+ * @access public
+ * @return object
+ */
public function getByIDTest($kanbanID)
{
- $objects = $this->objectModel->getByID($kanbanID);
+ $object = $this->objectModel->getByID($kanbanID);
if(dao::isError()) return dao::getError();
- return $objects;
+ return $object;
}
public function getKanbanDataTest($kanbanID)
@@ -296,13 +303,23 @@ class kanbanTest
return $objects;
}
+ /**
+ * Test get kanban group by regions.
+ *
+ * @param string $regions
+ * @access public
+ * @return int
+ */
public function getGroupGroupByRegionsTest($regions)
{
$objects = $this->objectModel->getGroupGroupByRegions($regions);
if(dao::isError()) return dao::getError();
- return $objects;
+ $count = 0;
+ foreach($objects as $object) $count += count($object);
+
+ return $count;
}
public function getLaneGroupByRegionsTest($regions, $browseType = 'all')
@@ -329,16 +346,25 @@ class kanbanTest
if(dao::isError()) return dao::getError();
- return $objects;
+ $count = 0;
+ foreach($objects as $object) $count += count($object);
+ return $count;
}
+ /**
+ * Test get card group by kanban id.
+ *
+ * @param int $kanbanID
+ * @access public
+ * @return int
+ */
public function getCardGroupByKanbanTest($kanbanID)
{
$objects = $this->objectModel->getCardGroupByKanban($kanbanID);
if(dao::isError()) return dao::getError();
- return $objects;
+ return count($objects);
}
public function getImportedCardsTest($kanbanID, $cards, $fromType)
@@ -359,31 +385,90 @@ class kanbanTest
return $objects;
}
+ /**
+ * Test get card group by execution id.
+ *
+ * @param int $executionID
+ * @param string $browseType
+ * @param string $orderBy
+ * @access public
+ * @return int
+ */
public function getCardGroupByExecutionTest($executionID, $browseType = 'all', $orderBy = 'id_asc')
{
- $objects = $this->objectModel->getCardGroupByExecution($executionID, $browseType = 'all', $orderBy = 'id_asc');
+ $objects = $this->objectModel->getCardGroupByExecution($executionID, $browseType, $orderBy);
if(dao::isError()) return dao::getError();
- return $objects;
+ return count($objects);
}
+ /**
+ * Test get Kanban by execution id.
+ *
+ * @param int $executionID
+ * @param string $browseType
+ * @param string $groupBy
+ * @access public
+ * @return string
+ */
public function getExecutionKanbanTest($executionID, $browseType = 'all', $groupBy = 'default')
{
- $objects = $this->objectModel->getExecutionKanban($executionID, $browseType = 'all', $groupBy = 'default');
+ $objects = $this->objectModel->getExecutionKanban($executionID, $browseType, $groupBy);
+
+ if(empty($objects))
+ {
+ $this->objectModel->createExecutionLane($executionID, $browseType, $groupBy);
+ $objects = $this->objectModel->getExecutionKanban($executionID, $browseType, $groupBy);
+ }
if(dao::isError()) return dao::getError();
- return $objects;
+ $columnCount = 0;
+ $laneCount = 0;
+ $cardCount = 0;
+ foreach($objects as $types)
+ {
+ foreach($types['lanes'] as $lane)
+ {
+ foreach($lane['cards'] as $card)
+ {
+ $cardCount += count($card);
+ }
+ }
+ $columnCount += count($types['columns']);
+ $laneCount += count($types['lanes']);
+ }
+ return 'columns:' . $columnCount . ', lanes:' . $laneCount . ', cards:' . $cardCount;
}
+ /**
+ * Test get kanban for group view.
+ *
+ * @param int $executionID
+ * @param string $browseType
+ * @param string $groupBy
+ * @access public
+ * @return int
+ */
public function getKanban4GroupTest($executionID, $browseType, $groupBy)
{
$objects = $this->objectModel->getKanban4Group($executionID, $browseType, $groupBy);
+ if(empty($objects))
+ {
+ $this->objectModel->createExecutionLane($executionID, $browseType, $groupBy);
+ $objects = $this->objectModel->getExecutionKanban($executionID, $browseType, $groupBy);
+ }
+
if(dao::isError()) return dao::getError();
- return $objects;
+ $laneCount = 0;
+ foreach($objects as $types)
+ {
+ $laneCount += count($types['lanes']);
+ }
+ return 'lanes:' . $laneCount;
}
public function getLanes4GroupTest($executionID, $browseType, $groupBy, $cardList)
@@ -422,13 +507,23 @@ class kanbanTest
return $objects;
}
- public function getCanViewObjectsTest($objectType = 'kanban', $param = '')
+ /**
+ * Test get can view objects.
+ *
+ * @param string $user
+ * @param string $objectType
+ * @param string $param
+ * @access public
+ * @return void
+ */
+ public function getCanViewObjectsTest($user, $objectType = 'kanban', $param = '')
{
- $objects = $this->objectModel->getCanViewObjects($objectType = 'kanban', $param = '');
+ su($user);
+ $objects = $this->objectModel->getCanViewObjects($objectType, $param);
if(dao::isError()) return dao::getError();
- return $objects;
+ return count($objects);
}
/**
@@ -925,49 +1020,100 @@ class kanbanTest
return $objects;
}
+ /**
+ * Test get kanban group by space id list.
+ *
+ * @param string $spaceIdList
+ * @param string $kanbanIdList
+ * @access public
+ * @return int
+ */
public function getGroupBySpaceListTest($spaceIdList, $kanbanIdList = '')
{
- $objects = $this->objectModel->getGroupBySpaceList($spaceIdList, $kanbanIdList = '');
+ $objects = $this->objectModel->getGroupBySpaceList($spaceIdList, $kanbanIdList);
if(dao::isError()) return dao::getError();
- return $objects;
+ $count = 0;
+ if(empty($kanbanIdList))
+ {
+ foreach($objects as $object) $count += count($object);
+ }
+ else
+ {
+ $count += count($objects);
+ }
+ return $count;
}
+ /**
+ * Test get group list by region id.
+ *
+ * @param int $region
+ * @access public
+ * @return object
+ */
public function getGroupListTest($region)
{
$objects = $this->objectModel->getGroupList($region);
if(dao::isError()) return dao::getError();
- return $objects;
+ $kanban = '';
+ foreach($objects as $object) $kanban .= ',' . $object->kanban;
+ return $kanban;
}
+ /**
+ * Test get column by id.
+ *
+ * @param int $columnID
+ * @access public
+ * @return object
+ */
public function getColumnByIDTest($columnID)
{
- $objects = $this->objectModel->getColumnByID($columnID);
+ $object = $this->objectModel->getColumnByID($columnID);
if(dao::isError()) return dao::getError();
- return $objects;
+ return $object;
}
+ /**
+ * Test get columns by object id.
+ *
+ * @param string $objectType
+ * @param int $objectID
+ * @param int $archived
+ * @param string $deleted
+ * @access public
+ * @return int
+ */
public function getColumnsByObjectTest($objectType = '', $objectID = 0, $archived = 0, $deleted = '0')
{
- $objects = $this->objectModel->getColumnsByObject($objectType = '', $objectID = 0, $archived = 0, $deleted = '0');
+ $objects = $this->objectModel->getColumnsByObject($objectType, $objectID, $archived, $deleted);
if(dao::isError()) return dao::getError();
- return $objects;
+ return count($objects);
}
+ /**
+ * Test get column ID by lane ID.
+ *
+ * @param int $laneID
+ * @param string $columnType
+ * @access public
+ * @return string
+ */
public function getColumnIDByLaneIDTest($laneID, $columnType)
{
- $objects = $this->objectModel->getColumnIDByLaneID($laneID, $columnType);
+ $object = $this->objectModel->getColumnIDByLaneID($laneID, $columnType);
if(dao::isError()) return dao::getError();
- return $objects;
+ return $object;
}
public function getLaneByIdTest($laneID)
@@ -988,40 +1134,78 @@ class kanbanTest
return $objects;
}
+ /**
+ * Test get card by id.
+ *
+ * @param int $cardID
+ * @access public
+ * @return object
+ */
public function getCardByIDTest($cardID)
{
- $objects = $this->objectModel->getCardByID($cardID);
+ $object = $this->objectModel->getCardByID($cardID);
if(dao::isError()) return dao::getError();
- return $objects;
+ return $object;
}
+ /**
+ * Test get cards by object id.
+ *
+ * @param string $objectType
+ * @param int $objectID
+ * @param string $archived
+ * @param string $deleted
+ * @access public
+ * @return int
+ */
public function getCardsByObjectTest($objectType = '', $objectID = 0, $archived = '0', $deleted = '0')
{
- $objects = $this->objectModel->getCardsByObject($objectType = '', $objectID = 0, $archived = '0', $deleted = '0');
+ $objects = $this->objectModel->getCardsByObject($objectType, $objectID, $archived, $deleted);
if(dao::isError()) return dao::getError();
- return $objects;
+ return count($objects);
}
+ /**
+ * Test get cards to import.
+ *
+ * @param int $kanbanID
+ * @param int $excludedID
+ * @param object $pager
+ * @access public
+ * @return int
+ */
public function getCards2ImportTest($kanbanID = 0, $excludedID = 0, $pager = null)
{
- $objects = $this->objectModel->getCards2Import($kanbanID = 0, $excludedID = 0, $pager = null);
+ $objects = $this->objectModel->getCards2Import($kanbanID, $excludedID, $pager);
if(dao::isError()) return dao::getError();
- return $objects;
+ return count($objects);
}
- public function getKanbanCardMenuTest($executionID, $objects, $objecType)
+ public function getKanbanCardMenuTest($executionID, $objecType)
{
- $objects = $this->objectModel->getKanbanCardMenu($executionID, $objects, $objecType);
+ global $tester;
+ /* Get group objects. */
+ if($objecType == 'story') $objectGroup['story'] = $tester->loadModel('story')->getExecutionStories($executionID, 0, 0, 't1.`order`_desc', 'allStory');
+ if($objecType == 'bug') $objectGroup['bug'] = $tester->loadModel('bug')->getExecutionBugs($executionID);
+ if($objecType == 'task') $objectGroup['task'] = $tester->loadModel('execution')->getKanbanTasks($executionID, "id");
+
+ $objects = array();
+ /* Get objects cards menus. */
+ if($objecType == 'story') $objects = $this->objectModel->getKanbanCardMenu($executionID, $objectGroup['story'], 'story');
+ if($objecType == 'bug') $objects = $this->objectModel->getKanbanCardMenu($executionID, $objectGroup['bug'], 'bug');
+ if($objecType == 'task') $objects = $this->objectModel->getKanbanCardMenu($executionID, $objectGroup['task'], 'task');
if(dao::isError()) return dao::getError();
- return $objects;
+ $count = 0;
+ foreach($objects as $object) $count += count($object);
+ return $count;
}
public function isClickableTest($object, $action)
diff --git a/test/model/kanban/getbyid.php b/test/model/kanban/getbyid.php
new file mode 100755
index 0000000000..35a67379c4
--- /dev/null
+++ b/test/model/kanban/getbyid.php
@@ -0,0 +1,24 @@
+#!/usr/bin/env php
+getByID();
+cid=1
+pid=1
+
+*/
+
+$kanbanIDList = array('1', '2', '3', '4', '5', '1000001');
+
+$kanban = new kanbanTest();
+
+r($kanban->getByIDTest($kanbanIDList[0])) && p('name,space,owner,team,whitelist') && e('通用看板1,1,po15,,user3,po15,,,user3,po15'); // 测试查询看板1的信息
+r($kanban->getByIDTest($kanbanIDList[1])) && p('name,space,owner,team,whitelist') && e('通用看板2,1,po15,,user3,po15,,,user3,po15'); // 测试查询看板2的信息
+r($kanban->getByIDTest($kanbanIDList[2])) && p('name,space,owner,team,whitelist') && e('通用看板3,2,po16,,user4,po16,,,user4,po16'); // 测试查询看板3的信息
+r($kanban->getByIDTest($kanbanIDList[3])) && p('name,space,owner,team,whitelist') && e('通用看板4,2,po16,,user4,po16,,,user4,po16'); // 测试查询看板4的信息
+r($kanban->getByIDTest($kanbanIDList[4])) && p('name,space,owner,team,whitelist') && e('通用看板5,3,po17,,user5,po17,,,user5,po17'); // 测试查询看板5的信息
+r($kanban->getByIDTest($kanbanIDList[5])) && p('name,space,owner,team,whitelist') && e('0'); // 测试查询不存在的看板信息
diff --git a/test/model/kanban/getcanviewobjects.php b/test/model/kanban/getcanviewobjects.php
new file mode 100755
index 0000000000..874fbee425
--- /dev/null
+++ b/test/model/kanban/getcanviewobjects.php
@@ -0,0 +1,34 @@
+#!/usr/bin/env php
+getCanViewObjects();
+cid=1
+pid=1
+
+*/
+
+$kanban = new kanbanTest();
+
+$userList = array('admin', 'po1', 'po2', 'user1', 'user2', 'pm1', 'pm2');
+$objectType = array('kanban', 'kanbanspace');
+$paramList = array('noclosed', 'private', 'cooperation', 'public', 'involved');
+
+r($kanban->getCanViewObjectsTest($userList[0])) && p() && e('32'); // 测试查询admin有权限查看的看板个数
+r($kanban->getCanViewObjectsTest($userList[0], $objectType[1])) && p() && e('19'); // 测试查询admin有权限查看的空间个数
+r($kanban->getCanViewObjectsTest($userList[0], $objectType[0], $paramList[0])) && p() && e('100'); // 测试查询admin有权限查看的未关闭看板个数
+r($kanban->getCanViewObjectsTest($userList[0], $objectType[0], $paramList[1])) && p() && e('32'); // 测试查询admin有权限查看的私人看板个数
+r($kanban->getCanViewObjectsTest($userList[0], $objectType[0], $paramList[2])) && p() && e('100'); // 测试查询admin有权限查看的协同看板个数
+r($kanban->getCanViewObjectsTest($userList[0], $objectType[0], $paramList[3])) && p() && e('100'); // 测试查询admin有权限查看的公共看板个数
+r($kanban->getCanViewObjectsTest($userList[0], $objectType[0], $paramList[4])) && p() && e('0'); // 测试查询admin有权限查看的参与看板个数
+r($kanban->getCanViewObjectsTest($userList[0])) && p() && e('32'); // 测试查询admin有权限查看的看板个数
+r($kanban->getCanViewObjectsTest($userList[0])) && p() && e('32'); // 测试查询admin有权限查看的看板个数
+r($kanban->getCanViewObjectsTest($userList[1])) && p() && e('32'); // 测试查询po1有权限查看的看板个数
+r($kanban->getCanViewObjectsTest($userList[2])) && p() && e('32'); // 测试查询po2有权限查看的看板个数
+r($kanban->getCanViewObjectsTest($userList[3])) && p() && e('32'); // 测试查询user1有权限查看的看板个数
+r($kanban->getCanViewObjectsTest($userList[4])) && p() && e('32'); // 测试查询user2有权限查看的看板个数
+r($kanban->getCanViewObjectsTest($userList[5])) && p() && e('32'); // 测试查询pm1有权限查看的看板个数
+r($kanban->getCanViewObjectsTest($userList[6])) && p() && e('32'); // 测试查询pm2有权限查看的看板个数
diff --git a/test/model/kanban/getcardbyid.php b/test/model/kanban/getcardbyid.php
new file mode 100755
index 0000000000..0140ee5983
--- /dev/null
+++ b/test/model/kanban/getcardbyid.php
@@ -0,0 +1,24 @@
+#!/usr/bin/env php
+getCardByID();
+cid=1
+pid=1
+
+*/
+
+$cardIDList = array('1', '2', '3', '4', '5', '1000001');
+
+$kanban = new kanbanTest();
+
+r($kanban->getCardByIDTest($cardIDList[0])) && p('name,status,pri,progress') && e('卡片1,doing,3,0'); // 测试查询卡片1的信息
+r($kanban->getCardByIDTest($cardIDList[1])) && p('name,status,pri,progress') && e('卡片2,doing,3,50'); // 测试查询卡片2的信息
+r($kanban->getCardByIDTest($cardIDList[2])) && p('name,status,pri,progress') && e('卡片3,done,3,100'); // 测试查询卡片3的信息
+r($kanban->getCardByIDTest($cardIDList[3])) && p('name,status,pri,progress') && e('卡片4,doing,3,0'); // 测试查询卡片4的信息
+r($kanban->getCardByIDTest($cardIDList[4])) && p('name,status,pri,progress') && e('卡片5,doing,3,50'); // 测试查询卡片5的信息
+r($kanban->getCardByIDTest($cardIDList[5])) && p() && e('0'); // 测试查询不存在卡片的信息
diff --git a/test/model/kanban/getcardgroupbykanban.php b/test/model/kanban/getcardgroupbykanban.php
new file mode 100755
index 0000000000..c835b8b15c
--- /dev/null
+++ b/test/model/kanban/getcardgroupbykanban.php
@@ -0,0 +1,24 @@
+#!/usr/bin/env php
+getCardGroupByKanban();
+cid=1
+pid=1
+
+*/
+
+$kanbanIDList = array('1', '2', '3', '4', '5', '1000001');
+
+$kanban = new kanbanTest();
+
+r($kanban->getCardGroupByKanbanTest($kanbanIDList[0])) && p() && e('1'); // 测试查询看板1的卡片数量
+r($kanban->getCardGroupByKanbanTest($kanbanIDList[1])) && p() && e('1'); // 测试查询看板2的卡片数量
+r($kanban->getCardGroupByKanbanTest($kanbanIDList[2])) && p() && e('1'); // 测试查询看板3的卡片数量
+r($kanban->getCardGroupByKanbanTest($kanbanIDList[3])) && p() && e('1'); // 测试查询看板4的卡片数量
+r($kanban->getCardGroupByKanbanTest($kanbanIDList[4])) && p() && e('1'); // 测试查询看板5的卡片数量
+r($kanban->getCardGroupByKanbanTest($kanbanIDList[5])) && p() && e('0'); // 测试查询不存在看板的卡片数量
diff --git a/test/model/kanban/getcards2import.php b/test/model/kanban/getcards2import.php
new file mode 100755
index 0000000000..5d9c769981
--- /dev/null
+++ b/test/model/kanban/getcards2import.php
@@ -0,0 +1,31 @@
+#!/usr/bin/env php
+getCards2Import();
+cid=1
+pid=1
+
+*/
+$kanbanIDList = array('1', '2', '3', '4', '5', '1000001');
+$excludedID = 1;
+
+$kanban = new kanbanTest();
+
+r($kanban->getCards2ImportTest()) && p() && e('256'); // 测试获取可以导入的卡片数量
+r($kanban->getCards2ImportTest($kanbanIDList[0])) && p() && e('0'); // 测试获取看板1可以导入的卡片数量
+r($kanban->getCards2ImportTest($kanbanIDList[0], $excludedID)) && p() && e('0'); // 测试获取看板1可以导入的卡片数量 排除看板1
+r($kanban->getCards2ImportTest($kanbanIDList[1])) && p() && e('0'); // 测试获取看板2可以导入的卡片数量
+r($kanban->getCards2ImportTest($kanbanIDList[1], $excludedID)) && p() && e('0'); // 测试获取看板2可以导入的卡片数量 排除看板1
+r($kanban->getCards2ImportTest($kanbanIDList[2])) && p() && e('0'); // 测试获取看板3可以导入的卡片数量
+r($kanban->getCards2ImportTest($kanbanIDList[2], $excludedID)) && p() && e('0'); // 测试获取看板3可以导入的卡片数量 排除看板1
+r($kanban->getCards2ImportTest($kanbanIDList[3])) && p() && e('0'); // 测试获取看板4可以导入的卡片数量
+r($kanban->getCards2ImportTest($kanbanIDList[3], $excludedID)) && p() && e('0'); // 测试获取看板4可以导入的卡片数量 排除看板1
+r($kanban->getCards2ImportTest($kanbanIDList[4])) && p() && e('8'); // 测试获取看板5可以导入的卡片数量
+r($kanban->getCards2ImportTest($kanbanIDList[4])) && p() && e('8'); // 测试获取看板5可以导入的卡片数量
+r($kanban->getCards2ImportTest($kanbanIDList[5], $excludedID)) && p() && e('0'); // 测试获取不存在看板可以导入的卡片数量 排除看板1
+r($kanban->getCards2ImportTest($kanbanIDList[5], $excludedID)) && p() && e('0'); // 测试获取不存在看板可以导入的卡片数量 排除看板1
diff --git a/test/model/kanban/getcardsbyobject.php b/test/model/kanban/getcardsbyobject.php
new file mode 100755
index 0000000000..0545f99647
--- /dev/null
+++ b/test/model/kanban/getcardsbyobject.php
@@ -0,0 +1,35 @@
+#!/usr/bin/env php
+getCardsByObject();
+cid=1
+pid=1
+
+*/
+
+$objectType = array('kanban', 'region', 'status');
+$kanbanIDList = array('1', '2', '3', '4', '5', '1000001');
+$regionIDList = array('1', '2', '3', '4', '5', '1000001');
+$statusList = array('doing', 'done');
+
+$kanban = new kanbanTest();
+
+r($kanban->getCardsByObjectTest($objectType[0], $kanbanIDList[0])) && p() && e('8'); // 测试查询kanban 1的卡片数量
+r($kanban->getCardsByObjectTest($objectType[0], $kanbanIDList[1])) && p() && e('8'); // 测试查询kanban 2的卡片数量
+r($kanban->getCardsByObjectTest($objectType[0], $kanbanIDList[2])) && p() && e('8'); // 测试查询kanban 3的卡片数量
+r($kanban->getCardsByObjectTest($objectType[0], $kanbanIDList[3])) && p() && e('8'); // 测试查询kanban 4的卡片数量
+r($kanban->getCardsByObjectTest($objectType[0], $kanbanIDList[4])) && p() && e('8'); // 测试查询kanban 5的卡片数量
+r($kanban->getCardsByObjectTest($objectType[0], $kanbanIDList[5])) && p() && e('0'); // 测试查询不存在kanban的卡片数量
+r($kanban->getCardsByObjectTest($objectType[1], $regionIDList[0])) && p() && e('8'); // 测试查询region 1的卡片数量
+r($kanban->getCardsByObjectTest($objectType[1], $regionIDList[1])) && p() && e('8'); // 测试查询region 2的卡片数量
+r($kanban->getCardsByObjectTest($objectType[1], $regionIDList[2])) && p() && e('8'); // 测试查询region 3的卡片数量
+r($kanban->getCardsByObjectTest($objectType[1], $regionIDList[3])) && p() && e('8'); // 测试查询region 4的卡片数量
+r($kanban->getCardsByObjectTest($objectType[1], $regionIDList[4])) && p() && e('8'); // 测试查询region 5的卡片数量
+r($kanban->getCardsByObjectTest($objectType[1], $regionIDList[5])) && p() && e('0'); // 测试查询不存在region的卡片数量
+r($kanban->getCardsByObjectTest($objectType[2], $statusList[0])) && p() && e('534'); // 测试查询status doing的卡片数量
+r($kanban->getCardsByObjectTest($objectType[2], $statusList[1])) && p() && e('266'); // 测试查询status doing的卡片数量
diff --git a/test/model/kanban/getcolumnbyid.php b/test/model/kanban/getcolumnbyid.php
new file mode 100755
index 0000000000..a675153319
--- /dev/null
+++ b/test/model/kanban/getcolumnbyid.php
@@ -0,0 +1,24 @@
+#!/usr/bin/env php
+getColumnByID();
+cid=1
+pid=1
+
+*/
+
+$columnIDList = array('1', '2', '3', '4', '5', '1000001');
+
+$kanban = new kanbanTest();
+
+r($kanban->getColumnByIDTest($columnIDList[0])) && p('type,region,name,limit') && e('column1,1,未开始,-1'); // 测试查询看板列1的信息
+r($kanban->getColumnByIDTest($columnIDList[1])) && p('type,region,name,limit') && e('column2,1,进行中,-1'); // 测试查询看板列2的信息
+r($kanban->getColumnByIDTest($columnIDList[2])) && p('type,region,name,limit') && e('column3,1,已完成,-1'); // 测试查询看板列3的信息
+r($kanban->getColumnByIDTest($columnIDList[3])) && p('type,region,name,limit') && e('column4,1,已关闭,-1'); // 测试查询看板列4的信息
+r($kanban->getColumnByIDTest($columnIDList[4])) && p('type,region,name,limit') && e('column5,2,未开始,-1'); // 测试查询看板列5的信息
+r($kanban->getColumnByIDTest($columnIDList[5])) && p('type,region,name,limit') && e('0'); // 测试查询不存在看板列的信息
diff --git a/test/model/kanban/getcolumngroupbyregions.php b/test/model/kanban/getcolumngroupbyregions.php
new file mode 100755
index 0000000000..18c5fd886f
--- /dev/null
+++ b/test/model/kanban/getcolumngroupbyregions.php
@@ -0,0 +1,27 @@
+#!/usr/bin/env php
+getColumnGroupByRegions();
+cid=1
+pid=1
+
+*/
+
+$regions1 = '1,2,3';
+$regions2 = '4,5,6';
+$regions3 = '7,8,9';
+$regions4 = '10,11,12';
+$regions5 = '13,14,15';
+
+$kanban = new kanbanTest();
+
+r($kanban->getColumnGroupByRegionsTest($regions1)) && p() && e('12'); // 测试获取region 1 2 3 的看板列数量
+r($kanban->getColumnGroupByRegionsTest($regions2)) && p() && e('12'); // 测试获取region 4,5,6的看板列数量
+r($kanban->getColumnGroupByRegionsTest($regions3)) && p() && e('12'); // 测试获取region 7,8,9的看板列数量
+r($kanban->getColumnGroupByRegionsTest($regions4)) && p() && e('12'); // 测试获取region 10,11,12的看板列数量
+r($kanban->getColumnGroupByRegionsTest($regions5)) && p() && e('12'); // 测试获取region 13,14,15的看板列数量
diff --git a/test/model/kanban/getcolumnidbylaneid.php b/test/model/kanban/getcolumnidbylaneid.php
new file mode 100755
index 0000000000..31262f3b3e
--- /dev/null
+++ b/test/model/kanban/getcolumnidbylaneid.php
@@ -0,0 +1,36 @@
+#!/usr/bin/env php
+getColumnIDByLaneID();
+cid=1
+pid=1
+
+*/
+
+$laneIDList = array('1', '2', '107', '108', '109', '10001');
+$columnTypeList = array('column1', 'column2', 'wait', 'test', 'backlog');
+
+$kanban = new kanbanTest();
+
+r($kanban->getColumnIDByLaneIDTest($laneIDList[0], $columnTypeList[0])) && p() && e('1'); // 测试获取泳道1 column1的看板列
+r($kanban->getColumnIDByLaneIDTest($laneIDList[0], $columnTypeList[1])) && p() && e('2'); // 测试获取泳道1 column2的看板列
+r($kanban->getColumnIDByLaneIDTest($laneIDList[0], $columnTypeList[2])) && p() && e('0'); // 测试获取泳道1 wait的看板列
+r($kanban->getColumnIDByLaneIDTest($laneIDList[0], $columnTypeList[3])) && p() && e('0'); // 测试获取泳道1 test的看板列
+r($kanban->getColumnIDByLaneIDTest($laneIDList[0], $columnTypeList[4])) && p() && e('0'); // 测试获取泳道1 backlog的看板列
+r($kanban->getColumnIDByLaneIDTest($laneIDList[1], $columnTypeList[1])) && p() && e('0'); // 测试获取泳道2 column2的看板列
+r($kanban->getColumnIDByLaneIDTest($laneIDList[1], $columnTypeList[2])) && p() && e('0'); // 测试获取泳道2 wait的看板列
+r($kanban->getColumnIDByLaneIDTest($laneIDList[2], $columnTypeList[2])) && p() && e('0'); // 测试获取泳道107 wait的看板列
+r($kanban->getColumnIDByLaneIDTest($laneIDList[2], $columnTypeList[3])) && p() && e('460'); // 测试获取泳道107 test的看板列
+r($kanban->getColumnIDByLaneIDTest($laneIDList[2], $columnTypeList[4])) && p() && e('455'); // 测试获取泳道107 backlog的看板列
+r($kanban->getColumnIDByLaneIDTest($laneIDList[3], $columnTypeList[2])) && p() && e('0'); // 测试获取泳道108 wait的看板列
+r($kanban->getColumnIDByLaneIDTest($laneIDList[3], $columnTypeList[3])) && p() && e('471'); // 测试获取泳道108 test的看板列
+r($kanban->getColumnIDByLaneIDTest($laneIDList[3], $columnTypeList[4])) && p() && e('0'); // 测试获取泳道108 backlog的看板列
+r($kanban->getColumnIDByLaneIDTest($laneIDList[4], $columnTypeList[2])) && p() && e('475'); // 测试获取泳道109 wait的看板列
+r($kanban->getColumnIDByLaneIDTest($laneIDList[4], $columnTypeList[3])) && p() && e('0'); // 测试获取泳道109 test的看板列
+r($kanban->getColumnIDByLaneIDTest($laneIDList[4], $columnTypeList[4])) && p() && e('0'); // 测试获取泳道109 backlog的看板列
+r($kanban->getColumnIDByLaneIDTest($laneIDList[5], $columnTypeList[0])) && p() && e('0'); // 测试获取不存在的泳道 common的看板列
diff --git a/test/model/kanban/getcolumnsbyobject.php b/test/model/kanban/getcolumnsbyobject.php
new file mode 100755
index 0000000000..16959303f0
--- /dev/null
+++ b/test/model/kanban/getcolumnsbyobject.php
@@ -0,0 +1,33 @@
+#!/usr/bin/env php
+getColumnsByObject();
+cid=1
+pid=1
+
+*/
+
+$objectTypeList = array('parent', 'region', '`group`');
+$parentIDList = array('457', '468', '471', '100001');
+$regionIDList = array('1', '2', '3', '100001');
+$groupIDList = array('1', '2', '3', '100001');
+
+$kanban = new kanbanTest();
+
+r($kanban->getColumnsByObjectTest($objectTypeList[0], $parentIDList[0])) && p() && e('2'); // 测试获取parent 457的看板列数量
+r($kanban->getColumnsByObjectTest($objectTypeList[0], $parentIDList[1])) && p() && e('2'); // 测试获取parent 468的看板列数量
+r($kanban->getColumnsByObjectTest($objectTypeList[0], $parentIDList[2])) && p() && e('2'); // 测试获取parent 471的看板列数量
+r($kanban->getColumnsByObjectTest($objectTypeList[0], $parentIDList[3])) && p() && e('0'); // 测试获取parent 100001的看板列数量
+r($kanban->getColumnsByObjectTest($objectTypeList[1], $parentIDList[0])) && p() && e('0'); // 测试获取region 1的看板列数量
+r($kanban->getColumnsByObjectTest($objectTypeList[1], $parentIDList[1])) && p() && e('0'); // 测试获取region 2的看板列数量
+r($kanban->getColumnsByObjectTest($objectTypeList[1], $parentIDList[2])) && p() && e('0'); // 测试获取region 3的看板列数量
+r($kanban->getColumnsByObjectTest($objectTypeList[1], $parentIDList[3])) && p() && e('0'); // 测试获取region 100001的看板列数量
+r($kanban->getColumnsByObjectTest($objectTypeList[2], $parentIDList[0])) && p() && e('7'); // 测试获取group 1的看板列数量
+r($kanban->getColumnsByObjectTest($objectTypeList[2], $parentIDList[1])) && p() && e('9'); // 测试获取group 2的看板列数量
+r($kanban->getColumnsByObjectTest($objectTypeList[2], $parentIDList[2])) && p() && e('9'); // 测试获取group 3的看板列数量
+r($kanban->getColumnsByObjectTest($objectTypeList[2], $parentIDList[3])) && p() && e('0'); // 测试获取group 100001的看板列数量
diff --git a/test/model/kanban/getexecutionkanban.php b/test/model/kanban/getexecutionkanban.php
new file mode 100755
index 0000000000..b7e0456aec
--- /dev/null
+++ b/test/model/kanban/getexecutionkanban.php
@@ -0,0 +1,37 @@
+#!/usr/bin/env php
+getExecutionKanban();
+cid=1
+pid=1
+
+*/
+
+$executionIDList = array('101', '102', '103', '104', '105');
+$browseTypeList = array('story', 'task', 'bug');
+$groupByList = array('pri', 'category', 'module', 'source', 'assignedTo', 'story', 'severity');
+
+$kanban = new kanbanTest();
+
+r($kanban->getExecutionKanbanTest($executionIDList[0])) && p() && e('columns:27, lanes:3, cards:15'); // 测试获取execution101的执行看板信息
+r($kanban->getExecutionKanbanTest($executionIDList[0], $browseTypeList[0])) && p() && e('columns:11, lanes:1, cards:0'); // 测试获取execution101 story的执行看板信息
+r($kanban->getExecutionKanbanTest($executionIDList[0], $browseTypeList[1])) && p() && e('columns:7, lanes:1, cards:11'); // 测试获取execution101 task的执行看板信息
+r($kanban->getExecutionKanbanTest($executionIDList[0], $browseTypeList[2])) && p() && e('columns:9, lanes:1, cards:4'); // 测试获取execution101 bug的执行看板信息
+r($kanban->getExecutionKanbanTest($executionIDList[1])) && p() && e('columns:27, lanes:3, cards:10'); // 测试获取execution102的执行看板信息
+r($kanban->getExecutionKanbanTest($executionIDList[1], $browseTypeList[0], $groupByList[0])) && p() && e('columns:11, lanes:3, cards:2'); // 测试获取execution102 story pri的执行看板信息
+r($kanban->getExecutionKanbanTest($executionIDList[1], $browseTypeList[0], $groupByList[1])) && p() && e('columns:11, lanes:2, cards:2'); // 测试获取execution102 story category的执行看板信息
+r($kanban->getExecutionKanbanTest($executionIDList[2])) && p() && e('columns:27, lanes:3, cards:10'); // 测试获取execution103的执行看板信息
+r($kanban->getExecutionKanbanTest($executionIDList[2], $browseTypeList[1], $groupByList[2])) && p() && e('columns:7, lanes:5, cards:4'); // 测试获取execution103 task module的执行看板信息
+r($kanban->getExecutionKanbanTest($executionIDList[2], $browseTypeList[0], $groupByList[3])) && p() && e('columns:11, lanes:3, cards:2'); // 测试获取execution103 story source的执行看板信息
+r($kanban->getExecutionKanbanTest($executionIDList[3])) && p() && e('columns:27, lanes:3, cards:10'); // 测试获取execution103的执行看板信息
+r($kanban->getExecutionKanbanTest($executionIDList[3], $browseTypeList[2], $groupByList[4])) && p() && e('columns:9, lanes:2, cards:4'); // 测试获取execution103 bug module的执行看板信息
+r($kanban->getExecutionKanbanTest($executionIDList[3], $browseTypeList[2], $groupByList[5])) && p() && e('columns:9, lanes:5, cards:4'); // 测试获取execution103 bug source的执行看板信息
+r($kanban->getExecutionKanbanTest($executionIDList[4])) && p() && e('columns:27, lanes:3, cards:10'); // 测试获取execution103的执行看板信息
+r($kanban->getExecutionKanbanTest($executionIDList[4], $browseTypeList[2], $groupByList[5])) && p() && e('columns:9, lanes:5, cards:4'); // 测试获取execution103 bug module的执行看板信息
+r($kanban->getExecutionKanbanTest($executionIDList[4], $browseTypeList[2], $groupByList[6])) && p() && e('columns:9, lanes:4, cards:4'); // 测试获取execution103 bug severity的执行看板信息
+system("./ztest init");
diff --git a/test/model/kanban/getgroupbyspacelist.php b/test/model/kanban/getgroupbyspacelist.php
new file mode 100755
index 0000000000..48423ff337
--- /dev/null
+++ b/test/model/kanban/getgroupbyspacelist.php
@@ -0,0 +1,29 @@
+#!/usr/bin/env php
+getGroupBySpaceList();
+cid=1
+pid=1
+
+*/
+
+$spaceIDList = array('1,2,3', '4,5,6', '7,8,9', '10,11,12', '13,14,15');
+$kanbanIDList = array('1,2,3,4', '7,8,11,12', '15,16,17,18', '19,20,21,22,23,24,25', '26,28,30');
+
+$kanban = new kanbanTest();
+
+r($kanban->getGroupBySpaceListTest($spaceIDList[0])) && p() && e('6'); // 获取空间1 2 3的看板
+r($kanban->getGroupBySpaceListTest($spaceIDList[0], $kanbanIDList[0])) && p() && e('2'); // 获取空间1 2 3 看板1,2,3,4的看板
+r($kanban->getGroupBySpaceListTest($spaceIDList[1])) && p() && e('6'); // 获取空间4,5,6的看板
+r($kanban->getGroupBySpaceListTest($spaceIDList[1], $kanbanIDList[1])) && p() && e('2'); // 获取空间4,5,6 看板7,8,11,12的看板
+r($kanban->getGroupBySpaceListTest($spaceIDList[2])) && p() && e('6'); // 获取空间7,8,9的看板
+r($kanban->getGroupBySpaceListTest($spaceIDList[2], $kanbanIDList[2])) && p() && e('2'); // 获取空间7,8,9 看板15,16,17,18的看板
+r($kanban->getGroupBySpaceListTest($spaceIDList[3])) && p() && e('6'); // 获取空间10,11,12的看板
+r($kanban->getGroupBySpaceListTest($spaceIDList[3], $kanbanIDList[3])) && p() && e('3'); // 获取空间10,11,12 看板19,20,21,22,23,24,25的看板
+r($kanban->getGroupBySpaceListTest($spaceIDList[4])) && p() && e('6'); // 获取空间13,14,15的看板
+r($kanban->getGroupBySpaceListTest($spaceIDList[4], $kanbanIDList[4])) && p() && e('3'); // 获取空间13,14,15 看板26,28,30的看板
diff --git a/test/model/kanban/getgroupgroupbyregions.php b/test/model/kanban/getgroupgroupbyregions.php
new file mode 100755
index 0000000000..5fe1e2b1c3
--- /dev/null
+++ b/test/model/kanban/getgroupgroupbyregions.php
@@ -0,0 +1,23 @@
+#!/usr/bin/env php
+getGroupGroupByRegions();
+cid=1
+pid=1
+
+*/
+
+$regions = array('1,2,3', '4,5,6', '7,8,9', '10,11,12', '13,14,15');
+
+$kanban = new kanbanTest();
+
+r($kanban->getGroupGroupByRegionsTest($regions[0])) && p() && e('3'); //获取区域1 2 3的泳道组数量
+r($kanban->getGroupGroupByRegionsTest($regions[1])) && p() && e('3'); //获取区域4,5,6的泳道组数量
+r($kanban->getGroupGroupByRegionsTest($regions[2])) && p() && e('3'); //获取区域7,8,9的泳道组数量
+r($kanban->getGroupGroupByRegionsTest($regions[3])) && p() && e('3'); //获取区域10,11,12的泳道组数量
+r($kanban->getGroupGroupByRegionsTest($regions[4])) && p() && e('3'); //获取区域13,14,15的泳道组数量
diff --git a/test/model/kanban/getgrouplist.php b/test/model/kanban/getgrouplist.php
new file mode 100755
index 0000000000..ffa23ca58e
--- /dev/null
+++ b/test/model/kanban/getgrouplist.php
@@ -0,0 +1,24 @@
+#!/usr/bin/env php
+getGroupList();
+cid=1
+pid=1
+
+*/
+
+$regionIDList = array('1', '2', '107', '108', '109', '10001');
+
+$kanban = new kanbanTest();
+
+r($kanban->getGroupListTest($regionIDList[0])) && p() && e(',1'); // 获取区域1的看板
+r($kanban->getGroupListTest($regionIDList[1])) && p() && e(',2'); // 获取区域1的看板
+r($kanban->getGroupListTest($regionIDList[2])) && p() && e(',179,180,181'); // 获取区域1的看板
+r($kanban->getGroupListTest($regionIDList[3])) && p() && e(',182,183,184'); // 获取区域1的看板
+r($kanban->getGroupListTest($regionIDList[4])) && p() && e(',185,186,187'); // 获取区域1的看板
+r($kanban->getGroupListTest($regionIDList[5])) && p() && e('0'); // 获取区域1的看板
diff --git a/test/model/kanban/getkanban4group.php b/test/model/kanban/getkanban4group.php
new file mode 100755
index 0000000000..da50abe391
--- /dev/null
+++ b/test/model/kanban/getkanban4group.php
@@ -0,0 +1,35 @@
+#!/usr/bin/env php
+getKanban4Group();
+cid=1
+pid=1
+
+*/
+
+$executionIDList = array('101', '102', '103', '104', '105');
+$browseTypeList = array('story', 'task', 'bug');
+$groupByList = array('pri', 'category', 'module', 'source', 'assignedTo', 'story', 'severity');
+
+$kanban = new kanbanTest();
+
+r($kanban->getKanban4GroupTest($executionIDList[0], $browseTypeList[0], $groupByList[0])) && p() && e('lanes:3'); //获取执行101 类型story 分组pri的看板信息
+r($kanban->getKanban4GroupTest($executionIDList[0], $browseTypeList[0], $groupByList[1])) && p() && e('lanes:2'); //获取执行101 类型story 分组category的看板信息
+r($kanban->getKanban4GroupTest($executionIDList[0], $browseTypeList[0], $groupByList[2])) && p() && e('lanes:3'); //获取执行101 类型story 分组module的看板信息
+r($kanban->getKanban4GroupTest($executionIDList[0], $browseTypeList[0], $groupByList[3])) && p() && e('lanes:3'); //获取执行101 类型story 分组source的看板信息
+r($kanban->getKanban4GroupTest($executionIDList[1], $browseTypeList[1], $groupByList[0])) && p() && e('lanes:4'); //获取执行102 类型task 分组pri的看板信息
+r($kanban->getKanban4GroupTest($executionIDList[1], $browseTypeList[1], $groupByList[2])) && p() && e('lanes:5'); //获取执行102 类型task 分组module的看板信息
+r($kanban->getKanban4GroupTest($executionIDList[1], $browseTypeList[1], $groupByList[4])) && p() && e('lanes:1'); //获取执行102 类型task 分组assignedTo的看板信息
+r($kanban->getKanban4GroupTest($executionIDList[1], $browseTypeList[1], $groupByList[5])) && p() && e('lanes:2'); //获取执行102 类型task 分组story的看板信息
+r($kanban->getKanban4GroupTest($executionIDList[2], $browseTypeList[2], $groupByList[0])) && p() && e('lanes:4'); //获取执行103 类型bug 分组pri的看板信息
+r($kanban->getKanban4GroupTest($executionIDList[2], $browseTypeList[2], $groupByList[2])) && p() && e('lanes:4'); //获取执行103 类型bug 分组module的看板信息
+r($kanban->getKanban4GroupTest($executionIDList[2], $browseTypeList[2], $groupByList[4])) && p() && e('lanes:3'); //获取执行103 类型bug 分组assignedTo的看板信息
+r($kanban->getKanban4GroupTest($executionIDList[2], $browseTypeList[2], $groupByList[6])) && p() && e('lanes:4'); //获取执行103 类型bug 分组severity的看板信息
+r($kanban->getKanban4GroupTest($executionIDList[3], $browseTypeList[0], $groupByList[0])) && p() && e('lanes:3'); //获取执行104 类型story 分组pri的看板信息
+r($kanban->getKanban4GroupTest($executionIDList[4], $browseTypeList[0], $groupByList[0])) && p() && e('lanes:3'); //获取执行105 类型story 分组pri的看板信息
+system("./ztest init");
diff --git a/test/model/kanban/getkanbancardmenu.php b/test/model/kanban/getkanbancardmenu.php
new file mode 100755
index 0000000000..444480ab4d
--- /dev/null
+++ b/test/model/kanban/getkanbancardmenu.php
@@ -0,0 +1,34 @@
+#!/usr/bin/env php
+getKanbanCardMenu();
+cid=1
+pid=1
+
+*/
+
+$executionIDList = array('101', '102', '103', '104', '105');
+$browseTypeList = array('story', 'task', 'bug');
+
+$kanban = new kanbanTest();
+
+r($kanban->getKanbanCardMenuTest($executionIDList[0], $browseTypeList[0])) && p() && e('12'); // 测试获取执行101 story的操作数量
+r($kanban->getKanbanCardMenuTest($executionIDList[0], $browseTypeList[1])) && p() && e('60'); // 测试获取执行101 task的操作数量
+r($kanban->getKanbanCardMenuTest($executionIDList[0], $browseTypeList[2])) && p() && e('23'); // 测试获取执行101 bug的操作数量
+r($kanban->getKanbanCardMenuTest($executionIDList[1], $browseTypeList[0])) && p() && e('12'); // 测试获取执行102 story的操作数量
+r($kanban->getKanbanCardMenuTest($executionIDList[1], $browseTypeList[1])) && p() && e('26'); // 测试获取执行102 task的操作数量
+r($kanban->getKanbanCardMenuTest($executionIDList[1], $browseTypeList[2])) && p() && e('22'); // 测试获取执行102 bug的操作数量
+r($kanban->getKanbanCardMenuTest($executionIDList[2], $browseTypeList[0])) && p() && e('12'); // 测试获取执行103 story的操作数量
+r($kanban->getKanbanCardMenuTest($executionIDList[2], $browseTypeList[1])) && p() && e('25'); // 测试获取执行103 task的操作数量
+r($kanban->getKanbanCardMenuTest($executionIDList[2], $browseTypeList[2])) && p() && e('23'); // 测试获取执行103 bug的操作数量
+r($kanban->getKanbanCardMenuTest($executionIDList[3], $browseTypeList[0])) && p() && e('12'); // 测试获取执行104 story的操作数量
+r($kanban->getKanbanCardMenuTest($executionIDList[3], $browseTypeList[1])) && p() && e('26'); // 测试获取执行104 task的操作数量
+r($kanban->getKanbanCardMenuTest($executionIDList[3], $browseTypeList[2])) && p() && e('22'); // 测试获取执行104 bug的操作数量
+r($kanban->getKanbanCardMenuTest($executionIDList[4], $browseTypeList[0])) && p() && e('12'); // 测试获取执行105 story的操作数量
+r($kanban->getKanbanCardMenuTest($executionIDList[4], $browseTypeList[1])) && p() && e('25'); // 测试获取执行105 task的操作数量
+r($kanban->getKanbanCardMenuTest($executionIDList[4], $browseTypeList[2])) && p() && e('23'); // 测试获取执行105 bug的操作数量