Page 1 of 1

How to customize the test report with active builds only?

PostPosted: Wed Dec 06, 2017 1:33 pm
by tbn83
Hello everybody,

I use Testlink 1.9.16 to validate several softwares. I created some builds for each versions. For example :
- for version V1.0 :
1st build --> V1.0.1
2nd build --> V1.0.2
3rd build --> V1.0.3

- for version V2.0 :
1st build --> V2.0.1
2nd build --> V2.0.2
3rd build --> V2.0.3
4th buil --> V2.0.4

I finished to validate the first version, so in "Build management" I deactivated all builds of this first version.
After that, I validate the 2nd version and I want to generate the Test report (HTML or Word format) for only the active builds! Actually, even if the builds of version V1.0 are inactive, when I generate the Test report, we have the results for all builds (Version V1.0 AND V2.0)!!
However, in "Build management" we have this information : "Active / inactive - defines whether the build can used. Incative builds are not listed on the execution and reports pages" --> I don't understand that the results for incative builds are in the test report.

So my question is : How to custom the test report with only active builds?

Thank you for your help

Re: How to customize the test report with active builds only

PostPosted: Thu Jan 11, 2018 11:01 am
by tbn83
With the latest code from github (1.9.17), I searched and found the file which has been modified to have only the results of active builds in your test report.
This file is :

If you want, we can insert one line of code, in red below :

$linkedItem = $tplan_mgr->getLinkInfo($tplan_id,$id,$platform_id);

$sql = " SELECT AS execution_id, E.status, E.execution_ts, E.tester_id," .
" E.notes, E.build_id, E.tcversion_id,E.tcversion_number,E.testplan_id," .
" E.execution_type, E.execution_duration, " .
" AS build_name " .
" FROM {$tables['executions']} E " .
" JOIN {$tables['builds']} B ON = E.build_id " .
" WHERE 1 = 1 ";

//Bugfix to show only active builds in Test Report view
$sql .= "AND = 1";

$sql .= " AND" . intval($context['exec_id']);