1.搭建BugFree3.0.3
https://github.com/taobao/BugFree
2.部署TeskLink1.9.16
https://github.com/TestLinkOpenSourceTRMS/testlink-code
3.登录后,BugFree问题追踪系统创建
名称:bugfree
类型:bugzilla(Interface: db)
设置:(填写bugfree数据库信息和查询接口信息)
<!-- Template bugzilladbInterface -->
<issuetracker>
<dbhost>TestTools-BugFree-mysql-1</dbhost>
<dbname>bugfree</dbname>
<dbschema>bugfree</dbschema>
<dbtype>mysql</dbtype>
<dbuser>root</dbuser>
<dbpassword>xxxxxxx</dbpassword>
<uricreate>http://bugfree.s-test.landi.com</uricreate>
<uriview>http://bugfree.s-test.landi.com/Bug.php?BugID=</uriview>
</issuetracker>
保存
4.进入容器修改class文件
/opt/bitnami/testlink/lib/issuetrackerintegration/bugzilladbInterface.class.php
第一处:
$sql = " SELECT bug_id AS id,short_desc AS summary,bug_status AS status" .
" FROM " . ( !is_null($this->cfg->dbschema) ? " {$this->cfg->dbschema}.bugs " : 'bugs') .
" WHERE bug_id = '{$id}' ";
修改为:
$sql = " SELECT id AS id,title AS summary,bug_status AS status" .
" FROM " . ( !is_null($this->cfg->dbschema) ? " {$this->cfg->dbschema}.bf_bug_info " : 'bf_bug_info') .
" WHERE id = '{$id}' ";
第二处:
$this->defaultResolvedStatus[] = array('code' => 'RESOLVED', 'verbose' => 'RESOLVED');
$this->defaultResolvedStatus[] = array('code' => 'VERIFIED', 'verbose' => 'VERIFIED');
$this->defaultResolvedStatus[] = array('code' => 'CLOSED', 'verbose' => 'CLOSED');
修改为:
$this->defaultResolvedStatus[] = array('code' => 'Resolved', 'verbose' => 'RESOLVED');
$this->defaultResolvedStatus[] = array('code' => 'Active', 'verbose' => 'VERIFIED');
$this->defaultResolvedStatus[] = array('code' => 'Closed', 'verbose' => 'CLOSED');