* convert to unix format.

This commit is contained in:
wangchunsheng
2013-01-18 01:58:14 +00:00
parent acf877aeb8
commit 8f0d651d9c
398 changed files with 54781 additions and 54781 deletions
File diff suppressed because it is too large Load Diff
+85 -85
View File
@@ -1,85 +1,85 @@
<?php
/**
* The testtask module English file of ZenTaoPMS.
*
* @copyright Copyright 2009-2013 青岛易软天创网络科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package testtask
* @version $Id$
* @link http://www.zentao.net
*/
$lang->testtask->index = "Index";
$lang->testtask->create = "Create";
$lang->testtask->delete = "Delete";
$lang->testtask->view = "Info";
$lang->testtask->edit = "Edit";
$lang->testtask->browse = "Testtask browse";
$lang->testtask->linkCase = "Link case";
$lang->testtask->linkCaseAB = "Link";
$lang->testtask->unlinkCase = "Del";
$lang->testtask->batchAssign = "Batch Assign";
$lang->testtask->runCase = "Run";
$lang->testtask->batchRun = "Batch Run";
$lang->testtask->results = "Result";
$lang->testtask->createBug = "Bug(+)";
$lang->testtask->assign = 'Assign';
$lang->testtask->cases = 'Cases';
$lang->testtask->next = 'Next';
$lang->testtask->common = 'Test task';
$lang->testtask->id = 'ID';
$lang->testtask->product = 'Product';
$lang->testtask->project = 'Project';
$lang->testtask->build = 'Build';
$lang->testtask->owner = 'Owner';
$lang->testtask->pri = 'Priority';
$lang->testtask->name = 'Name';
$lang->testtask->begin = 'Begin';
$lang->testtask->end = 'End';
$lang->testtask->desc = 'Desc';
$lang->testtask->status = 'Status';
$lang->testtask->assignedTo = 'Assign';
$lang->testtask->linkVersion = 'Version';
$lang->testtask->lastRunAccount = "Run";
$lang->testtask->lastRunTime = 'Time';
$lang->testtask->lastRunResult = 'Result';
$lang->testtask->statusList['wait'] = 'Pending';
$lang->testtask->statusList['doing'] = 'In progress';
$lang->testtask->statusList['done'] = 'Done';
$lang->testtask->statusList['blocked'] = 'Blocked';
$lang->testtask->priList[0] = '';
$lang->testtask->priList[3] = '3';
$lang->testtask->priList[1] = '1';
$lang->testtask->priList[2] = '2';
$lang->testtask->priList[4] = '4';
$lang->testtask->unlinkedCases = 'Unlinked';
$lang->testtask->linkedCases = 'Linked';
$lang->testtask->linkByStory = 'Link by story';
$lang->testtask->linkByBug = 'Link by bug';
$lang->testtask->confirmDelete = 'Are you sure to delete this test task?';
$lang->testtask->passAll = 'Pass all';
$lang->testtask->pass = 'Pass';
$lang->testtask->fail = 'Fail';
$lang->testtask->byModule = 'By module';
$lang->testtask->assignedToMe = 'Assgined to me';
$lang->testtask->allCases = 'All Cases';
$lang->testtask->lblCases = 'Case list';
$lang->testtask->lblUnlinkCase = 'Remove case';
$lang->testtask->lblRunCase = 'Run';
$lang->testtask->lblResults = 'Result';
$lang->testtask->placeholder = new stdclass();
$lang->testtask->placeholder->begin = 'begin date';
$lang->testtask->placeholder->end = 'end date';
$lang->testtask->mail = new stdclass();
$lang->testtask->mail->create = new stdclass();
$lang->testtask->mail->edit = new stdclass();
$lang->testtask->mail->create->title = "%s created testtask #%s:%s";
$lang->testtask->mail->edit->title = "%s finished testtask #%s:%s";
<?php
/**
* The testtask module English file of ZenTaoPMS.
*
* @copyright Copyright 2009-2013 青岛易软天创网络科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package testtask
* @version $Id$
* @link http://www.zentao.net
*/
$lang->testtask->index = "Index";
$lang->testtask->create = "Create";
$lang->testtask->delete = "Delete";
$lang->testtask->view = "Info";
$lang->testtask->edit = "Edit";
$lang->testtask->browse = "Testtask browse";
$lang->testtask->linkCase = "Link case";
$lang->testtask->linkCaseAB = "Link";
$lang->testtask->unlinkCase = "Del";
$lang->testtask->batchAssign = "Batch Assign";
$lang->testtask->runCase = "Run";
$lang->testtask->batchRun = "Batch Run";
$lang->testtask->results = "Result";
$lang->testtask->createBug = "Bug(+)";
$lang->testtask->assign = 'Assign';
$lang->testtask->cases = 'Cases';
$lang->testtask->next = 'Next';
$lang->testtask->common = 'Test task';
$lang->testtask->id = 'ID';
$lang->testtask->product = 'Product';
$lang->testtask->project = 'Project';
$lang->testtask->build = 'Build';
$lang->testtask->owner = 'Owner';
$lang->testtask->pri = 'Priority';
$lang->testtask->name = 'Name';
$lang->testtask->begin = 'Begin';
$lang->testtask->end = 'End';
$lang->testtask->desc = 'Desc';
$lang->testtask->status = 'Status';
$lang->testtask->assignedTo = 'Assign';
$lang->testtask->linkVersion = 'Version';
$lang->testtask->lastRunAccount = "Run";
$lang->testtask->lastRunTime = 'Time';
$lang->testtask->lastRunResult = 'Result';
$lang->testtask->statusList['wait'] = 'Pending';
$lang->testtask->statusList['doing'] = 'In progress';
$lang->testtask->statusList['done'] = 'Done';
$lang->testtask->statusList['blocked'] = 'Blocked';
$lang->testtask->priList[0] = '';
$lang->testtask->priList[3] = '3';
$lang->testtask->priList[1] = '1';
$lang->testtask->priList[2] = '2';
$lang->testtask->priList[4] = '4';
$lang->testtask->unlinkedCases = 'Unlinked';
$lang->testtask->linkedCases = 'Linked';
$lang->testtask->linkByStory = 'Link by story';
$lang->testtask->linkByBug = 'Link by bug';
$lang->testtask->confirmDelete = 'Are you sure to delete this test task?';
$lang->testtask->passAll = 'Pass all';
$lang->testtask->pass = 'Pass';
$lang->testtask->fail = 'Fail';
$lang->testtask->byModule = 'By module';
$lang->testtask->assignedToMe = 'Assgined to me';
$lang->testtask->allCases = 'All Cases';
$lang->testtask->lblCases = 'Case list';
$lang->testtask->lblUnlinkCase = 'Remove case';
$lang->testtask->lblRunCase = 'Run';
$lang->testtask->lblResults = 'Result';
$lang->testtask->placeholder = new stdclass();
$lang->testtask->placeholder->begin = 'begin date';
$lang->testtask->placeholder->end = 'end date';
$lang->testtask->mail = new stdclass();
$lang->testtask->mail->create = new stdclass();
$lang->testtask->mail->edit = new stdclass();
$lang->testtask->mail->create->title = "%s created testtask #%s:%s";
$lang->testtask->mail->edit->title = "%s finished testtask #%s:%s";
+85 -85
View File
@@ -1,85 +1,85 @@
<?php
/**
* The testtask module zh-cn file of ZenTaoPMS.
*
* @copyright Copyright 2009-2013 青岛易软天创网络科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package testtask
* @version $Id$
* @link http://www.zentao.net
*/
$lang->testtask->index = "测试任务首页";
$lang->testtask->create = "提交测试";
$lang->testtask->delete = "删除测试任务";
$lang->testtask->view = "详情";
$lang->testtask->edit = "编辑测试任务";
$lang->testtask->browse = "待测列表";
$lang->testtask->linkCase = "关联用例";
$lang->testtask->linkCaseAB = "关联";
$lang->testtask->unlinkCase = "移除";
$lang->testtask->batchAssign = "批量指派";
$lang->testtask->runCase = "执行";
$lang->testtask->batchRun = "批量执行";
$lang->testtask->results = "结果";
$lang->testtask->createBug = "提Bug";
$lang->testtask->assign = '指派';
$lang->testtask->cases = '用例';
$lang->testtask->next = '下一个';
$lang->testtask->common = '测试任务';
$lang->testtask->id = '任务编号';
$lang->testtask->product = '所属产品';
$lang->testtask->project = '所属项目';
$lang->testtask->build = '版本';
$lang->testtask->owner = '负责人';
$lang->testtask->pri = '优先级';
$lang->testtask->name = '任务名称';
$lang->testtask->begin = '开始日期';
$lang->testtask->end = '结束日期';
$lang->testtask->desc = '任务描述';
$lang->testtask->status = '当前状态';
$lang->testtask->assignedTo = '指派给';
$lang->testtask->linkVersion = '版本';
$lang->testtask->lastRunAccount = '执行人';
$lang->testtask->lastRunTime = '执行时间';
$lang->testtask->lastRunResult = '结果';
$lang->testtask->statusList['wait'] = '未开始';
$lang->testtask->statusList['doing'] = '进行中';
$lang->testtask->statusList['done'] = '已完成';
$lang->testtask->statusList['blocked'] = '被阻塞';
$lang->testtask->priList[0] = '';
$lang->testtask->priList[3] = '3';
$lang->testtask->priList[1] = '1';
$lang->testtask->priList[2] = '2';
$lang->testtask->priList[4] = '4';
$lang->testtask->unlinkedCases = '未关联';
$lang->testtask->linkedCases = '已关联';
$lang->testtask->linkByStory = '按需求关联';
$lang->testtask->linkByBug = '按Bug关联';
$lang->testtask->confirmDelete = '您确认要删除该测试任务吗?';
$lang->testtask->passAll = '全部通过';
$lang->testtask->pass = '通过';
$lang->testtask->fail = '失败';
$lang->testtask->byModule = '按模块';
$lang->testtask->assignedToMe = '指派给我';
$lang->testtask->allCases = '所有用例';
$lang->testtask->lblCases = '用例列表';
$lang->testtask->lblUnlinkCase = '移除用例';
$lang->testtask->lblRunCase = '执行用例';
$lang->testtask->lblResults = '执行结果';
$lang->testtask->placeholder = new stdclass();
$lang->testtask->placeholder->begin = '开始日期';
$lang->testtask->placeholder->end = '结束日期';
$lang->testtask->mail = new stdclass();
$lang->testtask->mail->create = new stdclass();
$lang->testtask->mail->edit = new stdclass();
$lang->testtask->mail->create->title = "%s创建了测试任务 #%s:%s";
$lang->testtask->mail->edit->title = "%s编辑了测试任务 #%s:%s";
<?php
/**
* The testtask module zh-cn file of ZenTaoPMS.
*
* @copyright Copyright 2009-2013 青岛易软天创网络科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package testtask
* @version $Id$
* @link http://www.zentao.net
*/
$lang->testtask->index = "测试任务首页";
$lang->testtask->create = "提交测试";
$lang->testtask->delete = "删除测试任务";
$lang->testtask->view = "详情";
$lang->testtask->edit = "编辑测试任务";
$lang->testtask->browse = "待测列表";
$lang->testtask->linkCase = "关联用例";
$lang->testtask->linkCaseAB = "关联";
$lang->testtask->unlinkCase = "移除";
$lang->testtask->batchAssign = "批量指派";
$lang->testtask->runCase = "执行";
$lang->testtask->batchRun = "批量执行";
$lang->testtask->results = "结果";
$lang->testtask->createBug = "提Bug";
$lang->testtask->assign = '指派';
$lang->testtask->cases = '用例';
$lang->testtask->next = '下一个';
$lang->testtask->common = '测试任务';
$lang->testtask->id = '任务编号';
$lang->testtask->product = '所属产品';
$lang->testtask->project = '所属项目';
$lang->testtask->build = '版本';
$lang->testtask->owner = '负责人';
$lang->testtask->pri = '优先级';
$lang->testtask->name = '任务名称';
$lang->testtask->begin = '开始日期';
$lang->testtask->end = '结束日期';
$lang->testtask->desc = '任务描述';
$lang->testtask->status = '当前状态';
$lang->testtask->assignedTo = '指派给';
$lang->testtask->linkVersion = '版本';
$lang->testtask->lastRunAccount = '执行人';
$lang->testtask->lastRunTime = '执行时间';
$lang->testtask->lastRunResult = '结果';
$lang->testtask->statusList['wait'] = '未开始';
$lang->testtask->statusList['doing'] = '进行中';
$lang->testtask->statusList['done'] = '已完成';
$lang->testtask->statusList['blocked'] = '被阻塞';
$lang->testtask->priList[0] = '';
$lang->testtask->priList[3] = '3';
$lang->testtask->priList[1] = '1';
$lang->testtask->priList[2] = '2';
$lang->testtask->priList[4] = '4';
$lang->testtask->unlinkedCases = '未关联';
$lang->testtask->linkedCases = '已关联';
$lang->testtask->linkByStory = '按需求关联';
$lang->testtask->linkByBug = '按Bug关联';
$lang->testtask->confirmDelete = '您确认要删除该测试任务吗?';
$lang->testtask->passAll = '全部通过';
$lang->testtask->pass = '通过';
$lang->testtask->fail = '失败';
$lang->testtask->byModule = '按模块';
$lang->testtask->assignedToMe = '指派给我';
$lang->testtask->allCases = '所有用例';
$lang->testtask->lblCases = '用例列表';
$lang->testtask->lblUnlinkCase = '移除用例';
$lang->testtask->lblRunCase = '执行用例';
$lang->testtask->lblResults = '执行结果';
$lang->testtask->placeholder = new stdclass();
$lang->testtask->placeholder->begin = '开始日期';
$lang->testtask->placeholder->end = '结束日期';
$lang->testtask->mail = new stdclass();
$lang->testtask->mail->create = new stdclass();
$lang->testtask->mail->edit = new stdclass();
$lang->testtask->mail->create->title = "%s创建了测试任务 #%s:%s";
$lang->testtask->mail->edit->title = "%s编辑了测试任务 #%s:%s";
+85 -85
View File
@@ -1,85 +1,85 @@
<?php
/**
* The testtask module zh-tw file of ZenTaoPMS.
*
* @copyright Copyright 2009-2013 青島易軟天創網絡科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package testtask
* @version $Id: zh-tw.php 3860 2012-12-19 10:08:20Z wyd621@gmail.com $
* @link http://www.zentao.net
*/
$lang->testtask->index = "測試任務首頁";
$lang->testtask->create = "提交測試";
$lang->testtask->delete = "刪除測試任務";
$lang->testtask->view = "詳情";
$lang->testtask->edit = "編輯測試任務";
$lang->testtask->browse = "待測列表";
$lang->testtask->linkCase = "關聯用例";
$lang->testtask->linkCaseAB = "關聯";
$lang->testtask->unlinkCase = "移除";
$lang->testtask->batchAssign = "批量指派";
$lang->testtask->runCase = "執行";
$lang->testtask->batchRun = "批量執行";
$lang->testtask->results = "結果";
$lang->testtask->createBug = "提Bug";
$lang->testtask->assign = '指派';
$lang->testtask->cases = '用例';
$lang->testtask->next = '下一個';
$lang->testtask->common = '測試任務';
$lang->testtask->id = '任務編號';
$lang->testtask->product = '所屬產品';
$lang->testtask->project = '所屬項目';
$lang->testtask->build = '版本';
$lang->testtask->owner = '負責人';
$lang->testtask->pri = '優先順序';
$lang->testtask->name = '任務名稱';
$lang->testtask->begin = '開始日期';
$lang->testtask->end = '結束日期';
$lang->testtask->desc = '任務描述';
$lang->testtask->status = '當前狀態';
$lang->testtask->assignedTo = '指派給';
$lang->testtask->linkVersion = '版本';
$lang->testtask->lastRunAccount = '執行人';
$lang->testtask->lastRunTime = '執行時間';
$lang->testtask->lastRunResult = '結果';
$lang->testtask->statusList['wait'] = '未開始';
$lang->testtask->statusList['doing'] = '進行中';
$lang->testtask->statusList['done'] = '已完成';
$lang->testtask->statusList['blocked'] = '被阻塞';
$lang->testtask->priList[0] = '';
$lang->testtask->priList[3] = '3';
$lang->testtask->priList[1] = '1';
$lang->testtask->priList[2] = '2';
$lang->testtask->priList[4] = '4';
$lang->testtask->unlinkedCases = '未關聯';
$lang->testtask->linkedCases = '已關聯';
$lang->testtask->linkByStory = '按需求關聯';
$lang->testtask->linkByBug = '按Bug關聯';
$lang->testtask->confirmDelete = '您確認要刪除該測試任務嗎?';
$lang->testtask->passAll = '全部通過';
$lang->testtask->pass = '通過';
$lang->testtask->fail = '失敗';
$lang->testtask->byModule = '按模組';
$lang->testtask->assignedToMe = '指派給我';
$lang->testtask->allCases = '所有Case';
$lang->testtask->lblCases = '用例列表';
$lang->testtask->lblUnlinkCase = '移除用例';
$lang->testtask->lblRunCase = '執行用例';
$lang->testtask->lblResults = '執行結果';
$lang->testtask->placeholder = new stdclass();
$lang->testtask->placeholder->begin = '開始日期';
$lang->testtask->placeholder->end = '結束日期';
$lang->testtask->mail = new stdclass();
$lang->testtask->mail->create = new stdclass();
$lang->testtask->mail->edit = new stdclass();
$lang->testtask->mail->create->title = "%s創建了測試任務 #%s:%s";
$lang->testtask->mail->edit->title = "%s編輯了測試任務 #%s:%s";
<?php
/**
* The testtask module zh-tw file of ZenTaoPMS.
*
* @copyright Copyright 2009-2013 青島易軟天創網絡科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package testtask
* @version $Id: zh-tw.php 3860 2012-12-19 10:08:20Z wyd621@gmail.com $
* @link http://www.zentao.net
*/
$lang->testtask->index = "測試任務首頁";
$lang->testtask->create = "提交測試";
$lang->testtask->delete = "刪除測試任務";
$lang->testtask->view = "詳情";
$lang->testtask->edit = "編輯測試任務";
$lang->testtask->browse = "待測列表";
$lang->testtask->linkCase = "關聯用例";
$lang->testtask->linkCaseAB = "關聯";
$lang->testtask->unlinkCase = "移除";
$lang->testtask->batchAssign = "批量指派";
$lang->testtask->runCase = "執行";
$lang->testtask->batchRun = "批量執行";
$lang->testtask->results = "結果";
$lang->testtask->createBug = "提Bug";
$lang->testtask->assign = '指派';
$lang->testtask->cases = '用例';
$lang->testtask->next = '下一個';
$lang->testtask->common = '測試任務';
$lang->testtask->id = '任務編號';
$lang->testtask->product = '所屬產品';
$lang->testtask->project = '所屬項目';
$lang->testtask->build = '版本';
$lang->testtask->owner = '負責人';
$lang->testtask->pri = '優先順序';
$lang->testtask->name = '任務名稱';
$lang->testtask->begin = '開始日期';
$lang->testtask->end = '結束日期';
$lang->testtask->desc = '任務描述';
$lang->testtask->status = '當前狀態';
$lang->testtask->assignedTo = '指派給';
$lang->testtask->linkVersion = '版本';
$lang->testtask->lastRunAccount = '執行人';
$lang->testtask->lastRunTime = '執行時間';
$lang->testtask->lastRunResult = '結果';
$lang->testtask->statusList['wait'] = '未開始';
$lang->testtask->statusList['doing'] = '進行中';
$lang->testtask->statusList['done'] = '已完成';
$lang->testtask->statusList['blocked'] = '被阻塞';
$lang->testtask->priList[0] = '';
$lang->testtask->priList[3] = '3';
$lang->testtask->priList[1] = '1';
$lang->testtask->priList[2] = '2';
$lang->testtask->priList[4] = '4';
$lang->testtask->unlinkedCases = '未關聯';
$lang->testtask->linkedCases = '已關聯';
$lang->testtask->linkByStory = '按需求關聯';
$lang->testtask->linkByBug = '按Bug關聯';
$lang->testtask->confirmDelete = '您確認要刪除該測試任務嗎?';
$lang->testtask->passAll = '全部通過';
$lang->testtask->pass = '通過';
$lang->testtask->fail = '失敗';
$lang->testtask->byModule = '按模組';
$lang->testtask->assignedToMe = '指派給我';
$lang->testtask->allCases = '所有Case';
$lang->testtask->lblCases = '用例列表';
$lang->testtask->lblUnlinkCase = '移除用例';
$lang->testtask->lblRunCase = '執行用例';
$lang->testtask->lblResults = '執行結果';
$lang->testtask->placeholder = new stdclass();
$lang->testtask->placeholder->begin = '開始日期';
$lang->testtask->placeholder->end = '結束日期';
$lang->testtask->mail = new stdclass();
$lang->testtask->mail->create = new stdclass();
$lang->testtask->mail->edit = new stdclass();
$lang->testtask->mail->create->title = "%s創建了測試任務 #%s:%s";
$lang->testtask->mail->edit->title = "%s編輯了測試任務 #%s:%s";
+424 -424
View File
@@ -1,424 +1,424 @@
<?php
/**
* The model file of test task module of ZenTaoPMS.
*
* @copyright Copyright 2009-2013 青岛易软天创网络科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package testtask
* @version $Id$
* @link http://www.zentao.net
*/
?>
<?php
class testtaskModel extends model
{
/**
* Set the menu.
*
* @param array $products
* @param int $productID
* @access public
* @return void
*/
public function setMenu($products, $productID)
{
$this->loadModel('product')->setMenu($products, $productID);
$selectHtml = $this->product->select($products, $productID, 'testtask', 'browse');
foreach($this->lang->testtask->menu as $key => $value)
{
$replace = ($key == 'product') ? $selectHtml : $productID;
common::setMenuVars($this->lang->testtask->menu, $key, $replace);
}
}
/**
* Create a test task.
*
* @param int $productID
* @access public
* @return void
*/
function create()
{
$task = fixer::input('post')
->stripTags('name')
->get();
$this->dao->insert(TABLE_TESTTASK)->data($task)->autoCheck()->batchcheck($this->config->testtask->create->requiredFields, 'notempty')->exec();
if(!dao::isError()) return $this->dao->lastInsertID();
}
/**
* Get test tasks of a product.
*
* @param int $productID
* @param string $orderBy
* @param object $pager
* @access public
* @return array
*/
public function getProductTasks($productID, $orderBy = 'id_desc', $pager = null)
{
return $this->dao->select('t1.*, t2.name AS productName, t3.name AS projectName, t4.name AS buildName')
->from(TABLE_TESTTASK)->alias('t1')
->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product = t2.id')
->leftJoin(TABLE_PROJECT)->alias('t3')->on('t1.project = t3.id')
->leftJoin(TABLE_BUILD)->alias('t4')->on('t1.build = t4.id')
->where('t1.product')->eq((int)$productID)
->andWhere('t1.deleted')->eq(0)
->orderBy($orderBy)
->page($pager)
->fetchAll();
}
/**
* Get test tasks of a project.
*
* @param int $projectID
* @param string $orderBy
* @param object $pager
* @access public
* @return array
*/
public function getProjectTasks($projectID, $orderBy = 'id_desc', $pager = null)
{
return $this->dao->select('t1.*, t2.name AS buildName')
->from(TABLE_TESTTASK)->alias('t1')
->leftJoin(TABLE_BUILD)->alias('t2')->on('t1.build = t2.id')
->where('t1.project')->eq((int)$projectID)
->andWhere('t1.deleted')->eq(0)
->orderBy($orderBy)
->page($pager)
->fetchAll();
}
/**
* Get test task info by id.
*
* @param int $taskID
* @param bool $setImgSize
* @access public
* @return void
*/
public function getById($taskID, $setImgSize = false)
{
$task = $this->dao->select('t1.*, t2.name AS productName, t3.name AS projectName, t4.name AS buildName')
->from(TABLE_TESTTASK)->alias('t1')
->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product = t2.id')
->leftJoin(TABLE_PROJECT)->alias('t3')->on('t1.project = t3.id')
->leftJoin(TABLE_BUILD)->alias('t4')->on('t1.build = t4.id')
->where('t1.id')->eq((int)$taskID)->fetch();
if($setImgSize) $task->desc = $this->loadModel('file')->setImgSize($task->desc);
return $task;
}
/**
* Get test tasks by user.
*
* @param string $account
* @access public
* @return array
*/
public function getByUser($account, $pager = null, $orderBy = 'id_desc')
{
return $this->dao->select('t1.*, t2.name AS projectName, t3.name AS buildName')
->from(TABLE_TESTTASK)->alias('t1')
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')
->leftJoin(TABLE_BUILD)->alias('t3')->on('t1.build = t3.id')
->where('t1.deleted')->eq(0)
->andWhere('t1.owner')->eq($account)
->orderBy($orderBy)
->page($pager)
->fetchAll();
}
/**
* Update a test task.
*
* @param int $taskID
* @access public
* @return void
*/
public function update($taskID)
{
$oldTask = $this->getById($taskID);
$task = fixer::input('post')->stripTags('name')->get();
$this->dao->update(TABLE_TESTTASK)->data($task)->autoCheck()->batchcheck($this->config->testtask->edit->requiredFields, 'notempty')->where('id')->eq($taskID)->exec();
if(!dao::isError()) return common::createChanges($oldTask, $task);
}
/**
* Link cases.
*
* @param int $taskID
* @access public
* @return void
*/
public function linkCase($taskID)
{
if($this->post->cases == false) return;
foreach($this->post->cases as $caseID)
{
$row->task = $taskID;
$row->case = $caseID;
$row->version = $this->post->versions[$caseID];
$row->assignedTo = '';
$row->status = 'wait';
$this->dao->replace(TABLE_TESTRUN)->data($row)->exec();
}
}
/**
* Get test runs of a test task.
*
* @param int $taskID
* @param int $moduleID
* @param object $pager
* @access public
* @return array
*/
public function getRuns($taskID, $moduleID, $orderBy, $pager = null)
{
$orderBy = strpos($orderBy, 'assignedTo') !== false ? ('t1.' . $orderBy) : ('t2.' . $orderBy);
return $this->dao->select('t2.*,t1.*')->from(TABLE_TESTRUN)->alias('t1')
->leftJoin(TABLE_CASE)->alias('t2')->on('t1.case = t2.id')
->where('t1.task')->eq((int)$taskID)
->beginIF($moduleID)->andWhere('t2.module')->in($moduleID)->fi()
->orderBy($orderBy)
->page($pager)
->fetchAll('', false);
}
/**
* Get test runs of a user.
*
* @param int $taskID
* @param int $user
* @param obejct $pager
* @access public
* @return array
*/
public function getUserRuns($taskID, $user, $orderBy, $pager = null)
{
$orderBy = strpos($orderBy, 'assignedTo') !== false ? ('t1.' . $orderBy) : ('t2.' . $orderBy);
return $this->dao->select('t2.*,t1.*')->from(TABLE_TESTRUN)->alias('t1')
->leftJoin(TABLE_CASE)->alias('t2')->on('t1.case = t2.id')
->where('t1.task')->eq((int)$taskID)
->andWhere('t1.assignedTo')->eq($user)
->orderBy($orderBy)
->page($pager)
->fetchAll();
}
/**
* Get info of a test run.
*
* @param int $runID
* @access public
* @return void
*/
public function getRunById($runID)
{
$testRun = $this->dao->findById($runID)->from(TABLE_TESTRUN)->fetch();
$testRun->case = $this->loadModel('testcase')->getById($testRun->case, $testRun->version);
return $testRun;
}
/**
* Create test result
*
* @param int $runID
* @access public
* @return void
*/
public function createResult($runID = 0)
{
/* Compute the test result.
*
* 1. if there result in the post, use it.
* 2. if no result, set default is pass.
* 3. then check the steps to compute result.
*
* */
$caseResult = $this->post->result ? $this->post->result : 'pass';
if(isset($_POST['passall']) and $this->post->passall == false)
{
if($this->post->steps)
{
foreach($this->post->steps as $stepID => $stepResult)
{
if($stepResult != 'pass' and $stepResult != 'n/a')
{
$caseResult = $stepResult;
break;
}
}
}
}
/* Create result of every step. */
if($this->post->steps)
{
foreach($this->post->steps as $stepID =>$stepResult)
{
$step['result'] = $this->post->passall ? 'pass' : $stepResult;
$step['real'] = $this->post->reals[$stepID];
$stepResults[$stepID] = $step;
}
}
else
{
$stepResults = array();
}
/* Insert into testResult table. */
$now = helper::now();
$result = fixer::input('post')
->add('run', $runID)
->add('caseResult', $caseResult)
->setForce('stepResults', serialize($stepResults))
->add('lastRunner', $this->app->user->account)
->add('date', $now)
->remove('steps,reals,passall,result')
->get();
$this->dao->insert(TABLE_TESTRESULT)->data($result)->autoCheck()->exec();
$this->dao->update(TABLE_CASE)->set('lastRunner')->eq($this->app->user->account)->set('lastRunDate')->eq($now)->set('lastRunResult')->eq($caseResult)->where('id')->eq($this->post->case)->exec();
if($runID)
{
/* Update testRun's status. */
if(!dao::isError())
{
$runStatus = $caseResult == 'blocked' ? 'blocked' : 'done';
$this->dao->update(TABLE_TESTRUN)
->set('lastRunResult')->eq($caseResult)
->set('status')->eq($runStatus)
->set('lastRunner')->eq($this->app->user->account)
->set('lastRunDate')->eq($now)
->where('id')->eq($runID)
->exec();
}
}
}
/**
* Batch run case
*
* @param string $runCaseType
* @access public
* @return void
*/
public function batchRun($runCaseType = 'testcase')
{
$this->post->a();
$runs = array();
$caseIdList = array_keys($this->post->results);
if($runCaseType == 'testtask') $runs = $this->dao->select('id, `case`')->from(TABLE_TESTRUN)->where('`case`')->in($caseIdList)->fetchPairs('case', 'id');
$stepGroups = $this->dao->select('t1.*')->from(TABLE_CASESTEP)->alias('t1')
->leftJoin(TABLE_CASE)->alias('t2')->on('t1.case = t2.id')
->where('t1.case')->in($caseIdList)
->andWhere('t1.version=t2.version')
->fetchGroup('case', 'id');
$now = helper::now();
foreach($this->post->results as $caseID => $result)
{
$runID = isset($runs[$caseID]) ? $runs[$caseID] : 0;
$dbSteps = $stepGroups[$caseID];
$postSteps = $this->post->steps[$caseID];
$postReals = $this->post->reals[$caseID];
$caseResult = $result ? $result : 'pass';
$stepResults = array();
foreach($dbSteps as $stepID => $step)
{
$step = array();
$step['result'] = $caseResult == 'pass' ? $caseResult : $postSteps[$stepID];
$step['real'] = $caseResult == 'pass' ? '' : $postReals[$stepID];
$stepResults[$stepID] = $step;
}
$result = new stdClass();
$result->run = $runID;
$result->case = $caseID;
$result->version = $this->post->version[$caseID];
$result->caseResult = $caseResult;
$result->stepResults = serialize($stepResults);
$result->lastRunner = $this->app->user->account;
$result->date = $now;
$this->dao->insert(TABLE_TESTRESULT)->data($result)->autoCheck()->exec();
$this->dao->update(TABLE_CASE)->set('lastRunner')->eq($this->app->user->account)->set('lastRunDate')->eq($now)->set('lastRunResult')->eq($caseResult)->where('id')->eq($caseID)->exec();
if($runID)
{
/* Update testRun's status. */
if(!dao::isError())
{
$runStatus = $caseResult == 'blocked' ? 'blocked' : 'done';
$this->dao->update(TABLE_TESTRUN)
->set('lastRunResult')->eq($caseResult)
->set('status')->eq($runStatus)
->set('lastRunner')->eq($this->app->user->account)
->set('lastRunDate')->eq($now)
->where('id')->eq($runID)
->exec();
}
}
}
}
/**
* Get results by runID or caseID
*
* @param int $runID
* @param int $caseID
* @access public
* @return array
*/
public function getResults($runID, $caseID = 0)
{
if($caseID > 0)
{
$results = $this->dao->select('*')->from(TABLE_TESTRESULT)->where('`case`')->eq($caseID)->orderBy('id desc')->fetchAll('id');
}
else
{
$results = $this->dao->select('*')->from(TABLE_TESTRESULT)->where('run')->eq($runID)->orderBy('id desc')->fetchAll('id');
}
if(!$results) return array();
$relatedVersions = array();
foreach($results as $result)
{
$relatedVersions[] = $result->version;
$runCaseID = $result->case;
}
$relatedVersions = array_unique($relatedVersions);
$relatedSteps = $this->dao->select('*')->from(TABLE_CASESTEP)
->beginIF($caseID)->where('`case`')->eq($caseID)->fi()
->beginIF($runID)->where('`case`')->eq($runCaseID)->fi()
->andWhere('version')->in($relatedVersions)
->fetchAll();
foreach($results as $resultID => $result)
{
$result->stepResults = unserialize($result->stepResults);
$results[$resultID] = $result;
foreach($relatedSteps as $key => $step)
{
if($result->version == $step->version)
{
$result->stepResults[$step->id]['desc'] = $step->desc;
$result->stepResults[$step->id]['expect'] = $step->expect;
}
}
}
return $results;
}
}
<?php
/**
* The model file of test task module of ZenTaoPMS.
*
* @copyright Copyright 2009-2013 青岛易软天创网络科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package testtask
* @version $Id$
* @link http://www.zentao.net
*/
?>
<?php
class testtaskModel extends model
{
/**
* Set the menu.
*
* @param array $products
* @param int $productID
* @access public
* @return void
*/
public function setMenu($products, $productID)
{
$this->loadModel('product')->setMenu($products, $productID);
$selectHtml = $this->product->select($products, $productID, 'testtask', 'browse');
foreach($this->lang->testtask->menu as $key => $value)
{
$replace = ($key == 'product') ? $selectHtml : $productID;
common::setMenuVars($this->lang->testtask->menu, $key, $replace);
}
}
/**
* Create a test task.
*
* @param int $productID
* @access public
* @return void
*/
function create()
{
$task = fixer::input('post')
->stripTags('name')
->get();
$this->dao->insert(TABLE_TESTTASK)->data($task)->autoCheck()->batchcheck($this->config->testtask->create->requiredFields, 'notempty')->exec();
if(!dao::isError()) return $this->dao->lastInsertID();
}
/**
* Get test tasks of a product.
*
* @param int $productID
* @param string $orderBy
* @param object $pager
* @access public
* @return array
*/
public function getProductTasks($productID, $orderBy = 'id_desc', $pager = null)
{
return $this->dao->select('t1.*, t2.name AS productName, t3.name AS projectName, t4.name AS buildName')
->from(TABLE_TESTTASK)->alias('t1')
->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product = t2.id')
->leftJoin(TABLE_PROJECT)->alias('t3')->on('t1.project = t3.id')
->leftJoin(TABLE_BUILD)->alias('t4')->on('t1.build = t4.id')
->where('t1.product')->eq((int)$productID)
->andWhere('t1.deleted')->eq(0)
->orderBy($orderBy)
->page($pager)
->fetchAll();
}
/**
* Get test tasks of a project.
*
* @param int $projectID
* @param string $orderBy
* @param object $pager
* @access public
* @return array
*/
public function getProjectTasks($projectID, $orderBy = 'id_desc', $pager = null)
{
return $this->dao->select('t1.*, t2.name AS buildName')
->from(TABLE_TESTTASK)->alias('t1')
->leftJoin(TABLE_BUILD)->alias('t2')->on('t1.build = t2.id')
->where('t1.project')->eq((int)$projectID)
->andWhere('t1.deleted')->eq(0)
->orderBy($orderBy)
->page($pager)
->fetchAll();
}
/**
* Get test task info by id.
*
* @param int $taskID
* @param bool $setImgSize
* @access public
* @return void
*/
public function getById($taskID, $setImgSize = false)
{
$task = $this->dao->select('t1.*, t2.name AS productName, t3.name AS projectName, t4.name AS buildName')
->from(TABLE_TESTTASK)->alias('t1')
->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product = t2.id')
->leftJoin(TABLE_PROJECT)->alias('t3')->on('t1.project = t3.id')
->leftJoin(TABLE_BUILD)->alias('t4')->on('t1.build = t4.id')
->where('t1.id')->eq((int)$taskID)->fetch();
if($setImgSize) $task->desc = $this->loadModel('file')->setImgSize($task->desc);
return $task;
}
/**
* Get test tasks by user.
*
* @param string $account
* @access public
* @return array
*/
public function getByUser($account, $pager = null, $orderBy = 'id_desc')
{
return $this->dao->select('t1.*, t2.name AS projectName, t3.name AS buildName')
->from(TABLE_TESTTASK)->alias('t1')
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')
->leftJoin(TABLE_BUILD)->alias('t3')->on('t1.build = t3.id')
->where('t1.deleted')->eq(0)
->andWhere('t1.owner')->eq($account)
->orderBy($orderBy)
->page($pager)
->fetchAll();
}
/**
* Update a test task.
*
* @param int $taskID
* @access public
* @return void
*/
public function update($taskID)
{
$oldTask = $this->getById($taskID);
$task = fixer::input('post')->stripTags('name')->get();
$this->dao->update(TABLE_TESTTASK)->data($task)->autoCheck()->batchcheck($this->config->testtask->edit->requiredFields, 'notempty')->where('id')->eq($taskID)->exec();
if(!dao::isError()) return common::createChanges($oldTask, $task);
}
/**
* Link cases.
*
* @param int $taskID
* @access public
* @return void
*/
public function linkCase($taskID)
{
if($this->post->cases == false) return;
foreach($this->post->cases as $caseID)
{
$row->task = $taskID;
$row->case = $caseID;
$row->version = $this->post->versions[$caseID];
$row->assignedTo = '';
$row->status = 'wait';
$this->dao->replace(TABLE_TESTRUN)->data($row)->exec();
}
}
/**
* Get test runs of a test task.
*
* @param int $taskID
* @param int $moduleID
* @param object $pager
* @access public
* @return array
*/
public function getRuns($taskID, $moduleID, $orderBy, $pager = null)
{
$orderBy = strpos($orderBy, 'assignedTo') !== false ? ('t1.' . $orderBy) : ('t2.' . $orderBy);
return $this->dao->select('t2.*,t1.*')->from(TABLE_TESTRUN)->alias('t1')
->leftJoin(TABLE_CASE)->alias('t2')->on('t1.case = t2.id')
->where('t1.task')->eq((int)$taskID)
->beginIF($moduleID)->andWhere('t2.module')->in($moduleID)->fi()
->orderBy($orderBy)
->page($pager)
->fetchAll('', false);
}
/**
* Get test runs of a user.
*
* @param int $taskID
* @param int $user
* @param obejct $pager
* @access public
* @return array
*/
public function getUserRuns($taskID, $user, $orderBy, $pager = null)
{
$orderBy = strpos($orderBy, 'assignedTo') !== false ? ('t1.' . $orderBy) : ('t2.' . $orderBy);
return $this->dao->select('t2.*,t1.*')->from(TABLE_TESTRUN)->alias('t1')
->leftJoin(TABLE_CASE)->alias('t2')->on('t1.case = t2.id')
->where('t1.task')->eq((int)$taskID)
->andWhere('t1.assignedTo')->eq($user)
->orderBy($orderBy)
->page($pager)
->fetchAll();
}
/**
* Get info of a test run.
*
* @param int $runID
* @access public
* @return void
*/
public function getRunById($runID)
{
$testRun = $this->dao->findById($runID)->from(TABLE_TESTRUN)->fetch();
$testRun->case = $this->loadModel('testcase')->getById($testRun->case, $testRun->version);
return $testRun;
}
/**
* Create test result
*
* @param int $runID
* @access public
* @return void
*/
public function createResult($runID = 0)
{
/* Compute the test result.
*
* 1. if there result in the post, use it.
* 2. if no result, set default is pass.
* 3. then check the steps to compute result.
*
* */
$caseResult = $this->post->result ? $this->post->result : 'pass';
if(isset($_POST['passall']) and $this->post->passall == false)
{
if($this->post->steps)
{
foreach($this->post->steps as $stepID => $stepResult)
{
if($stepResult != 'pass' and $stepResult != 'n/a')
{
$caseResult = $stepResult;
break;
}
}
}
}
/* Create result of every step. */
if($this->post->steps)
{
foreach($this->post->steps as $stepID =>$stepResult)
{
$step['result'] = $this->post->passall ? 'pass' : $stepResult;
$step['real'] = $this->post->reals[$stepID];
$stepResults[$stepID] = $step;
}
}
else
{
$stepResults = array();
}
/* Insert into testResult table. */
$now = helper::now();
$result = fixer::input('post')
->add('run', $runID)
->add('caseResult', $caseResult)
->setForce('stepResults', serialize($stepResults))
->add('lastRunner', $this->app->user->account)
->add('date', $now)
->remove('steps,reals,passall,result')
->get();
$this->dao->insert(TABLE_TESTRESULT)->data($result)->autoCheck()->exec();
$this->dao->update(TABLE_CASE)->set('lastRunner')->eq($this->app->user->account)->set('lastRunDate')->eq($now)->set('lastRunResult')->eq($caseResult)->where('id')->eq($this->post->case)->exec();
if($runID)
{
/* Update testRun's status. */
if(!dao::isError())
{
$runStatus = $caseResult == 'blocked' ? 'blocked' : 'done';
$this->dao->update(TABLE_TESTRUN)
->set('lastRunResult')->eq($caseResult)
->set('status')->eq($runStatus)
->set('lastRunner')->eq($this->app->user->account)
->set('lastRunDate')->eq($now)
->where('id')->eq($runID)
->exec();
}
}
}
/**
* Batch run case
*
* @param string $runCaseType
* @access public
* @return void
*/
public function batchRun($runCaseType = 'testcase')
{
$this->post->a();
$runs = array();
$caseIdList = array_keys($this->post->results);
if($runCaseType == 'testtask') $runs = $this->dao->select('id, `case`')->from(TABLE_TESTRUN)->where('`case`')->in($caseIdList)->fetchPairs('case', 'id');
$stepGroups = $this->dao->select('t1.*')->from(TABLE_CASESTEP)->alias('t1')
->leftJoin(TABLE_CASE)->alias('t2')->on('t1.case = t2.id')
->where('t1.case')->in($caseIdList)
->andWhere('t1.version=t2.version')
->fetchGroup('case', 'id');
$now = helper::now();
foreach($this->post->results as $caseID => $result)
{
$runID = isset($runs[$caseID]) ? $runs[$caseID] : 0;
$dbSteps = $stepGroups[$caseID];
$postSteps = $this->post->steps[$caseID];
$postReals = $this->post->reals[$caseID];
$caseResult = $result ? $result : 'pass';
$stepResults = array();
foreach($dbSteps as $stepID => $step)
{
$step = array();
$step['result'] = $caseResult == 'pass' ? $caseResult : $postSteps[$stepID];
$step['real'] = $caseResult == 'pass' ? '' : $postReals[$stepID];
$stepResults[$stepID] = $step;
}
$result = new stdClass();
$result->run = $runID;
$result->case = $caseID;
$result->version = $this->post->version[$caseID];
$result->caseResult = $caseResult;
$result->stepResults = serialize($stepResults);
$result->lastRunner = $this->app->user->account;
$result->date = $now;
$this->dao->insert(TABLE_TESTRESULT)->data($result)->autoCheck()->exec();
$this->dao->update(TABLE_CASE)->set('lastRunner')->eq($this->app->user->account)->set('lastRunDate')->eq($now)->set('lastRunResult')->eq($caseResult)->where('id')->eq($caseID)->exec();
if($runID)
{
/* Update testRun's status. */
if(!dao::isError())
{
$runStatus = $caseResult == 'blocked' ? 'blocked' : 'done';
$this->dao->update(TABLE_TESTRUN)
->set('lastRunResult')->eq($caseResult)
->set('status')->eq($runStatus)
->set('lastRunner')->eq($this->app->user->account)
->set('lastRunDate')->eq($now)
->where('id')->eq($runID)
->exec();
}
}
}
}
/**
* Get results by runID or caseID
*
* @param int $runID
* @param int $caseID
* @access public
* @return array
*/
public function getResults($runID, $caseID = 0)
{
if($caseID > 0)
{
$results = $this->dao->select('*')->from(TABLE_TESTRESULT)->where('`case`')->eq($caseID)->orderBy('id desc')->fetchAll('id');
}
else
{
$results = $this->dao->select('*')->from(TABLE_TESTRESULT)->where('run')->eq($runID)->orderBy('id desc')->fetchAll('id');
}
if(!$results) return array();
$relatedVersions = array();
foreach($results as $result)
{
$relatedVersions[] = $result->version;
$runCaseID = $result->case;
}
$relatedVersions = array_unique($relatedVersions);
$relatedSteps = $this->dao->select('*')->from(TABLE_CASESTEP)
->beginIF($caseID)->where('`case`')->eq($caseID)->fi()
->beginIF($runID)->where('`case`')->eq($runCaseID)->fi()
->andWhere('version')->in($relatedVersions)
->fetchAll();
foreach($results as $resultID => $result)
{
$result->stepResults = unserialize($result->stepResults);
$results[$resultID] = $result;
foreach($relatedSteps as $key => $step)
{
if($result->version == $step->version)
{
$result->stepResults[$step->id]['desc'] = $step->desc;
$result->stepResults[$step->id]['expect'] = $step->expect;
}
}
}
return $results;
}
}
+70 -70
View File
@@ -1,70 +1,70 @@
<?php
/**
* The batch edit view of testcase module of ZenTaoPMS.
*
* @copyright Copyright 2009-2013 青岛易软天创网络科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Congzhi Chen <congzhi@cnezsoft.com>
* @package testcase
* @version $Id$
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<style type='text/css'>
form p{margin:0px;}
table td,th{border:1px solid #E4E4E4}
table .table-1{border:0px; margin:0px;}
table .table-1 td{border:0px;}
</style>
<form method='post' target='hiddenwin'>
<table class='table-1 fixed'>
<caption><?php echo $lang->testtask->common . $lang->colon . $lang->testtask->batchRun;?></caption>
<tr>
<th class='w-id'><?php echo $lang->idAB;?></th>
<th class='w-pri'><?php echo $lang->priAB;?></th>
<th class='w-100px'><?php echo $lang->testcase->module;?></th>
<th width='300'><?php echo $lang->testcase->title;?></th>
<th width='150'><?php echo $lang->testcase->result?></th>
<th><?php echo $lang->testcase->stepDesc . '/' . $lang->testcase->stepExpect?></th>
</tr>
<?php foreach($cases as $caseID => $case):?>
<tr class='a-center'>
<td><?php echo $case->id . html::hidden("version[$case->id]", $case->version)?></td>
<td><?php echo $lang->testcase->priList[$case->pri]?></td>
<td align='left'><?php echo "<span title='" . $moduleOptionMenu[$case->module] . "'>" . $moduleOptionMenu[$case->module] . "</span>"?></td>
<td align='left'><?php echo "<span title='$case->title'>$case->title</span>"?></td>
<td><?php echo html::radio("results[$case->id]", $resultList, 'pass', "onclick='showAction(this.value,\".action$caseID\")'")?></td>
<td>
<table class='table-1 fixed'>
<?php $i = 1;?>
<?php foreach($steps[$caseID] as $stepID => $step):?>
<tr>
<td align='left' width='30%'><?php echo "<span title='$step->desc'>" . $i . "、" . $step->desc . '</span>'?></td>
<td align='left' width='30%'><?php echo "<span title='$step->expect'>" . $lang->testcase->stepExpect . ":" . $step->expect . '</span>'?></td>
<td width='50' class='hidden action<?php echo $caseID?>'><?php echo html::select("steps[$caseID][$stepID]", $lang->testcase->resultList, 'pass')?></td>
<td class='hidden action<?php echo $caseID?>'><?php echo html::input("reals[$caseID][$stepID]", '', "class='text-1'");?></td>
</tr>
<?php $i++?>
<?php endforeach?>
</table>
</td>
</tr>
<?php endforeach;?>
<tr><td colspan='6' class='a-center'><?php echo html::submitButton();?></td></tr>
</table>
</form>
<script type='text/javascript'>
function showAction(value, obj)
{
if(value == 'pass')
{
$(obj).addClass('hidden');
}
else
{
$(obj).removeClass('hidden');
}
}
</script>
<?php include '../../common/view/footer.html.php';?>
<?php
/**
* The batch edit view of testcase module of ZenTaoPMS.
*
* @copyright Copyright 2009-2013 青岛易软天创网络科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Congzhi Chen <congzhi@cnezsoft.com>
* @package testcase
* @version $Id$
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<style type='text/css'>
form p{margin:0px;}
table td,th{border:1px solid #E4E4E4}
table .table-1{border:0px; margin:0px;}
table .table-1 td{border:0px;}
</style>
<form method='post' target='hiddenwin'>
<table class='table-1 fixed'>
<caption><?php echo $lang->testtask->common . $lang->colon . $lang->testtask->batchRun;?></caption>
<tr>
<th class='w-id'><?php echo $lang->idAB;?></th>
<th class='w-pri'><?php echo $lang->priAB;?></th>
<th class='w-100px'><?php echo $lang->testcase->module;?></th>
<th width='300'><?php echo $lang->testcase->title;?></th>
<th width='150'><?php echo $lang->testcase->result?></th>
<th><?php echo $lang->testcase->stepDesc . '/' . $lang->testcase->stepExpect?></th>
</tr>
<?php foreach($cases as $caseID => $case):?>
<tr class='a-center'>
<td><?php echo $case->id . html::hidden("version[$case->id]", $case->version)?></td>
<td><?php echo $lang->testcase->priList[$case->pri]?></td>
<td align='left'><?php echo "<span title='" . $moduleOptionMenu[$case->module] . "'>" . $moduleOptionMenu[$case->module] . "</span>"?></td>
<td align='left'><?php echo "<span title='$case->title'>$case->title</span>"?></td>
<td><?php echo html::radio("results[$case->id]", $resultList, 'pass', "onclick='showAction(this.value,\".action$caseID\")'")?></td>
<td>
<table class='table-1 fixed'>
<?php $i = 1;?>
<?php foreach($steps[$caseID] as $stepID => $step):?>
<tr>
<td align='left' width='30%'><?php echo "<span title='$step->desc'>" . $i . "、" . $step->desc . '</span>'?></td>
<td align='left' width='30%'><?php echo "<span title='$step->expect'>" . $lang->testcase->stepExpect . ":" . $step->expect . '</span>'?></td>
<td width='50' class='hidden action<?php echo $caseID?>'><?php echo html::select("steps[$caseID][$stepID]", $lang->testcase->resultList, 'pass')?></td>
<td class='hidden action<?php echo $caseID?>'><?php echo html::input("reals[$caseID][$stepID]", '', "class='text-1'");?></td>
</tr>
<?php $i++?>
<?php endforeach?>
</table>
</td>
</tr>
<?php endforeach;?>
<tr><td colspan='6' class='a-center'><?php echo html::submitButton();?></td></tr>
</table>
</form>
<script type='text/javascript'>
function showAction(value, obj)
{
if(value == 'pass')
{
$(obj).addClass('hidden');
}
else
{
$(obj).removeClass('hidden');
}
}
</script>
<?php include '../../common/view/footer.html.php';?>
+56 -56
View File
@@ -1,56 +1,56 @@
<?php
/**
* The browse view file of testtask module of ZenTaoPMS.
*
* @copyright Copyright 2009-2013 青岛易软天创网络科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package testtask
* @version $Id$
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/tablesorter.html.php';?>
<table class='table-1 colored tablesorter fixed'>
<caption class='caption-tl'>
<div class='f-left'><?php echo $lang->testtask->browse;?></div>
<div class='f-right'><?php common::printIcon('testtask', 'create', "product=$productID");?></div>
</caption>
<thead>
<tr class='colhead'>
<th class='w-id'><?php echo $lang->idAB;?></th>
<th><?php echo $lang->testtask->name;?></th>
<th><?php echo $lang->testtask->project;?></th>
<th><?php echo $lang->testtask->build;?></th>
<th class='w-user'><?php echo $lang->testtask->owner;?></th>
<th class='w-80px'><?php echo $lang->testtask->begin;?></th>
<th class='w-80px'><?php echo $lang->testtask->end;?></th>
<th class='w-50px'><?php echo $lang->statusAB;?></th>
<th class='w-100px {sorter:false}'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php foreach($tasks as $task):?>
<tr class='a-center'>
<td><?php echo html::a(inlink('view', "taskID=$task->id"), sprintf('%03d', $task->id));?></td>
<td class='a-left' title="<?php echo $task->name?>"><?php echo html::a(inlink('view', "taskID=$task->id"), $task->name);?></td>
<td class='a-left' title="<?php echo $task->projectName?>"><?php echo $task->projectName?></td>
<td class='a-left' title="<?php echo $task->buildName?>"><?php $task->build == 'trunk' ? print('Trunk') : print(html::a($this->createLink('build', 'view', "buildID=$task->build"), $task->buildName));?></td>
<td><?php echo $users[$task->owner];?></td>
<td><?php echo $task->begin?></td>
<td><?php echo $task->end?></td>
<td><?php echo $lang->testtask->statusList[$task->status];?></td>
<td class='a-center'>
<?php
common::printIcon('testtask', 'cases', "taskID=$task->id", '', 'list');
common::printIcon('testtask', 'linkCase', "taskID=$task->id", '', 'list');
common::printIcon('testtask', 'edit', "taskID=$task->id", '', 'list');
common::printIcon('testtask', 'delete', "taskID=$task->id", '', 'list', '', 'hiddenwin');
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
</table>
<?php include '../../common/view/footer.html.php';?>
<?php
/**
* The browse view file of testtask module of ZenTaoPMS.
*
* @copyright Copyright 2009-2013 青岛易软天创网络科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package testtask
* @version $Id$
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/tablesorter.html.php';?>
<table class='table-1 colored tablesorter fixed'>
<caption class='caption-tl'>
<div class='f-left'><?php echo $lang->testtask->browse;?></div>
<div class='f-right'><?php common::printIcon('testtask', 'create', "product=$productID");?></div>
</caption>
<thead>
<tr class='colhead'>
<th class='w-id'><?php echo $lang->idAB;?></th>
<th><?php echo $lang->testtask->name;?></th>
<th><?php echo $lang->testtask->project;?></th>
<th><?php echo $lang->testtask->build;?></th>
<th class='w-user'><?php echo $lang->testtask->owner;?></th>
<th class='w-80px'><?php echo $lang->testtask->begin;?></th>
<th class='w-80px'><?php echo $lang->testtask->end;?></th>
<th class='w-50px'><?php echo $lang->statusAB;?></th>
<th class='w-100px {sorter:false}'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php foreach($tasks as $task):?>
<tr class='a-center'>
<td><?php echo html::a(inlink('view', "taskID=$task->id"), sprintf('%03d', $task->id));?></td>
<td class='a-left' title="<?php echo $task->name?>"><?php echo html::a(inlink('view', "taskID=$task->id"), $task->name);?></td>
<td class='a-left' title="<?php echo $task->projectName?>"><?php echo $task->projectName?></td>
<td class='a-left' title="<?php echo $task->buildName?>"><?php $task->build == 'trunk' ? print('Trunk') : print(html::a($this->createLink('build', 'view', "buildID=$task->build"), $task->buildName));?></td>
<td><?php echo $users[$task->owner];?></td>
<td><?php echo $task->begin?></td>
<td><?php echo $task->end?></td>
<td><?php echo $lang->testtask->statusList[$task->status];?></td>
<td class='a-center'>
<?php
common::printIcon('testtask', 'cases', "taskID=$task->id", '', 'list');
common::printIcon('testtask', 'linkCase', "taskID=$task->id", '', 'list');
common::printIcon('testtask', 'edit', "taskID=$task->id", '', 'list');
common::printIcon('testtask', 'delete', "taskID=$task->id", '', 'list', '', 'hiddenwin');
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
</table>
<?php include '../../common/view/footer.html.php';?>
+113 -113
View File
@@ -1,113 +1,113 @@
<?php
/**
* The view file of case module of ZenTaoPMS.
*
* @copyright Copyright 2009-2013 青岛易软天创网络科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package case
* @version $Id: view.html.php 594 2010-03-27 13:44:07Z wwccss $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/treeview.html.php';?>
<script language="Javascript">
var browseType = '<?php echo $browseType;?>';
var moduleID = '<?php echo $moduleID;?>';
</script>
<div id='featurebar'>
<div class='f-left'>
<?php
echo "<span id='bymoduleTab' onclick=\"browseByModule('$browseType')\"><a href='#'>" . $lang->testtask->byModule . "</a></span> ";
echo "<span id='allTab'>" . html::a($this->inlink('cases', "taskID=$taskID&browseType=all&param=0"), $lang->testtask->allCases) . "</span>";
echo "<span id='assignedtomeTab'>" . html::a($this->inlink('cases', "taskID=$taskID&browseType=assignedtome&param=0"), $lang->testtask->assignedToMe) . "</span>";
?>
</div>
<div class='f-right'>
<?php
common::printIcon('testtask', 'linkCase', "taskID=$task->id");
common::printIcon('testcase', 'export', "productID=$productID&orderBy=`case`_desc&taskID=$task->id");
common::printRPN($this->session->testtaskList, '');
?>
</div>
</div>
<form method='post' name='casesform'>
<table class='cont-lt1'>
<tr valign='top'>
<td class='side <?php echo $treeClass;?>'>
<div class='box-title'><?php echo $productName;?></div>
<div class='box-content'><?php echo $moduleTree;?></div>
</td>
<td class='divider <?php echo $treeClass;?>'></td>
<td>
<?php $vars = "taskID=$task->id&browseType=$browseType&param=$param&orderBy=%s&recToal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
<table class='table-1 tablesorter datatable mb-zero fixed'>
<thead>
<tr class='colhead'>
<th class='w-id'><nobr><?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></nobr></th>
<th class='w-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th> <?php common::printOrderLink('title', $orderBy, $vars, $lang->testcase->title);?></th>
<th class='w-type'> <?php common::printOrderLink('type', $orderBy, $vars, $lang->testcase->type);?></th>
<th class='w-user'> <?php common::printOrderLink('assignedTo', $orderBy, $vars, $lang->testtask->assignedTo);?></th>
<th class='w-user'> <?php common::printOrderLink('lastRunner', $orderBy, $vars, $lang->testtask->lastRunAccount);?></th>
<th class='w-100px'> <?php common::printOrderLink('lastRunDate', $orderBy, $vars, $lang->testtask->lastRunTime);?></th>
<th class='w-80px'> <?php common::printOrderLink('lastRunResult', $orderBy, $vars, $lang->testtask->lastRunResult);?></th>
<th class='w-status'> <?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
<th class='w-120px {sorter: false}'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php foreach($runs as $run):?>
<tr class='a-center'>
<td class='a-left'><input type='checkbox' name='caseIDList[]' value='<?php echo $run->case;?>'/> <?php printf('%03d', $run->case);?></td>
<td><span class='<?php echo 'pri' . $run->pri?>'><?php echo $run->pri?></span></td>
<td class='a-left nobr'><?php echo html::a($this->createLink('testcase', 'view', "caseID=$run->case&version=$run->version"), $run->title, '_blank');?>
</td>
<td><?php echo $lang->testcase->typeList[$run->type];?></td>
<td><?php $assignedTo = $users[$run->assignedTo]; echo substr($assignedTo, strpos($assignedTo, ':') + 1);?></td>
<td><?php $lastRunner = $users[$run->lastRunner]; echo substr($lastRunner, strpos($lastRunner, ':') + 1);?></td>
<td><?php if(!helper::isZeroDate($run->lastRunDate)) echo date(DT_MONTHTIME1, strtotime($run->lastRunDate));?></td>
<td class='<?php echo $run->lastRunResult;?>'><?php if($run->lastRunResult) echo $lang->testcase->resultList[$run->lastRunResult];?></td>
<td class='<?php echo $run->status;?>'><?php echo $lang->testtask->statusList[$run->status];?></td>
<td class='a-center'>
<?php
common::printIcon('testtask', 'runCase', "id=$run->id", '', 'list', '', '', 'iframe');
common::printIcon('testtask', 'results', "id=$run->id", '', 'list', '', '', 'iframe');
common::printIcon('testtask', 'unlinkCase', "id=$run->id", '', 'list', '', 'hiddenwin');
common::printIcon('testcase', 'createBug', "product=$productID&extra=projectID=$task->project,buildID=$task->build,caseID=$run->case,runID=$run->id", $run, 'list', 'createBug');
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
<tfoot>
<tr>
<td colspan='10'>
<?php if($runs):?>
<div class='f-left'>
<?php
echo html::selectAll() . html::selectReverse();
if(common::hasPriv('testcase', 'batchEdit')):
?>
<input class='button-s' value="<?php echo $lang->testcase->batchEdit; ?>" type="button" onclick="casesform.action='<?php echo $this->createLink('testcase', 'batchEdit', "from=testtaskCases&productID=$productID");?>';casesform.submit();">
<?php endif;?>
<?php if(common::hasPriv('testtask', 'batchAssign')):?>
<?php echo html::select('assignedTo', $users);?>
<input class='button-s' value="<?php echo $lang->testtask->batchAssign; ?>" type="button" onclick="casesform.action='<?php echo inLink('batchAssign', "taskID=$task->id");?>';casesform.submit();">
<input class='button-s' value="<?php echo $lang->testtask->batchRun; ?>" type="button" onclick="casesform.action='<?php echo inLink('batchRUN', "productID=$productID&orderBy=id_desc&from=testtask");?>';casesform.submit();">
<?php endif;?>
</div>
<?php endif;?>
<?php echo $pager->show();?>
</td>
</tr>
<tfoot>
</table>
</td>
</tr>
</table>
</form>
<?php include '../../common/view/footer.html.php';?>
<?php
/**
* The view file of case module of ZenTaoPMS.
*
* @copyright Copyright 2009-2013 青岛易软天创网络科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package case
* @version $Id: view.html.php 594 2010-03-27 13:44:07Z wwccss $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/treeview.html.php';?>
<script language="Javascript">
var browseType = '<?php echo $browseType;?>';
var moduleID = '<?php echo $moduleID;?>';
</script>
<div id='featurebar'>
<div class='f-left'>
<?php
echo "<span id='bymoduleTab' onclick=\"browseByModule('$browseType')\"><a href='#'>" . $lang->testtask->byModule . "</a></span> ";
echo "<span id='allTab'>" . html::a($this->inlink('cases', "taskID=$taskID&browseType=all&param=0"), $lang->testtask->allCases) . "</span>";
echo "<span id='assignedtomeTab'>" . html::a($this->inlink('cases', "taskID=$taskID&browseType=assignedtome&param=0"), $lang->testtask->assignedToMe) . "</span>";
?>
</div>
<div class='f-right'>
<?php
common::printIcon('testtask', 'linkCase', "taskID=$task->id");
common::printIcon('testcase', 'export', "productID=$productID&orderBy=`case`_desc&taskID=$task->id");
common::printRPN($this->session->testtaskList, '');
?>
</div>
</div>
<form method='post' name='casesform'>
<table class='cont-lt1'>
<tr valign='top'>
<td class='side <?php echo $treeClass;?>'>
<div class='box-title'><?php echo $productName;?></div>
<div class='box-content'><?php echo $moduleTree;?></div>
</td>
<td class='divider <?php echo $treeClass;?>'></td>
<td>
<?php $vars = "taskID=$task->id&browseType=$browseType&param=$param&orderBy=%s&recToal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
<table class='table-1 tablesorter datatable mb-zero fixed'>
<thead>
<tr class='colhead'>
<th class='w-id'><nobr><?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></nobr></th>
<th class='w-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th> <?php common::printOrderLink('title', $orderBy, $vars, $lang->testcase->title);?></th>
<th class='w-type'> <?php common::printOrderLink('type', $orderBy, $vars, $lang->testcase->type);?></th>
<th class='w-user'> <?php common::printOrderLink('assignedTo', $orderBy, $vars, $lang->testtask->assignedTo);?></th>
<th class='w-user'> <?php common::printOrderLink('lastRunner', $orderBy, $vars, $lang->testtask->lastRunAccount);?></th>
<th class='w-100px'> <?php common::printOrderLink('lastRunDate', $orderBy, $vars, $lang->testtask->lastRunTime);?></th>
<th class='w-80px'> <?php common::printOrderLink('lastRunResult', $orderBy, $vars, $lang->testtask->lastRunResult);?></th>
<th class='w-status'> <?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
<th class='w-120px {sorter: false}'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php foreach($runs as $run):?>
<tr class='a-center'>
<td class='a-left'><input type='checkbox' name='caseIDList[]' value='<?php echo $run->case;?>'/> <?php printf('%03d', $run->case);?></td>
<td><span class='<?php echo 'pri' . $run->pri?>'><?php echo $run->pri?></span></td>
<td class='a-left nobr'><?php echo html::a($this->createLink('testcase', 'view', "caseID=$run->case&version=$run->version"), $run->title, '_blank');?>
</td>
<td><?php echo $lang->testcase->typeList[$run->type];?></td>
<td><?php $assignedTo = $users[$run->assignedTo]; echo substr($assignedTo, strpos($assignedTo, ':') + 1);?></td>
<td><?php $lastRunner = $users[$run->lastRunner]; echo substr($lastRunner, strpos($lastRunner, ':') + 1);?></td>
<td><?php if(!helper::isZeroDate($run->lastRunDate)) echo date(DT_MONTHTIME1, strtotime($run->lastRunDate));?></td>
<td class='<?php echo $run->lastRunResult;?>'><?php if($run->lastRunResult) echo $lang->testcase->resultList[$run->lastRunResult];?></td>
<td class='<?php echo $run->status;?>'><?php echo $lang->testtask->statusList[$run->status];?></td>
<td class='a-center'>
<?php
common::printIcon('testtask', 'runCase', "id=$run->id", '', 'list', '', '', 'iframe');
common::printIcon('testtask', 'results', "id=$run->id", '', 'list', '', '', 'iframe');
common::printIcon('testtask', 'unlinkCase', "id=$run->id", '', 'list', '', 'hiddenwin');
common::printIcon('testcase', 'createBug', "product=$productID&extra=projectID=$task->project,buildID=$task->build,caseID=$run->case,runID=$run->id", $run, 'list', 'createBug');
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
<tfoot>
<tr>
<td colspan='10'>
<?php if($runs):?>
<div class='f-left'>
<?php
echo html::selectAll() . html::selectReverse();
if(common::hasPriv('testcase', 'batchEdit')):
?>
<input class='button-s' value="<?php echo $lang->testcase->batchEdit; ?>" type="button" onclick="casesform.action='<?php echo $this->createLink('testcase', 'batchEdit', "from=testtaskCases&productID=$productID");?>';casesform.submit();">
<?php endif;?>
<?php if(common::hasPriv('testtask', 'batchAssign')):?>
<?php echo html::select('assignedTo', $users);?>
<input class='button-s' value="<?php echo $lang->testtask->batchAssign; ?>" type="button" onclick="casesform.action='<?php echo inLink('batchAssign', "taskID=$task->id");?>';casesform.submit();">
<input class='button-s' value="<?php echo $lang->testtask->batchRun; ?>" type="button" onclick="casesform.action='<?php echo inLink('batchRUN', "productID=$productID&orderBy=id_desc&from=testtask");?>';casesform.submit();">
<?php endif;?>
</div>
<?php endif;?>
<?php echo $pager->show();?>
</td>
</tr>
<tfoot>
</table>
</td>
</tr>
</table>
</form>
<?php include '../../common/view/footer.html.php';?>
+71 -71
View File
@@ -1,71 +1,71 @@
<?php
/**
* The create view of testtask module of ZenTaoPMS.
*
* @copyright Copyright 2009-2013 青岛易软天创网络科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package testtask
* @version $Id$
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/datepicker.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<form method='post' target='hiddenwin' id='dataform'>
<table class='table-1'>
<caption><?php echo $lang->testtask->create;?></caption>
<?php if(isset($projectID)):?>
<tr>
<th class='rowhead'><?php echo $lang->testtask->product;?></th>
<td><?php echo html::select('product', $products, '', 'class=select-3');?></td>
</tr>
<?php else:?>
<tr class='hidden'>
<th><?php echo $lang->testtask->product;?></th>
<td><?php echo html::input('product', $productID, 'class=select-3');?></td>
</tr>
<?php endif;?>
<tr>
<th class='rowhead'><?php echo $lang->testtask->project;?></th>
<td><?php echo html::select('project', $projects, '', 'class=select-3 onchange=loadProjectRelated(this.value)');?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testtask->build;?></th>
<td><span id='buildBox'><?php echo html::select('build', $builds, '', 'class=select-3');?></span></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testtask->owner;?></th>
<td><?php echo html::select('owner', $users, '', 'class=select-3');?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testtask->pri;?></th>
<td><?php echo html::select('pri', $lang->testtask->priList, 0, 'class=select-3');?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testtask->begin;?></th>
<td><?php echo html::input('begin', '', "class='text-3 date'");?>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testtask->end;?></th>
<td><?php echo html::input('end', '', "class='text-3 date'");?>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testtask->status;?></th>
<td><?php echo html::select('status', $lang->testtask->statusList, '', "class='select-3'");?>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testtask->name;?></th>
<td><?php echo html::input('name', '', "class='text-1'");?>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testtask->desc;?></th>
<td><?php echo html::textarea('desc', '', "rows=10 class='area-1'");?>
</tr>
<tr>
<td colspan='2' class='a-center'><?php echo html::submitButton() . html::resetButton();?> </td>
</tr>
</table>
</form>
<?php include '../../common/view/footer.html.php';?>
<?php
/**
* The create view of testtask module of ZenTaoPMS.
*
* @copyright Copyright 2009-2013 青岛易软天创网络科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package testtask
* @version $Id$
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/datepicker.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<form method='post' target='hiddenwin' id='dataform'>
<table class='table-1'>
<caption><?php echo $lang->testtask->create;?></caption>
<?php if(isset($projectID)):?>
<tr>
<th class='rowhead'><?php echo $lang->testtask->product;?></th>
<td><?php echo html::select('product', $products, '', 'class=select-3');?></td>
</tr>
<?php else:?>
<tr class='hidden'>
<th><?php echo $lang->testtask->product;?></th>
<td><?php echo html::input('product', $productID, 'class=select-3');?></td>
</tr>
<?php endif;?>
<tr>
<th class='rowhead'><?php echo $lang->testtask->project;?></th>
<td><?php echo html::select('project', $projects, '', 'class=select-3 onchange=loadProjectRelated(this.value)');?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testtask->build;?></th>
<td><span id='buildBox'><?php echo html::select('build', $builds, '', 'class=select-3');?></span></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testtask->owner;?></th>
<td><?php echo html::select('owner', $users, '', 'class=select-3');?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testtask->pri;?></th>
<td><?php echo html::select('pri', $lang->testtask->priList, 0, 'class=select-3');?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testtask->begin;?></th>
<td><?php echo html::input('begin', '', "class='text-3 date'");?>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testtask->end;?></th>
<td><?php echo html::input('end', '', "class='text-3 date'");?>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testtask->status;?></th>
<td><?php echo html::select('status', $lang->testtask->statusList, '', "class='select-3'");?>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testtask->name;?></th>
<td><?php echo html::input('name', '', "class='text-1'");?>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testtask->desc;?></th>
<td><?php echo html::textarea('desc', '', "rows=10 class='area-1'");?>
</tr>
<tr>
<td colspan='2' class='a-center'><?php echo html::submitButton() . html::resetButton();?> </td>
</tr>
</table>
</form>
<?php include '../../common/view/footer.html.php';?>
+60 -60
View File
@@ -1,60 +1,60 @@
<?php
/**
* The edit view of testtask module of ZenTaoPMS.
*
* @copyright Copyright 2009-2013 青岛易软天创网络科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package testtask
* @version $Id$
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/datepicker.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<form method='post' target='hiddenwin' id='dataform'>
<table class='table-1'>
<caption><?php echo $lang->testtask->edit;?></caption>
<tr>
<th class='rowhead'><?php echo $lang->testtask->project;?></th>
<td><?php echo html::select('project', $projects, $task->project, 'class=select-3');?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testtask->build;?></th>
<td><?php echo html::select('build', $builds, $task->build, 'class=select-3');?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testtask->owner;?></th>
<td><?php echo html::select('owner', $users, $task->owner, 'class=select-3');?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testtask->pri;?></th>
<td><?php echo html::select('pri', $lang->testtask->priList, $task->pri, 'class=select-3');?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testtask->begin;?></th>
<td><?php echo html::input('begin', $task->begin, "class='text-3 date'");?>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testtask->end;?></th>
<td><?php echo html::input('end', $task->end, "class='text-3 date'");?>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testtask->status;?></th>
<td><?php echo html::select('status', $lang->testtask->statusList, $task->status, "class='select-3'");?>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testtask->name;?></th>
<td><?php echo html::input('name', $task->name, "class='text-1'");?>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testtask->desc;?></th>
<td><?php echo html::textarea('desc', htmlspecialchars($task->desc), "rows=10 class='area-1'");?>
</tr>
<tr>
<td colspan='2' class='a-center'><?php echo html::submitButton() . html::resetButton();?> </td>
</tr>
</table>
</form>
<?php include '../../common/view/footer.html.php';?>
<?php
/**
* The edit view of testtask module of ZenTaoPMS.
*
* @copyright Copyright 2009-2013 青岛易软天创网络科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package testtask
* @version $Id$
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/datepicker.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<form method='post' target='hiddenwin' id='dataform'>
<table class='table-1'>
<caption><?php echo $lang->testtask->edit;?></caption>
<tr>
<th class='rowhead'><?php echo $lang->testtask->project;?></th>
<td><?php echo html::select('project', $projects, $task->project, 'class=select-3');?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testtask->build;?></th>
<td><?php echo html::select('build', $builds, $task->build, 'class=select-3');?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testtask->owner;?></th>
<td><?php echo html::select('owner', $users, $task->owner, 'class=select-3');?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testtask->pri;?></th>
<td><?php echo html::select('pri', $lang->testtask->priList, $task->pri, 'class=select-3');?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testtask->begin;?></th>
<td><?php echo html::input('begin', $task->begin, "class='text-3 date'");?>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testtask->end;?></th>
<td><?php echo html::input('end', $task->end, "class='text-3 date'");?>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testtask->status;?></th>
<td><?php echo html::select('status', $lang->testtask->statusList, $task->status, "class='select-3'");?>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testtask->name;?></th>
<td><?php echo html::input('name', $task->name, "class='text-1'");?>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testtask->desc;?></th>
<td><?php echo html::textarea('desc', htmlspecialchars($task->desc), "rows=10 class='area-1'");?>
</tr>
<tr>
<td colspan='2' class='a-center'><?php echo html::submitButton() . html::resetButton();?> </td>
</tr>
</table>
</form>
<?php include '../../common/view/footer.html.php';?>
+79 -79
View File
@@ -1,79 +1,79 @@
<?php
/**
* The linkcase view file of testtask module of ZenTaoPMS.
*
* @copyright Copyright 2009-2013 青岛易软天创网络科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package testtask
* @version $Id$
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/tablesorter.html.php';?>
<div id='querybox'></div>
<form method='post'>
<table class='table-1 colored tablesorter fixed'>
<caption class='caption-tl'>
<div class='f-left'><?php echo $lang->testtask->unlinkedCases;?></div>
<div class='f-right'>
<?php
$lang->testtask->linCase = $lang->testtask->linkByStory;
common::printIcon('testtask', 'linkCase', "taskID=$taskID&param=bystory");
$lang->testtask->linCase = $lang->testtask->linkByBug;
common::printIcon('testtask', 'linkCase', "taskID=$taskID&param=bybug");
common::printRPN($this->session->testtaskList);
?>
</div>
</caption>
<thead>
<tr class='colhead'>
<th class='w-id'><?php echo $lang->idAB;?></th>
<th class='w-60px'><nobr><?php echo $lang->testtask->linkVersion;?></nobr></th>
<th class='w-pri'><?php echo $lang->priAB;?></th>
<th><?php echo $lang->testcase->title;?></th>
<th class='w-type'><?php echo $lang->testcase->type;?></th>
<th class='w-user'><?php echo $lang->openedByAB;?></th>
<th class='w-status'><?php echo $lang->statusAB;?></th>
</tr>
</thead>
<tbody>
<?php foreach($cases as $case):?>
<tr class='a-center'>
<td class='a-left'>
<input type='checkbox' name='cases[]' value='<?php echo $case->id;?>' />
<?php echo html::a($this->createLink('testcase', 'view', "testcaseID=$case->id"), sprintf('%03d', $case->id));?>
</td>
<td class='a-center'><?php echo html::select("versions[$case->id]", array_combine(range($case->version, 1), range($case->version, 1)), '', 'class=select-1');?> </td>
<td><span class='<?php echo 'pri' . $case->pri?>'><?php echo $case->pri?></span></td>
<td class='a-left'>
<?php
echo $case->title . ' ( ';
for($i = $case->version; $i >= 1; $i --)
{
echo html::a($this->createLink('testcase', 'view', "caseID=$case->id&version=$i"), "#$i", '_blank');
}
echo ')';
?>
</td>
<td><?php echo $lang->testcase->typeList[$case->type];?></td>
<td><?php echo $users[$case->openedBy];?></td>
<td><?php echo $lang->testcase->statusList[$case->status];?></td>
</tr>
</tbody>
<?php endforeach;?>
<tfoot>
<tr>
<td colspan='7'>
<?php if($cases):?>
<div class='f-left'><?php echo html::selectAll() . html::selectReverse() . html::submitButton();?></div>
<?php endif;?>
<div class='f-right'><?php $pager->show();?></div>
</td>
</tr>
</tfoot>
</table>
</form>
<script type='text/javascript'>ajaxGetSearchForm();</script>
<?php include '../../common/view/footer.html.php';?>
<?php
/**
* The linkcase view file of testtask module of ZenTaoPMS.
*
* @copyright Copyright 2009-2013 青岛易软天创网络科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package testtask
* @version $Id$
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/tablesorter.html.php';?>
<div id='querybox'></div>
<form method='post'>
<table class='table-1 colored tablesorter fixed'>
<caption class='caption-tl'>
<div class='f-left'><?php echo $lang->testtask->unlinkedCases;?></div>
<div class='f-right'>
<?php
$lang->testtask->linCase = $lang->testtask->linkByStory;
common::printIcon('testtask', 'linkCase', "taskID=$taskID&param=bystory");
$lang->testtask->linCase = $lang->testtask->linkByBug;
common::printIcon('testtask', 'linkCase', "taskID=$taskID&param=bybug");
common::printRPN($this->session->testtaskList);
?>
</div>
</caption>
<thead>
<tr class='colhead'>
<th class='w-id'><?php echo $lang->idAB;?></th>
<th class='w-60px'><nobr><?php echo $lang->testtask->linkVersion;?></nobr></th>
<th class='w-pri'><?php echo $lang->priAB;?></th>
<th><?php echo $lang->testcase->title;?></th>
<th class='w-type'><?php echo $lang->testcase->type;?></th>
<th class='w-user'><?php echo $lang->openedByAB;?></th>
<th class='w-status'><?php echo $lang->statusAB;?></th>
</tr>
</thead>
<tbody>
<?php foreach($cases as $case):?>
<tr class='a-center'>
<td class='a-left'>
<input type='checkbox' name='cases[]' value='<?php echo $case->id;?>' />
<?php echo html::a($this->createLink('testcase', 'view', "testcaseID=$case->id"), sprintf('%03d', $case->id));?>
</td>
<td class='a-center'><?php echo html::select("versions[$case->id]", array_combine(range($case->version, 1), range($case->version, 1)), '', 'class=select-1');?> </td>
<td><span class='<?php echo 'pri' . $case->pri?>'><?php echo $case->pri?></span></td>
<td class='a-left'>
<?php
echo $case->title . ' ( ';
for($i = $case->version; $i >= 1; $i --)
{
echo html::a($this->createLink('testcase', 'view', "caseID=$case->id&version=$i"), "#$i", '_blank');
}
echo ')';
?>
</td>
<td><?php echo $lang->testcase->typeList[$case->type];?></td>
<td><?php echo $users[$case->openedBy];?></td>
<td><?php echo $lang->testcase->statusList[$case->status];?></td>
</tr>
</tbody>
<?php endforeach;?>
<tfoot>
<tr>
<td colspan='7'>
<?php if($cases):?>
<div class='f-left'><?php echo html::selectAll() . html::selectReverse() . html::submitButton();?></div>
<?php endif;?>
<div class='f-right'><?php $pager->show();?></div>
</td>
</tr>
</tfoot>
</table>
</form>
<script type='text/javascript'>ajaxGetSearchForm();</script>
<?php include '../../common/view/footer.html.php';?>
+52 -52
View File
@@ -1,52 +1,52 @@
<?php
/**
* The resutls view file of testtask of ZenTaoPMS.
*
* @copyright Copyright 2009-2013 青岛易软天创网络科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package testtask
* @version $Id$
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.lite.html.php';?>
<h1>CASE#<?php echo $case->id. $lang->colon . $case->title;?></h1>
<fieldset>
<legend><?php echo $lang->testcase->precondition;?></legend>
<?php echo $case->precondition;?>
</fieldset>
<?php foreach($results as $result):?>
<table class='table-1'>
<caption>
<div class='f-left'>RESULT#<?php echo $result->id . ' ' . $result->date . ' ' . $users[$result->lastRunner] . ' ' . $lang->testtask->runCase . ':'. " <span class='$result->caseResult'>" . $lang->testcase->resultList[$result->caseResult] . '</span>';?></div>
<?php if(isset($build)):?><div class='f-right'><?php echo $lang->testtask->build . $lang->colon . $build;?></div><?php endif;?>
</caption>
<tr>
<th class='w-30px'><?php echo $lang->testcase->stepID;?></th>
<th class='w-p40'><?php echo $lang->testcase->stepDesc;?></th>
<th class='w-p20'><?php echo $lang->testcase->stepExpect;?></th>
<th><?php echo $lang->testcase->result;?></th>
<th class='w-p20'><?php echo $lang->testcase->real;?></th>
</tr>
<?php
$i = 1;
foreach($result->stepResults as $key => $stepResult):
?>
<tr>
<th><?php echo $i;?></th>
<td><?php echo nl2br($stepResult['desc']);?></td>
<td><?php echo nl2br($stepResult['expect']);?></td>
<?php if(!empty($result->stepResults)):?>
<td class='<?php echo $stepResult['result'];?> a-center'><?php echo $lang->testcase->resultList[$stepResult['result']];?></td>
<td><?php echo $stepResult['real'];?></td>
</tr>
<?php else:?>
<td></td>
<td></td>
</tr>
<?php endif; $i++;?>
<?php endforeach;?>
</table>
<?php endforeach;?>
</div>
<?php
/**
* The resutls view file of testtask of ZenTaoPMS.
*
* @copyright Copyright 2009-2013 青岛易软天创网络科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package testtask
* @version $Id$
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.lite.html.php';?>
<h1>CASE#<?php echo $case->id. $lang->colon . $case->title;?></h1>
<fieldset>
<legend><?php echo $lang->testcase->precondition;?></legend>
<?php echo $case->precondition;?>
</fieldset>
<?php foreach($results as $result):?>
<table class='table-1'>
<caption>
<div class='f-left'>RESULT#<?php echo $result->id . ' ' . $result->date . ' ' . $users[$result->lastRunner] . ' ' . $lang->testtask->runCase . ':'. " <span class='$result->caseResult'>" . $lang->testcase->resultList[$result->caseResult] . '</span>';?></div>
<?php if(isset($build)):?><div class='f-right'><?php echo $lang->testtask->build . $lang->colon . $build;?></div><?php endif;?>
</caption>
<tr>
<th class='w-30px'><?php echo $lang->testcase->stepID;?></th>
<th class='w-p40'><?php echo $lang->testcase->stepDesc;?></th>
<th class='w-p20'><?php echo $lang->testcase->stepExpect;?></th>
<th><?php echo $lang->testcase->result;?></th>
<th class='w-p20'><?php echo $lang->testcase->real;?></th>
</tr>
<?php
$i = 1;
foreach($result->stepResults as $key => $stepResult):
?>
<tr>
<th><?php echo $i;?></th>
<td><?php echo nl2br($stepResult['desc']);?></td>
<td><?php echo nl2br($stepResult['expect']);?></td>
<?php if(!empty($result->stepResults)):?>
<td class='<?php echo $stepResult['result'];?> a-center'><?php echo $lang->testcase->resultList[$stepResult['result']];?></td>
<td><?php echo $stepResult['real'];?></td>
</tr>
<?php else:?>
<td></td>
<td></td>
</tr>
<?php endif; $i++;?>
<?php endforeach;?>
</table>
<?php endforeach;?>
</div>
+60 -60
View File
@@ -1,60 +1,60 @@
<?php
/**
* The runrun view file of testtask of ZenTaoPMS.
*
* @copyright Copyright 2009-2013 青岛易软天创网络科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package testtask
* @version $Id$
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.lite.html.php';?>
<form method='post'>
<table class='table-1'>
<caption class='caption-tl'>CASE#<?php echo $run->case->id. $lang->colon . $run->case->title;?></caption>
<tr>
<td colspan='5'><h5><?php echo $lang->testcase->precondition;?></h5><?php echo $run->case->precondition;?></td>
</tr>
<tr class='colhead'>
<th class='w-30px'><?php echo $lang->testcase->stepID;?></th>
<th class='w-p40'><?php echo $lang->testcase->stepDesc;?></th>
<th class='w-p20'><?php echo $lang->testcase->stepExpect;?></th>
<th class='w-100px'><?php echo $lang->testcase->result;?></th>
<th><?php echo $lang->testcase->real;?></th>
</tr>
<?php foreach($run->case->steps as $key => $step):?>
<?php $defaultResult = $step->expect ? 'pass' : 'n/a';?>
<tr>
<th><?php echo $key + 1;?></th>
<td><?php echo nl2br($step->desc);?></td>
<td><?php echo nl2br($step->expect);?></td>
<td class='a-center'><?php echo html::select("steps[$step->id]", $lang->testcase->resultList, $defaultResult);?></td>
<td><?php echo html::textarea("reals[$step->id]", '', "rows=3 class='area-1'");?></td>
</tr>
<?php endforeach;?>
<tr class='a-center'>
<td colspan='5'>
<?php
if(empty($run->case->steps))
{
echo html::submitButton($lang->testtask->pass, "onclick=$('#result').val('pass')");
echo html::submitButton($lang->testtask->fail, "onclick=$('#result').val('fail')");
}
else
{
echo html::submitButton();
echo html::submitButton($lang->testtask->passAll, "onclick=$('#passall').val(1)");
}
echo html::hidden('case', $run->case->id);
echo html::hidden('version', $run->case->version);
if($run->case->steps) echo html::hidden('passall', 0);
if($nextCase) echo html::linkButton($lang->testtask->next, inlink('runCase', "runID={$nextCase['runID']}&caseID={$nextCase['caseID']}&version={$nextCase['version']}"));
if(!$run->case->steps) echo html::hidden('result', '');
?>
</td>
</tr>
</table>
</form>
<?php include '../../common/view/footer.lite.html.php';?>
<?php
/**
* The runrun view file of testtask of ZenTaoPMS.
*
* @copyright Copyright 2009-2013 青岛易软天创网络科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package testtask
* @version $Id$
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.lite.html.php';?>
<form method='post'>
<table class='table-1'>
<caption class='caption-tl'>CASE#<?php echo $run->case->id. $lang->colon . $run->case->title;?></caption>
<tr>
<td colspan='5'><h5><?php echo $lang->testcase->precondition;?></h5><?php echo $run->case->precondition;?></td>
</tr>
<tr class='colhead'>
<th class='w-30px'><?php echo $lang->testcase->stepID;?></th>
<th class='w-p40'><?php echo $lang->testcase->stepDesc;?></th>
<th class='w-p20'><?php echo $lang->testcase->stepExpect;?></th>
<th class='w-100px'><?php echo $lang->testcase->result;?></th>
<th><?php echo $lang->testcase->real;?></th>
</tr>
<?php foreach($run->case->steps as $key => $step):?>
<?php $defaultResult = $step->expect ? 'pass' : 'n/a';?>
<tr>
<th><?php echo $key + 1;?></th>
<td><?php echo nl2br($step->desc);?></td>
<td><?php echo nl2br($step->expect);?></td>
<td class='a-center'><?php echo html::select("steps[$step->id]", $lang->testcase->resultList, $defaultResult);?></td>
<td><?php echo html::textarea("reals[$step->id]", '', "rows=3 class='area-1'");?></td>
</tr>
<?php endforeach;?>
<tr class='a-center'>
<td colspan='5'>
<?php
if(empty($run->case->steps))
{
echo html::submitButton($lang->testtask->pass, "onclick=$('#result').val('pass')");
echo html::submitButton($lang->testtask->fail, "onclick=$('#result').val('fail')");
}
else
{
echo html::submitButton();
echo html::submitButton($lang->testtask->passAll, "onclick=$('#passall').val(1)");
}
echo html::hidden('case', $run->case->id);
echo html::hidden('version', $run->case->version);
if($run->case->steps) echo html::hidden('passall', 0);
if($nextCase) echo html::linkButton($lang->testtask->next, inlink('runCase', "runID={$nextCase['runID']}&caseID={$nextCase['caseID']}&version={$nextCase['version']}"));
if(!$run->case->steps) echo html::hidden('result', '');
?>
</td>
</tr>
</table>
</form>
<?php include '../../common/view/footer.lite.html.php';?>
+39 -39
View File
@@ -1,39 +1,39 @@
<?php
/**
* The mail file of testtask module of ZenTaoPMS.
*
* @copyright Copyright 2009-2013 青岛易软天创网络科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package bug
* @version $Id: sendmail.html.php 3717 2012-12-10 00:37:07Z zhujinyonging@gmail.com $
* @link http://www.zentao.net
*/
?>
<table width='98%' align='center'>
<tr class='header'>
<td>
TESTTASK #<?php echo $testtask->id . "=>$testtask->owner " . html::a(common::getSysURL() . $this->createLink('testtask', 'view', "testtaskID=$testtask->id"), $testtask->name);?>
</td>
</tr>
<tr>
<td>
<fieldset>
<legend><?php echo $lang->testtask->desc;?></legend>
<div class='content'>
<?php
if(strpos($testtask->desc, 'src="data/upload'))
{
$testtask->desc = str_replace('<img src="', '<img src="http://' . $this->server->http_host . $this->config->webRoot, $testtask->desc);
$testtask->desc = str_replace('<img alt="" src="', '<img src="http://' . $this->server->http_host . $this->config->webRoot, $testtask->desc);
}
echo $testtask->desc;
?>
</div>
</fieldset>
</td>
</tr>
<tr>
<td><?php include '../../common/view/mail.html.php';?></td>
</tr>
</table>
<?php
/**
* The mail file of testtask module of ZenTaoPMS.
*
* @copyright Copyright 2009-2013 青岛易软天创网络科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package bug
* @version $Id: sendmail.html.php 3717 2012-12-10 00:37:07Z zhujinyonging@gmail.com $
* @link http://www.zentao.net
*/
?>
<table width='98%' align='center'>
<tr class='header'>
<td>
TESTTASK #<?php echo $testtask->id . "=>$testtask->owner " . html::a(common::getSysURL() . $this->createLink('testtask', 'view', "testtaskID=$testtask->id"), $testtask->name);?>
</td>
</tr>
<tr>
<td>
<fieldset>
<legend><?php echo $lang->testtask->desc;?></legend>
<div class='content'>
<?php
if(strpos($testtask->desc, 'src="data/upload'))
{
$testtask->desc = str_replace('<img src="', '<img src="http://' . $this->server->http_host . $this->config->webRoot, $testtask->desc);
$testtask->desc = str_replace('<img alt="" src="', '<img src="http://' . $this->server->http_host . $this->config->webRoot, $testtask->desc);
}
echo $testtask->desc;
?>
</div>
</fieldset>
</td>
</tr>
<tr>
<td><?php include '../../common/view/mail.html.php';?></td>
</tr>
</table>
+70 -70
View File
@@ -1,70 +1,70 @@
<?php
/**
* The view file of case module of ZenTaoPMS.
*
* @copyright Copyright 2009-2013 青岛易软天创网络科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package case
* @version $Id$
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/tablesorter.html.php';?>
<table class='table-1'>
<caption <?php if($task->deleted) echo "class='deleted'";?>>TASK #<?php echo $task->id . ' ' . $task->name;?></caption>
<tr>
<th class='rowhead'><?php echo $lang->testtask->name;?></th>
<td><?php echo $task->name;?>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testtask->project;?></th>
<td><?php echo $task->projectName;?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testtask->build;?></th>
<td><?php $task->buildName ? print($task->buildName) : print($task->build);?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testtask->owner;?></th>
<td><?php echo $users[$task->owner];?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testtask->pri;?></th>
<td><?php echo $task->pri;?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testtask->begin;?></th>
<td><?php echo $task->begin;?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testtask->end;?></th>
<td><?php echo $task->end;?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testtask->status;?></th>
<td><?php echo $lang->testtask->statusList[$task->status];?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testtask->desc;?></th>
<td class='content'><?php echo $task->desc;?></td>
</tr>
</table>
<div class='a-center f-16px strong'>
<?php
$browseLink = $this->session->testtaskList ? $this->session->testtaskList : $this->createLink('testtask', 'browse', "productID=$task->product");
if(!$task->deleted)
{
common::printIcon('testtask', 'cases', "taskID=$task->id");
common::printIcon('testtask', 'linkCase', "taskID=$task->id");
common::printDivider();
common::printIcon('testtask', 'edit', "taskID=$task->id");
common::printIcon('testtask', 'delete', "taskID=$task->id", '', 'button', '', 'hiddenwin');
}
common::printRPN($browseLink);
?>
</div>
<?php include '../../common/view/action.html.php';?>
<?php include '../../common/view/footer.html.php';?>
<?php
/**
* The view file of case module of ZenTaoPMS.
*
* @copyright Copyright 2009-2013 青岛易软天创网络科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package case
* @version $Id$
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/tablesorter.html.php';?>
<table class='table-1'>
<caption <?php if($task->deleted) echo "class='deleted'";?>>TASK #<?php echo $task->id . ' ' . $task->name;?></caption>
<tr>
<th class='rowhead'><?php echo $lang->testtask->name;?></th>
<td><?php echo $task->name;?>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testtask->project;?></th>
<td><?php echo $task->projectName;?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testtask->build;?></th>
<td><?php $task->buildName ? print($task->buildName) : print($task->build);?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testtask->owner;?></th>
<td><?php echo $users[$task->owner];?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testtask->pri;?></th>
<td><?php echo $task->pri;?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testtask->begin;?></th>
<td><?php echo $task->begin;?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testtask->end;?></th>
<td><?php echo $task->end;?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testtask->status;?></th>
<td><?php echo $lang->testtask->statusList[$task->status];?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->testtask->desc;?></th>
<td class='content'><?php echo $task->desc;?></td>
</tr>
</table>
<div class='a-center f-16px strong'>
<?php
$browseLink = $this->session->testtaskList ? $this->session->testtaskList : $this->createLink('testtask', 'browse', "productID=$task->product");
if(!$task->deleted)
{
common::printIcon('testtask', 'cases', "taskID=$task->id");
common::printIcon('testtask', 'linkCase', "taskID=$task->id");
common::printDivider();
common::printIcon('testtask', 'edit', "taskID=$task->id");
common::printIcon('testtask', 'delete', "taskID=$task->id", '', 'button', '', 'hiddenwin');
}
common::printRPN($browseLink);
?>
</div>
<?php include '../../common/view/action.html.php';?>
<?php include '../../common/view/footer.html.php';?>