testlink界面优化_TestLink 增加在执行用例界面的历史相关bug功能

//blew function is added by hengleiwang 2013/3/21

/*Add this function to list all of them bugs that have been related to this testcases*/

function exec_get_testcase_related_bugs(&$db,&$bug_interface,$tcversionSet)

{

$bugs= null;

$bugs=get_bugs_for_testcase($db,$bug_interface,$tcversionSet);return$bugs;

}

$gui->case_related_bug = exec_get_testcase_related_bugs($db,$g_bugInterface,$gui->tcversionSet);if (count($gui->case_related_bug) == 0)

{

$gui->case_related_bug = null;

}

inc_exec_controls.tpl

{*input the code here for test cases related bugs;*---by henrywang}

{* Execution Bugs (if any) *}

{if isset($gui->case_related_bug)}

关联到这个用例的缺陷
{*BUGID 3587*}

{includefile="inc_show_bug_table_without_del.tpl"

bugs_map=$gui->case_related_bug

}

{*end the input*------by henrywang}

inc_show_bug_table_without_del.tpl

{*TestlinkOpen Source Project - http://testlink.sourceforge.net/$Id: inc_show_bug_table.tpl,v1.10 2010/07/09 11:41:15 mx-julian Exp$

rev :20100709 - Julian - show greyed delete icon if delete is notallowed20070304 - franciscom - added single quotes on bug_id ondeleteBug_onClick() call

message improvement

added titleon delete image.*}

{* -------------------------------------------------------------------------------------- *}

{* Manage missing arguments *}

{if!isset($tableClassName) }

{assignvar="tableClassName" value="simple"}

{/if}

{if!isset($tableStyles) }

{assignvar="tableStyles" value="font-size:12px"}

{/if}

{* -------------------------------------------------------------------------------------- *}

{lang_get s='build'}{lang_get s='caption_bugtable'} 
{$bug_elem.build_name|escape}{$bug_elem.link_to_bts}

exec.inc.php/** get bugs for the testcase

* added by hengleiwang 2013/3/21*/

function get_bugs_for_testcase($db,&$bug_interface,$tcversionSet)

{

$tables['execution_bugs'] = DB_TABLE_PREFIX . 'execution_bugs';

$tables['executions'] = DB_TABLE_PREFIX . 'executions';

$tables['builds'] = DB_TABLE_PREFIX . 'builds';

$bug_list=array();

$sql= "SELECT bug_id,builds.name ASbuild_name " .

"FROM {$tables['execution_bugs']}, {$tables['executions']} executions, " .

" {$tables['builds']} builds ".

"WHERE executions.tcversion_id ={$tcversionSet} " .

"AND execution_id=executions.id " .

"AND executions.build_id=builds.id " .

"ORDER BYbuilds.name,bug_id";

$map= $db->get_recordset($sql);// BUGID 3440 - added is_object() check

if( !is_null($map) &&is_object($bug_interface))

{

foreach($mapas$elem)

{

$bug_list[$elem['bug_id']]['link_to_bts'] = $bug_interface->buildViewBugLink($elem['bug_id'],GET_BUG_SUMMARY);

$bug_list[$elem['bug_id']]['build_name'] = $elem['build_name'];

}

}return($bug_list);

}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值