/** * processTestCase * */ function processTestCase(&$dbHandler, &$argsObj, &$guiObj) { $tproject_mgr = new testproject($dbHandler); $guiObj->arrReqSpec = $tproject_mgr->genComboReqSpec($argsObj->tproject_id, 'dotted', " "); $SRS_qty = count($guiObj->arrReqSpec); if ($SRS_qty > 0) { $tc_mgr = new testcase($dbHandler); $arrTc = $tc_mgr->get_by_id($argsObj->id); if ($arrTc) { $guiObj->tcTitle = $arrTc[0]['name']; // get first ReqSpec if not defined if (is_null($argsObj->idReqSpec)) { reset($guiObj->arrReqSpec); $argsObj->idReqSpec = key($guiObj->arrReqSpec); } if ($argsObj->idReqSpec) { $req_spec_mgr = new requirement_spec_mgr($dbHandler); $guiObj->arrAssignedReq = $req_spec_mgr->get_requirements($argsObj->idReqSpec, 'assigned', $argsObj->id); if (!is_null($guiObj->arrAssignedReq)) { $xc = $req_spec_mgr->getAssignedCoverage($argsObj->idReqSpec); $l2d = count($guiObj->arrAssignedReq); for ($xdx = 0; $xdx < $l2d; $xdx++) { $guiObj->arrAssignedReq[$xdx]['coverageAuthor'] = $xc[$guiObj->arrAssignedReq[$xdx]['id']]['login']; $guiObj->arrAssignedReq[$xdx]['coverageTS'] = $xc[$guiObj->arrAssignedReq[$xdx]['id']]['creation_ts']; } } $guiObj->arrAllReq = $req_spec_mgr->get_requirements($argsObj->idReqSpec); $guiObj->arrUnassignedReq = array_diff_byId($guiObj->arrAllReq, $guiObj->arrAssignedReq); } } } return $guiObj; }
/** * processTestCase * */ function processTestCase(&$dbHandler, &$argsObj, &$guiObj) { $tproject_mgr = new testproject($dbHandler); // $guiObj->arrReqSpec = $tproject_mgr->getOptionReqSpec($argsObj->tproject_id,testproject::GET_NOT_EMPTY_REQSPEC); $guiObj->arrReqSpec = $tproject_mgr->genComboReqSpec($argsObj->tproject_id); $SRS_qty = count($guiObj->arrReqSpec); if ($SRS_qty > 0) { $tc_mgr = new testcase($dbHandler); $arrTc = $tc_mgr->get_by_id($argsObj->id); if ($arrTc) { $guiObj->tcTitle = $arrTc[0]['name']; // get first ReqSpec if not defined if (is_null($argsObj->idReqSpec)) { reset($guiObj->arrReqSpec); $argsObj->idReqSpec = key($guiObj->arrReqSpec); } if ($argsObj->idReqSpec) { $req_spec_mgr = new requirement_spec_mgr($dbHandler); $guiObj->arrAssignedReq = $req_spec_mgr->get_requirements($argsObj->idReqSpec, 'assigned', $argsObj->id); $guiObj->arrAllReq = $req_spec_mgr->get_requirements($argsObj->idReqSpec); $guiObj->arrUnassignedReq = array_diff_byId($guiObj->arrAllReq, $guiObj->arrAssignedReq); } } } return $guiObj; }