* @author Martin Havlat <*****@*****.**> * * * @internal revisions * @since 1.9.10 * **/ require '../../config.inc.php'; require_once 'common.php'; require_once 'reports.class.php'; testlinkInitPage($db, true, false, "checkRights"); $smarty = new TLSmarty(); $templateCfg = templateConfiguration(); $args = init_args(); $gui = initializeGui($db, $args); $reports_mgr = new tlReports($db, $gui->tplan_id); // ----------------------------------------------------------------------------- // Do some checks to understand if reports make sense // Check if there are linked test cases to the choosen test plan. $tc4tp_count = 1; //$reports_mgr->get_count_testcase4testplan(); tLog('TC in TP count = ' . $tc4tp_count); if ($tc4tp_count == 0) { // Test plan without test cases $gui->do_report['status_ok'] = 0; $gui->do_report['msg'] = lang_get('report_tplan_has_no_tcases'); } // Build qty $build_count = 1; //$reports_mgr->get_count_builds(); tLog('Active Builds count = ' . $build_count);
require '../../config.inc.php'; require_once 'common.php'; require_once 'reports.class.php'; testlinkInitPage($db); $templateCfg = templateConfiguration(); $tproject_mgr = new testproject($db); $args = init_args($tproject_mgr); checkRights($db, $_SESSION['currentUser'], $args); $gui = new stdClass(); $gui->workframe = $_SESSION['basehref'] . "lib/general/staticPage.php?key=showMetrics"; $gui->do_report = array('status_ok' => 1, 'msg' => ''); $gui->tplan_id = $args->tplan_id; $gui->tproject_id = $args->tproject_id; $gui->checked_show_inactive_tplans = $args->checked_show_inactive_tplans; $btsEnabled = config_get('interface_bugs') != 'NO'; $reports_mgr = new tlReports($db, $gui->tplan_id); // ----------------------------------------------------------------------------- // Do some checks to understand if reports make sense // Check if there are linked test cases to the choosen test plan. $tc4tp_count = $reports_mgr->get_count_testcase4testplan(); tLog('TC in TP count = ' . $tc4tp_count); if ($tc4tp_count == 0) { // Test plan without test cases $gui->do_report['status_ok'] = 0; $gui->do_report['msg'] = lang_get('report_tplan_has_no_tcases'); } // Build qty $build_count = $reports_mgr->get_count_builds(); tLog('Active Builds count = ' . $build_count); if ($build_count == 0) { // Test plan without builds can have execution data