$type_labels = init_labels($req_cfg->type_labels); $status_labels = init_labels($req_cfg->status_labels); $labels2get = array('no' => 'No', 'yes' => 'Yes', 'not_aplicable' => null, 'req_spec_short' => null, 'title' => null, 'version' => null, 'th_coverage' => null, 'frozen' => null, 'type' => null, 'status' => null, 'th_relations' => null, 'requirements' => null, 'number_of_reqs' => null, 'number_of_versions' => null); $labels = init_labels($labels2get); $gui->cfields4req = (array) $cfield_mgr->get_linked_cfields_at_design($args->tproject_id, 1, null, 'requirement', null, 'name'); $version_option = $args->all_versions ? requirement_mgr::ALL_VERSIONS : requirement_mgr::LATEST_VERSION; // array to gather table data row per row $rows = array(); foreach ($gui->reqIDs as $id) { // now get the rest of information for this requirement $req = $req_mgr->get_by_id($id, $version_option); // coverage data $tc_coverage = count($req_mgr->get_coverage($id)); // number of relations, if feature is enabled if ($relations_enabled) { $relations = $req_mgr->count_relations($id); $relations = "<!-- " . sprintf("%010d", $relations) . " -->" . $relations; } // create the link to display $title = htmlentities($req[0]['req_doc_id'], ENT_QUOTES, $charset) . $glue_char . htmlentities($req[0]['title'], ENT_QUOTES, $charset); // add html comment with title for easier sorting $linked_title = '<!-- ' . $title . ' -->' . '<a href="javascript:openLinkedReqWindow(' . $id . ')">' . $title . '</a>'; // reqspec-"path" to requirement $path = $req_mgr->tree_mgr->get_path($req[0]['srs_id']); foreach ($path as $key => $p) { $path[$key] = $p['name']; } $path = htmlentities(implode("/", $path), ENT_QUOTES, $charset); foreach ($req as $version) { // get content for each row to display $result = array();