if (session_records_ischecked("test_req_assoc", $req_id)) { $checked = "checked"; } else { $checked = ""; } # Build list of records if (empty($records)) { $records = $req_id . " => ''"; } else { $records .= ", " . $req_id . " => ''"; } # Rows print "<tr class='{$row_style}'>" . NEWLINE; print "<td><input type='checkbox' name='row_{$req_id}' {$checked}></td>"; print "<td><input type=text name={$pc_covered_input_name} size=3 maxlength=3 value='{$percent_covered}'></td>"; print "<td>" . util_pad_id($row_requirement[REQ_ID]) . "</td>" . NEWLINE; print "<td class='tbl-l'>" . $row_requirement[REQ_FILENAME] . "</td>" . NEWLINE; print "<td class='tbl-l'>" . $row_requirement[REQ_VERS_DETAIL] . "</td>" . NEWLINE; print "<td class='tbl-l'>" . $row_requirement[REQ_DOC_TYPE_NAME] . "</td>" . NEWLINE; print "<td class='tbl-l'>" . $row_requirement[REQ_VERS_STATUS] . "</td>" . NEWLINE; print "<td class='tbl-l'>" . $row_requirement[REQ_AREA_COVERAGE] . "</td>" . NEWLINE; print "<td class='tbl-l'>"; foreach ($rows_functions as $key => $value) { print $value . "<br>"; } print "</td>" . NEWLINE; print "<td class='tbl-l'>" . $row_requirement[REQ_LOCKED_BY] . "</td>" . NEWLINE; print "<td class='tbl-l'>" . $row_requirement[REQ_LOCKED_DATE] . "</td>" . NEWLINE; print "</tr>" . NEWLINE; } print "</table>" . NEWLINE;
error_report_check($_GET); if ($locked) { print "<h3 class='hint'> <img src='images/locked.png' alt='locked'> Testset locked</h3>" . NEWLINE; } $row_test_detail = test_get_detail($test_id); if (!empty($row_test_detail)) { //results_print_test_detail_table( $row_test_detail ); print "<table class=width100 rules=cols>"; print "<tr class='tbl_header'>"; html_tbl_print_header(lang_get('test_id')); html_tbl_print_header(lang_get('test_name')); html_tbl_print_header(lang_get('ba_owner')); html_tbl_print_header(lang_get('qa_owner')); html_tbl_print_header(lang_get('area_tested')); print "</tr>"; $test_id = util_pad_id($row_test_detail[TEST_ID]); $test_name = $row_test_detail[TEST_NAME]; $ba_owner = $row_test_detail[TEST_BA_OWNER]; $qa_owner = $row_test_detail[TEST_QA_OWNER]; $area_tested = $row_test_detail[TEST_AREA_TESTED]; print "<tr>"; print "<td class='tbl-c'><a href='test_detail_page.php?test_id={$test_id}&project_id={$project_id}'>{$test_id}</a></td>"; print "<td class='tbl-c'>{$test_name}</td>"; print "<td class='tbl-c'>{$ba_owner}</td>"; print "<td class='tbl-c'>{$qa_owner}</td>"; print "<td class='tbl-c'>{$area_tested}</td>"; print "</tr>"; print "</table>"; print "<br><br>"; } $rows_test_runs = results_get_test_run_by_test($test_id, $testset_id);
$req_id = $row_requirement[REQ_ID]; $req_name = $row_requirement[REQ_FILENAME]; if (empty($records)) { $records = $row_requirement[REQ_ID] . " => ''"; } else { $records .= ", " . $row_requirement[REQ_ID] . " => ''"; } $row_style = html_tbl_alternate_bgcolor($row_style); # Rows print "<tr class='{$row_style}'>" . NEWLINE; if (session_records_ischecked("requirements_notification", $req_id)) { print "<td><input type=checkbox name=row_{$req_id} value='' checked></td>" . NEWLINE; } else { print "<td><input type=checkbox name=row_{$req_id} value=''></td>" . NEWLINE; } print "<td class='tbl-1'>" . util_pad_id($req_id) . "</td>" . NEWLINE; print "<td class='tbl-l'>{$req_name}</td>" . NEWLINE; print "</tr>" . NEWLINE; } print "</table>" . NEWLINE; print "</div>" . NEWLINE; print "<div align=center>" . NEWLINE; print "<table class=hide60>" . NEWLINE; print "<tr>" . NEWLINE; print "<td align=left>" . NEWLINE; if (session_use_javascript()) { print "<input id=select_all type=checkbox name=thispage onClick='checkAll( this )'>" . NEWLINE; print "<label for=select_all>" . lang_get("select_all") . "</label>"; print " " . NEWLINE; } print "</td>" . NEWLINE;
print "</td>" . NEWLINE; print "</tr>" . NEWLINE; # PRIORITY print "<tr>" . NEWLINE; print "<td class=form-lbl-r nowrap>" . lang_get('req_priority') . "</td>" . NEWLINE; print "<td class=form-data-l>" . NEWLINE; print "<select name=req_priority size=1>" . NEWLINE; $list_box = requirement_get_priority(); html_print_list_box_from_array($list_box, session_validate_form_get_field('req_priority', $req_priority)); print "</select>" . NEWLINE; print "</td>" . NEWLINE; print "</tr>" . NEWLINE; # CHANGE REQUEST # Set the field to an empty string if the value of the defect id = 0 if ($req_defect_id != 0) { $req_defect_id = util_pad_id($req_defect_id); } else { $req_defect_id = ''; } $defect_id = session_validate_form_get_field('defect_id'); print "<tr>" . NEWLINE; print "<td class=form-lbl-r nowrap>" . lang_get('req_defect_id') . "</td>" . NEWLINE; print "<td class=form-data-l>"; print "<input type='text' size='10' name='defect_id' value='" . session_validate_form_get_field('defect_id', $req_defect_id) . "'></td>" . NEWLINE; print "</tr>" . NEWLINE; # AREA COVERED print "<tr>" . NEWLINE; print "<td class=form-lbl-r nowrap>" . lang_get('req_area') . "</td>" . NEWLINE; print "<td class=form-data-l>" . NEWLINE; print "<select name=req_area size=1>" . NEWLINE; $list_box = array();
html_print_menu(); print "<br>" . NEWLINE; print "<div align=center>\n" . NEWLINE; print "<form method=post action={$action_page}>" . NEWLINE; error_report_check($_GET); if (!empty($verification_detail)) { $action = $verification_detail[VERIFY_RESULTS_ACTION]; $expected = $verification_detail[VERIFY_RESULTS_EXPECTED_RESULT]; $actual = $verification_detail[VERIFY_RESULTS_ACTUAL_RESULT]; $status = $verification_detail[VERIFY_RESULTS_TEST_STATUS]; $comments = $verification_detail[VERIFY_RESULTS_COMMENT]; $current_bug_id = $verification_detail[VERIFY_RESULTS_DEFECT_ID]; if ($current_bug_id == 0) { $padded_bug_id = ''; } else { $padded_bug_id = util_pad_id($current_bug_id); } print "<table class=width70>" . NEWLINE; print "<tr>" . NEWLINE; print "<td>" . NEWLINE; print "<table class=inner rules=none border=0>" . NEWLINE; print "<tr>" . NEWLINE; print "<td class=form-header-l colspan=2>" . lang_get('update_verification') . "</td>" . NEWLINE; print "</tr>" . NEWLINE; util_add_spacer(); # TEST NAME print "<tr>" . NEWLINE; print "<td class=form-lbl-r>" . lang_get('test_name') . "</td>" . NEWLINE; print "<td class=left>{$test_name}</td>" . NEWLINE; print "</tr>" . NEWLINE; util_add_spacer();
$checked = "checked"; } else { $checked = ""; } # Build list of records if (empty($records)) { $records = $req_id . " => ''"; } else { $records .= ", " . $req_id . " => ''"; } $row_style = html_tbl_alternate_bgcolor($row_style); $rows_functions = requirement_get_functionality($project_id, $row_requirement[REQ_ID]); # Rows print "<tr class='{$row_style}'>" . NEWLINE; print "<td><input type='checkbox' name=row_{$req_id} {$checked}></td>"; print "<td><a href='requirement_detail_page.php?req_id={$req_id}&req_version_id={$req_version_id}'>" . util_pad_id($row_requirement[REQ_ID]) . "</a></td>" . NEWLINE; print "<td>" . html_file_type($row_requirement[REQ_VERS_FILENAME]) . "</td>" . NEWLINE; print "<td class='tbl-l'>" . $row_requirement[REQ_FILENAME] . "</td>" . NEWLINE; print "<td class='tbl-l'>" . $row_requirement[REQ_VERS_DETAIL] . "</td>" . NEWLINE; print "<td class='tbl-l'>" . $row_requirement[REQ_DOC_TYPE_NAME] . "</td>" . NEWLINE; print "<td class='tbl-l'>" . $row_requirement[REQ_VERS_STATUS] . "</td>" . NEWLINE; print "<td class='tbl-l'>" . $row_requirement[REQ_AREA_COVERAGE] . "</td>" . NEWLINE; print "<td class='tbl-l'>"; foreach ($rows_functions as $key => $value) { print $value . "<br>"; } print "</td>" . NEWLINE; print "<td class='tbl-l'>" . $row_requirement[REQ_LOCKED_BY] . "</td>" . NEWLINE; print "<td class='tbl-l'>" . $row_requirement[REQ_LOCKED_DATE] . "</td>" . NEWLINE; print "</tr>" . NEWLINE; }
# # $RCSfile: bug_close_page.php,v $ $Revision: 1.3 $ # ------------------------------------ $page = basename(__FILE__); $action_page = 'bug_close_action.php'; include "./api/include_api.php"; auth_authenticate_user(); $s_project_properties = session_get_project_properties(); $project_name = $s_project_properties['project_name']; $project_id = $s_project_properties['project_id']; $s_user_properties = session_get_user_properties(); $s_user_id = $s_user_properties['user_id']; $s_username = $s_user_properties['username']; $s_bug_details = session_set_properties("bug", $_GET); $bug_id = $s_bug_details['bug_id']; $padded_bug_id = util_pad_id($bug_id); html_window_title(); html_print_body(); html_page_title($project_name . " - " . lang_get('bug_close_page')); html_page_header($db, $project_name); html_print_menu(); bug_menu_print($page); print "<br>" . NEWLINE; error_report_check($_GET); $row = bug_get_detail($bug_id); $closed_reason_code = $row[BUG_CLOSED_REASON_CODE]; print "<div align=center>"; print "<span class='required'>*</span><span class='print'>" . lang_get('must_complete_field') . "</span><br>"; # ADD BUGNOTE TABLE print "<table class=width75>"; print "<tr>";
#html_tbl_print_header( lang_get('deleted'), USER_DELETED, $order_by, $order_dir, $page ); html_tbl_print_header(lang_get('id')); html_tbl_print_header(lang_get('username')); html_tbl_print_header(lang_get('first_name')); html_tbl_print_header(lang_get('last_name')); html_tbl_print_header(lang_get('email')); html_tbl_print_header(lang_get('deleted')); if (user_has_rights($project_id, $user_id, ADMIN)) { html_tbl_print_header_not_sortable(lang_get('edit')); html_tbl_print_header_not_sortable(lang_get('remove')); } print "</tr>" . NEWLINE; print "</thead>" . NEWLINE; print "<tbody>" . NEWLINE; foreach ($users as $user_row) { $row_user_id = util_pad_id($user_row[USER_ID]); $row_username = $user_row[USER_UNAME]; $row_first_name = $user_row[USER_FNAME]; $row_last_name = $user_row[USER_LNAME]; $row_user_email = $user_row[USER_EMAIL]; $user_deleted = $user_row[USER_DELETED]; #$row_style = html_tbl_alternate_bgcolor($row_style); #print"<tr class='$row_style'>". NEWLINE; print "<tr>" . NEWLINE; print "<td>{$row_user_id}</td>" . NEWLINE; if ($user_deleted == 'Y') { print "<td><del>{$row_username}</del></td>" . NEWLINE; } else { print "<td>{$row_username}</td>" . NEWLINE; } print "<td>{$row_first_name}</td>" . NEWLINE;
html_tbl_print_header(lang_get('window')); html_tbl_print_header(lang_get('object')); html_tbl_print_header(lang_get('policy_id')); html_tbl_print_header(lang_get('claim_id')); print "</tr>" . NEWLINE; foreach ($rows_failed_verifications as $row_failed_verification) { $row_style = html_tbl_alternate_bgcolor($row_style); print "<tr class='{$row_style}'>" . NEWLINE; print "<td><a href='{$show_verifications_page}?test_run_id=" . $row_failed_verification[VERIFY_RESULTS_TS_UNIQUE_RUN_ID] . "&release_id={$release_id}&build_id={$build_id}&testset_id={$testset_id}'>" . $row_failed_verification[VERIFY_RESULTS_TS_UNIQUE_RUN_ID] . "</a></td>" . NEWLINE; print "<td>" . $row_failed_verification[TEST_RESULTS_TEST_SUITE] . "</td>" . NEWLINE; print "<td>" . $row_failed_verification[VERIFY_RESULTS_ACTION] . "</td>" . NEWLINE; print "<td>" . $row_failed_verification[VERIFY_RESULTS_EXPECTED_RESULT] . "</td>" . NEWLINE; print "<td>" . $row_failed_verification[VERIFY_RESULTS_ACTUAL_RESULT] . "</td>" . NEWLINE; print results_verfication_status_icon($row_failed_verification[VERIFY_RESULTS_TEST_STATUS]); if ($row_failed_verification[VERIFY_RESULTS_DEFECT_ID] != 0) { $defect_id = util_pad_id($row_failed_verification[VERIFY_RESULTS_DEFECT_ID]); print "<td><a href='" . VIEW_BUG_URL . "?defect_id={$defect_id}&id={$defect_id}'>{$defect_id}</a></td>" . NEWLINE; print "<td>" . bug_get_field_value($defect_id, BUG_STATUS) . "</td>" . NEWLINE; } else { print "<td></td>" . NEWLINE; print "<td></td>" . NEWLINE; } //print"<td>". bug_get_field_value( $defect_id, BUG_STATUS ) ."</td>". NEWLINE; print "<td>" . $row_failed_verification[VERIFY_RESULTS_TIMESTAMP] . "</td>" . NEWLINE; print "<td>" . $row_failed_verification[TEST_RESULTS_OS] . "</td>" . NEWLINE; print "<td>" . $row_failed_verification[VERIFY_RESULTS_WINDOW] . "</td>" . NEWLINE; print "<td>" . $row_failed_verification[VERIFY_RESULTS_OBJ] . "</td>" . NEWLINE; print "<td>" . $row_failed_verification[VERIFY_RESULTS_SHOW_CUSTOM_1] . "</td>" . NEWLINE; print "<td>" . $row_failed_verification[VERIFY_RESULTS_SHOW_CUSTOM_2] . "</td>" . NEWLINE; print "</tr>" . NEWLINE; }
print "<td class=grid-data-l>{$assigned_to_developer}</td>" . NEWLINE; print "<td class=grid-header-r nowrap>" . lang_get('found_in_release') . "</td>" . NEWLINE; print "<td class=grid-data-l>{$found_in_release}</td>" . NEWLINE; print "</tr>" . NEWLINE; # DISCOVERY_PERIOD AND ASSIGN_TO_RELEASE print "<tr>" . NEWLINE; print "<td class=grid-header-r nowrap>" . lang_get('discovery_period') . "</td>" . NEWLINE; print "<td class=grid-data-l>{$discovery_period}</td>" . NEWLINE; print "<td class=grid-header-r nowrap>" . lang_get('assign_to_release') . "</td>" . NEWLINE; print "<td class=grid-data-l>{$assign_to_release}</td>" . NEWLINE; print "</tr>" . NEWLINE; # TEST_VERIFICATION_ID AND IMPLEMENTED_IN_RELEASE print "<tr>" . NEWLINE; print "<td class=grid-header-r nowrap>" . lang_get('test_verification_id') . "</td>" . NEWLINE; if (!empty($test_verify_id)) { $padded_verify_id = util_pad_id($test_verify_id); print "<td class=grid-data-l><a href='{$test_run_page}?bug_page=true&verify_id={$test_verify_id}'>{$padded_verify_id}</a></td>" . NEWLINE; } else { print "<td class=grid-data-l></td>" . NEWLINE; } print "<td class=grid-header-r nowrap>" . lang_get('implemented_in_release') . "</td>" . NEWLINE; print "<td class=grid-data-l>{$imp_in_release}</td>" . NEWLINE; print "</tr>" . NEWLINE; print "<tr>" . NEWLINE; print "<td class=grid-header-r>" . lang_get('bug_summary') . "</td>" . NEWLINE; print "<td class=grid-data-l colspan=3>{$summary}</td>" . NEWLINE; print "</tr>" . NEWLINE; print "<tr>" . NEWLINE; print "<td class=grid-header-r><br>" . lang_get('bug_description') . "<br><br></td>" . NEWLINE; print "<td class=grid-data-l colspan=3 valign=top><br>{$description}<br><br></td>" . NEWLINE; print "</tr>" . NEWLINE;
#---------------------------------------------------------------------- # --------------------------------------------------------------------- # Test Step Import Page # # $RCSfile: results_remote_execution_page.php,v $ # $Revision: 1.3 $ # --------------------------------------------------------------------- include "./api/include_api.php"; auth_authenticate_user(); $page = basename(__FILE__); $s_user_properties = session_get_user_properties(); $s_project_properties = session_get_project_properties(); $project_name = $s_project_properties['project_name']; $project_id = $s_project_properties['project_id']; $testset_id = $_GET['testset_id']; $testset_id = util_pad_id($testset_id); $testset_name = testset_get_name($testset_id); html_window_title(); html_print_body(); html_page_title($project_name . " - " . lang_get('remote_execution_page')); //html_page_header( $db, $project_name ); error_report_check($_GET); print "<br>"; print "<div align='center'>" . NEWLINE; print "<table class=width90 rules=cols>"; print "<tr class='tbl_header'>"; html_tbl_print_header(lang_get('testset_id')); html_tbl_print_header(lang_get('testset_name')); print "</tr>"; print "<tr>"; print "<td class='tbl-c'>{$testset_id}</a></td>";
$row_style = ''; $display_options = session_set_display_options("requirements", array_merge($_POST, $_GET)); $s_tab = $display_options['tab']; $s_properties = session_set_properties("requirements", $_GET); $s_req_id = $s_properties['req_id']; $s_discussion_id = $s_properties['discussion_id']; $project_manager = user_has_rights($project_id, $user_id, MANAGER); html_window_title(); html_print_body(); html_page_title($project_name . " - " . lang_get("req_discussion_page")); html_page_header($db, $project_name); html_print_menu(); requirement_menu_print($page); error_report_check($_GET); $row_discussion = discussion_get_detail($s_discussion_id); $req_id = util_pad_id($row_discussion[DISC_REQ_ID]); $discussion_author = $row_discussion[DISC_AUTHOR]; $discussion_date = $row_discussion[DISC_DATE]; $discussion_subject = $row_discussion[DISC_SUBJECT]; $discussion_status = $row_discussion[DISC_STATUS]; $discussion_discussion = util_html_encode_string($row_discussion[DISC_DISCUSSION]); $rows_requirement = requirement_get_detail($project_id, $req_id); $row_requirement = $rows_requirement[0]; $req_name = $row_requirement[REQ_FILENAME]; print "<br>" . NEWLINE; print "<div align=center>"; # REQUIREMENT DETAILS print "<table class=width100 rules=cols>" . NEWLINE; print "<tr>" . NEWLINE; html_tbl_print_header(lang_get('req_id')); html_tbl_print_header(lang_get('req_name'));
function bug_email($project_id, $bug_id, $recipients, $action) { # Don't send email if the preference it turned off in propterities_inc.php if (!SEND_EMAIL_NOTIFICATION) { return; } # Link to the bug detail page $generic_url = RTH_URL . "login.php?project_id={$project_id}&page=bug_detail_page.php&bug_id={$bug_id}"; $username = session_get_username(); $project_name = session_get_project_name(); $bug_id = util_pad_id($bug_id); $user_details = user_get_name_by_username($username); $first_name = $user_details[USER_FNAME]; $last_name = $user_details[USER_LNAME]; $row_bug = bug_get_detail($bug_id); $category = $row_bug[CATEGORY_NAME]; $bug_project_id = $row_bug[BUG_PROJECT_ID]; $component = $row_bug[COMPONENT_NAME]; $priority = $row_bug[BUG_PRIORITY]; $severity = $row_bug[BUG_SEVERITY]; $bug_status = $row_bug[BUG_STATUS]; $reporter = $row_bug[BUG_REPORTER]; $reported_date = $row_bug[BUG_REPORTED_DATE]; $assigned_to = $row_bug[BUG_ASSIGNED_TO]; $assigned_to_developer = $row_bug[BUG_ASSIGNED_TO_DEVELOPER]; $closed = $row_bug[BUG_CLOSED]; $closed_date = $row_bug[BUG_CLOSED_DATE]; $test_verify_id = $row_bug[BUG_TEST_VERIFY_ID]; $req_version_id = $row_bug[BUG_REQ_VERSION_ID]; $found_in_release = $row_bug[BUG_FOUND_IN_RELEASE]; $assign_to_release = $row_bug[BUG_ASSIGN_TO_RELEASE]; $imp_in_release = $row_bug[BUG_IMPLEMENTED_IN_RELEASE]; $discovery_period = $row_bug[BUG_DISCOVERY_PERIOD]; $summary = $row_bug[BUG_SUMMARY]; $description = $row_bug[BUG_DESCRIPTION]; $message = ""; # CREATE EMAIL SUBJECT AND MESSAGE switch ($action) { case "new_bug": $subject = "RTH: New defect entered for {$project_name} - ID: {$bug_id}"; $message = "A New Defect has been entered by {$first_name} {$last_name}\r" . NEWLINE; break; case "update_status": $subject = "RTH: Status of Bug in {$project_name} has changed to {$bug_status} - ID: {$bug_id}"; $message = "The status of bug has been changed to {$bug_status} by {$first_name} {$last_name}\n" . NEWLINE; break; case "add_bugnote": $subject = "RTH: A bugnote was added to a Bug in {$project_name} - ID: {$bug_id}"; $message = "A bugnote has been added by {$first_name} {$last_name}\n" . NEWLINE; break; case "assign_bug": $subject = "RTH: Bug in {$project_name} has been assigned - ID: {$bug_id}"; $message = "The bug has been assigned by {$first_name} {$last_name}\n" . NEWLINE; break; case "add_relationship": $subject = "RTH: New relationship created for bug in project: {$project_name} - ID: {$bug_id}"; $message = "A new relationship was created by {$first_name} {$last_name}\n" . NEWLINE; break; case "update_bug": $subject = "RTH: Bug in project: {$project_name} has been updated - ID: {$bug_id}"; $message = "Bug has been updated by {$first_name} {$last_name}\n" . NEWLINE; break; case "delete": $subject = "RTH: Bug Deleted in {$project_name}"; $message = "Bug {$req_name} has been deleted by {$first_name} {$last_name}\n" . NEWLINE; break; } # Generic link to requirement detail page if the $url variable has been set $message .= "Click the following link to view the Defect:\r" . NEWLINE; $message .= "{$generic_url}\r\n\r" . NEWLINE; $message .= lang_get('project_name') . ": {$project_name}\r" . NEWLINE; $message .= lang_get('bug_category') . ": {$category}\r" . NEWLINE; $message .= lang_get('bug_component') . ": {$component}\r" . NEWLINE; $message .= lang_get('bug_priority') . ": {$priority}\r" . NEWLINE; $message .= lang_get('bug_severity') . ": {$severity}\r" . NEWLINE; $message .= lang_get('bug_status') . ": {$bug_status}\r" . NEWLINE; $message .= lang_get('reported_by') . ": {$reporter}\r" . NEWLINE; $message .= lang_get('reported_date') . ": {$reported_date}\r" . NEWLINE; $message .= lang_get('assigned_to') . ": {$assigned_to}\r" . NEWLINE; $message .= lang_get('assigned_to_developer') . ": {$assigned_to_developer}\r" . NEWLINE; $message .= lang_get('found_in_release') . ": {$found_in_release}\r" . NEWLINE; $message .= lang_get('assigned_to_release') . ": {$assign_to_release}\r" . NEWLINE; $message .= lang_get('bug_summary') . ": {$summary}\r\n\r" . NEWLINE; $message .= lang_get('bug_description') . ": {$description}\r" . NEWLINE; # Convert any html entities stored in the DB back to characters. $message = util_unhtmlentities($message); email_send($recipients, $subject, $message); }
#html_tbl_print_header( lang_get('priority') ); #html_tbl_print_header( lang_get('ba_owner') ); #html_tbl_print_header( lang_get('qa_owner') ); #html_tbl_print_header( lang_get('tester') ); #html_tbl_print_header( lang_get('date_assigned') ); #html_tbl_print_header( lang_get('date_expected') ); #html_tbl_print_header( lang_get('date_complete') ); #html_tbl_print_header( lang_get('ba_signoff_date') ); #html_tbl_print_header_not_sortable( lang_get('info') ); print "</tr>" . NEWLINE; print "</thead>" . NEWLINE; print "<tbody>" . NEWLINE; $row_style = ''; $g_timer->mark_time("Outputting main html table to browser"); foreach ($row as $test_wf) { $test_id = util_pad_id($test_wf[TEST_ID]); $test_name = $test_wf[TEST_NAME]; $ba_owner = $test_wf[TEST_BA_OWNER]; $qa_owner = $test_wf[TEST_QA_OWNER]; $tester = $test_wf[TEST_TESTER]; $test_status = $test_wf[TEST_STATUS]; $test_priority = $test_wf[TEST_PRIORITY]; $manual = $test_wf[TEST_MANUAL]; $automated = $test_wf[TEST_AUTOMATED]; $autopass = $test_wf[TEST_AUTO_PASS]; $date_assigned = $test_wf[TEST_DATE_ASSIGNED]; $date_expected = $test_wf[TEST_DATE_EXPECTED]; $date_complete = $test_wf[TEST_DATE_COMPLETE]; $ba_signoff = $test_wf[TEST_BA_SIGNOFF]; $comments = $test_wf[TEST_COMMENTS]; $priority = $test_wf[TEST_PRIORITY];
print "<th class=grid-header-c>" . lang_get('req_id') . "</th>"; print "<th class=grid-header-c>" . lang_get('req_name') . "</th>"; print "<th class=grid-header-c>" . lang_get('percent_covered_test') . "</th>"; /*print"<th class=grid-header-c>"; print lang_get('edit') . ' ' .lang_get('percent_covered') . $test_name ; print"</th>";*/ if ($user_has_delete_rights) { print "<th class=grid-header-c>" . lang_get('delete') . "</th>"; } print "</tr>"; foreach ($associated_row as $row_associated_reqs) { $assoc_id = $row_associated_reqs[TEST_REQ_ASSOC_ID]; $req_id = $row_associated_reqs[REQ_ID]; $req_filename = $row_associated_reqs[REQ_FILENAME]; $req_assoc_covered = $row_associated_reqs[TEST_REQ_ASSOC_PERCENT_COVERED]; $req_id_link = util_pad_id($req_id); $row_style = html_tbl_alternate_bgcolor($row_style); print "<tr class='{$row_style}'>" . NEWLINE; print "<td class='tbl-c'><a href='requirement_detail_page.php?req_id={$req_id}&tab=2'>{$req_id_link}</a></td>"; print "<td class='tbl-l'>{$req_filename}</td>"; print "<td class='tbl-c'>{$req_assoc_covered}%</td>"; //print"<td class='tbl-c'><a href='test_req_edit_coverage_page.php?req_id=$req_id&tab=2'>" . lang_get('edit') ."</a></td>"; if ($user_has_delete_rights) { print "<td class='tbl-c'><a href='test_delete_assoc_action.php?assoc=req&assoc_id={$assoc_id}'>" . lang_get('delete') . "</a></td>"; } print "</tr>"; } print "</table>"; print "</td>"; print "</tr>"; print "</table>";
if (empty($req_test_relationships)) { $row_style = ROW2_STYLE; } else { $row_style = ROW1_STYLE; } print "<tr class='{$row_style}'>" . NEWLINE; print "<td valign=top width='5%'><a href='requirement_detail_page.php?req_id={$req_id}&req_version_id={$req_version_id}'>{$req_id}</a></td>" . NEWLINE; print "<td valign=top width='25%' class='tbl-l'>{$req_name}</td>" . NEWLINE; print "<td valign=top width='10%' class='tbl-c'>{$req_doc_type}</td>" . NEWLINE; # List all associated test cases for the requirement $coverage = 0; if (!empty($req_test_relationships)) { print "<td valign=top align=left>"; foreach ($req_test_relationships as $req_test_rels) { $test_id = $req_test_rels[TEST_ID]; $test_id_link = util_pad_id($test_id); $coverage += $req_test_rels[TEST_REQ_ASSOC_PERCENT_COVERED]; print "<a href='test_detail_page.php?test_id={$test_id}&project_id={$project_id}&tab=3'>{$test_id_link}</a>   "; } print "</td>"; $total_coverage += $coverage; } else { print "<td valign=top align=left>No tests</td>"; } print "<td valign=top width='5%' class='tbl-c'>{$coverage}</td>" . NEWLINE; print "</tr>" . NEWLINE; } print "</table>" . NEWLINE; print "</div>" . NEWLINE; # Print out some summary statistics print "<br>" . NEWLINE;
print "<tr class=tbl_header>" . NEWLINE; print "<th></th>"; html_tbl_print_sortable_header(lang_get('req_id'), REQ_ID, $order_by, $order_dir); html_tbl_print_sortable_header(lang_get('version'), REQ_VERS_VERSION, $order_by, $order_dir); html_tbl_print_sortable_header(""); html_tbl_print_sortable_header(lang_get('req_name'), REQ_FILENAME, $order_by, $order_dir); html_tbl_print_sortable_header(lang_get('req_detail'), REQ_VERS_DETAIL, $order_by, $order_dir); html_tbl_print_sortable_header(lang_get('req_type'), REQ_DOC_TYPE_NAME, $order_by, $order_dir); html_tbl_print_sortable_header(lang_get('status'), REQ_VERS_STATUS, $order_by, $order_dir); html_tbl_print_sortable_header(lang_get('req_area'), REQ_AREA_COVERAGE, $order_by, $order_dir); html_tbl_print_sortable_header(lang_get('functionality')); html_tbl_print_sortable_header(lang_get('req_locked_by'), REQ_LOCKED_BY, $order_by, $order_dir); html_tbl_print_sortable_header(lang_get('req_locked_date'), REQ_LOCKED_DATE, $order_by, $order_dir); print "</tr>" . NEWLINE; foreach ($rows_requirement as $row_requirement) { $req_id = util_pad_id($row_requirement[REQ_ID]); $req_name = $row_requirement[REQ_FILENAME]; $req_version_id = $row_requirement[REQ_VERS_UNIQUE_ID]; $req_version = $row_requirement[REQ_VERS_VERSION]; $req_version_filename = $row_requirement[REQ_VERS_FILENAME]; $req_version_detail = $row_requirement[REQ_VERS_DETAIL]; $req_doc_type = $row_requirement[REQ_DOC_TYPE_NAME]; $req_version_status = $row_requirement[REQ_VERS_STATUS]; $req_area_covered = $row_requirement[REQ_AREA_COVERAGE]; $req_locked_by = $row_requirement[REQ_LOCKED_BY]; $req_locked_date = $row_requirement[REQ_LOCKED_DATE]; $row_style = html_tbl_alternate_bgcolor($row_style); $rows_functions = requirement_get_functionality($project_id, $row_requirement[REQ_ID]); # Rows print "<tr class='{$row_style}'>" . NEWLINE; print "<td valign=top><input type='checkbox' name='row_req_arr[{$req_id}][{$req_version_id}]'></td>";
function requirement_email($project_id, $req_id, $recipients, $action, $discussion_id = null) { $display_generic_info = true; $display_generic_url = true; # Link to the req detail page $generic_url = RTH_URL . "login.php?project_id={$project_id}&page=requirement_detail_page.php&req_id={$req_id}"; $username = session_get_username(); $project_name = session_get_project_name(); $req_id = util_pad_id($req_id); $user_details = user_get_name_by_username($username); $first_name = $user_details[USER_FNAME]; $last_name = $user_details[USER_LNAME]; $rows_requirement = requirement_get_detail($project_id, $req_id); $row_requirement = $rows_requirement[0]; $req_version_id = $row_requirement[REQ_VERS_UNIQUE_ID]; $req_rec_or_file = $row_requirement[REQ_REC_FILE]; $req_name = $row_requirement[REQ_FILENAME]; $req_detail = $row_requirement[REQ_VERS_DETAIL]; $req_reason_for_change = $row_requirement[REQ_VERS_REASON_CHANGE]; $req_version_status = $row_requirement[REQ_VERS_STATUS]; $req_area_covered = $row_requirement[REQ_AREA_COVERAGE]; $req_doc_type = $row_requirement[REQ_DOC_TYPE_NAME]; $req_version = $row_requirement[REQ_VERS_VERSION]; # REQ FUNCTIONALITY $rows_functions = requirement_get_functionality($project_id, $req_id); $req_functionality = ""; foreach ($rows_functions as $function) { $req_functionality .= $function . ", "; } $req_functionality = trim($req_functionality, ", "); # CREATE EMAIL SUBJECT AND MESSAGE switch ($action) { case "updated": $subject = "RTH: Requirement Updated in {$project_name}"; $message = "Requirement {$req_name} has been updated by {$first_name} {$last_name}\n" . NEWLINE; break; case "new_version": $subject = "RTH: Requirement Updated in {$project_name}"; $message = "A new version of Requirement {$req_name} has been created by {$first_name} {$last_name}\n" . NEWLINE; break; case "delete": $display_generic_info = false; $display_generic_url = false; $url = RTH_URL . "login.php?project_id={$project_id}&page=requirement_page.php"; $subject = "RTH: Requirement Deleted in {$project_name}"; $message = "Requirement {$req_name} has been deleted by {$first_name} {$last_name}\n" . NEWLINE; $message .= "Click the following link to view Requirements in {$project_name}:" . NEWLINE; $message .= "{$url}\n" . NEWLINE; break; case "lock": $subject = "RTH: Requirement Locked in {$project_name}"; $message = "Requirement {$req_name} has been locked by {$first_name} {$last_name}\n" . NEWLINE; break; case "unlock": $subject = "RTH: Requirement Unlocked in {$project_name}"; $message = "Requirement {$req_name} has been unlocked by {$first_name} {$last_name}\n" . NEWLINE; break; case "edit_children": # Get requirement children //$rows_children = requirement_get_children($req_id); $generic_url .= "&tab=1"; $subject = "RTH: Requirement Updated in {$project_name}"; $message = "The children of Requirement {$req_name} have been edited by {$first_name} {$last_name}\n" . NEWLINE; break; case "edit_test_assoc": # Get related tests //$assoc_tests = requirement_get_test_relationships($req_id); $generic_url .= "&tab=2"; $subject = "RTH: Requirement Updated in {$project_name}"; $message = "The Tests related to Requirement {$req_name} have been edited by {$first_name} {$last_name}\n" . NEWLINE; break; case "edit_release_assoc": # Get related releases //requirement_get_assoc_releases($s_req_version_id) $generic_url .= "&tab=4"; $subject = "RTH: Requirement Updated in {$project_name}"; $message = "The Releases related to Requirement {$req_name} have been edited by {$first_name} {$last_name}\n" . NEWLINE; break; case "new_discussion": # GET LAST DISCUSSION $rows_discussion = discussion_get($req_id); foreach ($rows_discussion as $row_discussion) { $discussion_subject = $row_discussion[DISC_SUBJECT]; } $generic_url .= "&tab=3"; $subject = "RTH: New Requirement Discussion in {$project_name}"; $message = "A new discussion has been added to Requirement {$req_name} by {$first_name} {$last_name}\n" . NEWLINE; $message .= "" . lang_get("subject") . ": {$discussion_subject}\n" . NEWLINE; break; case "new_post": # GET DISCUSSION $row_discussion = discussion_get_detail($discussion_id); $discussion_subject = $row_discussion[DISC_SUBJECT]; $url = RTH_URL . "login.php?project_id={$project_id}&page=requirement_discussion_page.php&discussion_id={$discussion_id}"; $subject = "RTH: Discussion {$discussion_subject} in {$project_name}"; $message = "A new post has been added to Discussion {$discussion_subject} by {$first_name} {$last_name}\n" . NEWLINE; $message .= "Click the following link to view the discussion:\n" . NEWLINE; $message .= "{$url}\n" . NEWLINE; break; case "close_discussion": $display_generic_info = false; $display_generic_url = false; # GET DISCUSSION $row_discussion = discussion_get_detail($discussion_id); $discussion_subject = $row_discussion[DISC_SUBJECT]; $url = RTH_URL . "login.php?project_id={$project_id}&page=requirement_discussion_page.php&discussion_id={$discussion_id}"; $subject = "RTH: Discussion {$discussion_subject} in {$project_name}"; $message = "Discussion {$discussion_subject} has been closed by {$first_name} {$last_name}\n" . NEWLINE; $message .= "Click the following link to view the discussion:" . NEWLINE; $message .= "{$url}\n" . NEWLINE; break; } # Generic link to requirement detail page if the $url variable has been set if ($display_generic_url) { $message .= "Click the following link to view the Requirement:" . NEWLINE; $message .= "{$generic_url}\n" . NEWLINE; } if ($display_generic_info) { $message .= "" . lang_get("project_name") . ": {$project_name}" . NEWLINE; $message .= "" . lang_get("req_id") . ": {$req_id}" . NEWLINE; $message .= "" . lang_get("req_version") . ": {$req_version}" . NEWLINE; $message .= "" . lang_get("req_name") . ": {$req_name}" . NEWLINE; $message .= "" . lang_get("req_detail") . ": {$req_detail}" . NEWLINE; $message .= "" . lang_get("req_status") . ": {$req_version_status}" . NEWLINE; $message .= "" . lang_get("req_area_covered") . ": {$req_area_covered}" . NEWLINE; $message .= "" . lang_get("req_functionality") . ": {$req_functionality}" . NEWLINE; $message .= "" . lang_get("req_doc_type") . ": {$req_doc_type}\n" . NEWLINE; } # Convert any html entities stored in the DB back to characters. $message = util_unhtmlentities($message); email_send($recipients, $subject, $message); }
# See the README and LICENSE files for details #---------------------------------------------------------------------- # --------------------------------------------------------------------- # Requirement Version History Page # # $RCSfile: test_doc_history_page.php,v $ $Revision: 1.6 $ # --------------------------------------------------------------------- include "./api/include_api.php"; auth_authenticate_user(); $page = basename(__FILE__); $s_project_properties = session_get_project_properties(); $s_project_id = $s_project_properties['project_id']; $s_project_name = $s_project_properties['project_name']; $test_id = $_GET['test_id']; $manual_test_id = $_GET['mantestid']; $display_test_id = util_pad_id($test_id); $test_name = test_get_name($test_id); $s_user_properties = session_get_user_properties(); $s_delete_rights = $s_user_properties['delete_rights']; $s_user_id = $s_user_properties['user_id']; $project_manager = user_has_rights($s_project_id, $s_user_id, MANAGER); $user_has_delete_rights = $s_delete_rights === "Y" || $project_manager; $message = lang_get('delete_confirm_suppdoc'); $row_style = ''; html_window_title(); html_print_body(); html_page_title($s_project_name . " - " . lang_get('test_doc_history_page')); html_page_header($db, $s_project_name); html_print_menu(); #### Change to api submenu function for this page type #### test_menu_print($page);
print "<table rules=cols class=width80>" . NEWLINE; print "<tr>"; html_tbl_print_header(lang_get('req_id')); html_tbl_print_header(lang_get('req_version')); html_tbl_print_header(lang_get('req_name')); html_tbl_print_header(lang_get('last_updated_by')); html_tbl_print_header(lang_get('last_updated')); print "</tr>"; foreach ($rows_reqs as $rows_req) { $req_id = $rows_req[REQ_ID]; $req_version_id = $rows_req[REQ_VERS_UNIQUE_ID]; $req_name = $rows_req[REQ_FILENAME]; $req_last_updated = $rows_req[REQ_VERS_LAST_UPDATED]; $req_last_updated_by = $rows_req[REQ_VERS_LAST_UPDATED_BY]; $req_version = $rows_req[REQ_VERS_VERSION]; $display_req_id = util_pad_id($req_id); $row_style = html_tbl_alternate_bgcolor($row_style); print "<tr class={$row_style}>" . NEWLINE; print "<td><a href='{$req_detail_page}?req_id={$req_id}&req_version_id={$req_version_id}'>{$display_req_id}</a></td>" . NEWLINE; print "<td>{$req_version}</td>" . NEWLINE; print "<td>{$req_name}</td>" . NEWLINE; print "<td>{$req_last_updated_by}</td>" . NEWLINE; print "<td>{$req_last_updated}</td>" . NEWLINE; print "</tr>" . NEWLINE; } print "</table>" . NEWLINE; } else { print lang_get('no_requirements_in_project'); } print "</div>"; html_print_footer();
$page = basename(__FILE__); $s_user_properties = session_get_user_properties(); $s_project_properties = session_get_project_properties(); $s_show_options = session_get_show_options(); $s_test_details = session_set_properties("test", $_GET); $s_user_id = $s_user_properties['user_id']; $s_username = $s_user_properties['username']; $s_tempest_admin = $s_user_properties['tempest_admin']; $s_project_rights = $s_user_properties['project_rights']; $s_delete_rights = $s_user_properties['delete_rights']; $s_email = $s_user_properties['email']; $project_name = $s_project_properties['project_name']; $project_id = $s_project_properties['project_id']; $project_details = project_get_details($project_id); $s_show_test_input = $project_details[PROJ_SHOW_TEST_INPUT]; $test_id = util_pad_id($s_test_details['test_id']); $test_version_id = $s_test_details['test_version_id']; $redirect_page = "test_detail_page.php?test_id={$test_id}&project_id={$project_id}&tab=1"; # Upload function if (IMPORT_EXPORT_TO_EXCEL) { test_import_excel($test_id, 'upload_file'); } else { test_import_csv($test_id, 'upload_file'); } html_print_operation_successful('test_import_csv_page', $redirect_page); # --------------------------------------------------------------------- # $Log: test_step_import_csv_action.php,v $ # Revision 1.4 2008/07/17 13:54:12 peter_thal # added new feature: test sets status (overview) # +fixed some bugs with project_id parameter in testdetail_page references #
$tbl_user_first = $row_user_detail[USER_FNAME]; $tbl_user_last = $row_user_detail[USER_LNAME]; $tbl_username = $row_user_detail[USER_UNAME]; $tbl_user_email = $row_user_detail[USER_EMAIL]; $tbl_user_phone = $row_user_detail[USER_PHONE]; $tbl_user_delete_rights = $row_user_detail[PROJ_USER_DELETE_RIGHTS]; $tbl_user_email_testset = $row_user_detail[PROJ_USER_EMAIL_TESTSET]; $tbl_user_email_discussions = $row_user_detail[PROJ_USER_EMAIL_REQ_DISCUSSION]; $tbl_user_qa_owner = $row_user_detail[PROJ_USER_QA_OWNER]; $tbl_user_ba_owner = $row_user_detail[PROJ_USER_BA_OWNER]; $tbl_user_rights = $row_user_detail[PROJ_USER_PROJECT_RIGHTS]; $tbl_user_rights = user_get_rights_string($tbl_user_rights); #$row_style = html_tbl_alternate_bgcolor($row_style); #print"<tr class='$row_style'>". NEWLINE; print "<tr>" . NEWLINE; print "<td>" . util_pad_id($tbl_user_id) . "</td>" . NEWLINE; print "<td>{$tbl_username}</td>" . NEWLINE; print "<td>{$tbl_user_first}</td>" . NEWLINE; print "<td>{$tbl_user_last}</td>" . NEWLINE; print "<td>{$tbl_user_email}</td>" . NEWLINE; print "<td>{$tbl_user_phone}</td>" . NEWLINE; print "<td>{$tbl_user_rights}</td>" . NEWLINE; print "<td>{$tbl_user_qa_owner}</td>" . NEWLINE; print "<td>{$tbl_user_ba_owner}</td>" . NEWLINE; if ($project_manager) { print "<td><a href='project_edit_user_page.php?user_id={$tbl_user_id}'>" . lang_get("edit") . "</a></td>" . NEWLINE; print "<td>" . NEWLINE; print "<form method=post action='{$delete_page}'>" . NEWLINE; print "<input type='submit' name='delete' value='" . lang_get('remove') . "' class='page-numbers'>" . NEWLINE; print "<input type='hidden' name='r_page' value='{$redirect_url}#users'>" . NEWLINE; print "<input type='hidden' name='f' value='remove_user_from_project'>" . NEWLINE;
$g_timer->mark_time("Outputting main html table to browser"); $row_style = ''; foreach ($row as $row_bug_detail) { $bug_id = $row_bug_detail[BUG_ID]; $priority = $row_bug_detail[BUG_PRIORITY]; $bug_status = $row_bug_detail[BUG_STATUS]; $category = $row_bug_detail[CATEGORY_NAME]; $component = $row_bug_detail[COMPONENT_NAME]; $reported_by = $row_bug_detail[BUG_REPORTER]; $reported_date = $row_bug_detail[BUG_REPORTED_DATE]; $assigned_to = $row_bug_detail[BUG_ASSIGNED_TO]; $found_in_release = $row_bug_detail[BUG_FOUND_IN_RELEASE]; $assign_to_release = $row_bug_detail[BUG_ASSIGN_TO_RELEASE]; $discovery_period = $row_bug_detail[BUG_DISCOVERY_PERIOD]; $summary = $row_bug_detail[BUG_SUMMARY]; $display_bug_id = util_pad_id($bug_id); #$filename = test_get_filename($bug_id); $row_style = html_tbl_alternate_bgcolor($row_style); print "<tr class='{$row_style}'>" . NEWLINE; print "<td><input type='checkbox' name='row_bug_arr[{$bug_id}]'></td>" . NEWLINE; print "<td class='tbl-c'><a href='{$bug_update_url}?bug_id={$bug_id}'><img src='" . IMG_SRC . "update.gif' title='" . lang_get('update_bug') . "' border=0></a></td>" . NEWLINE; //$detail_url = $detail_page ."?bug_id=". $bug_id ."&test_version_id=". $test_version_id; $detail_url = $detail_page . "?bug_id=" . $bug_id; print "<td class='tbl-c'><a href='{$detail_url}' title='" . lang_get('bug_view_detail') . "'>{$display_bug_id}</a></td>" . NEWLINE; print "<td class='tbl-c'>{$priority}</td>" . NEWLINE; print "<td class='tbl-c'>{$bug_status}</td>" . NEWLINE; print "<td class='tbl-c'>{$category}</td>" . NEWLINE; print "<td class='tbl-c'>{$reported_by}</td>" . NEWLINE; print "<td class='tbl-c'>{$assigned_to}</td>" . NEWLINE; #print"<td class='tbl-c'>$found_in_release</td>". NEWLINE; #print"<td class='tbl-c'>$assign_to_release</td>". NEWLINE;
#-------------------------------------------------------------------------- # Link to bug tracker. RTH or MANTIS #-------------------------------------------------------------------------- if (empty($defect_id)) { # display a link allowing users to create a defect print "<td class='tbl-c'><a href='" . REPORT_BUG_URL . "?test_run_id={$test_run_id}&verify_id={$vr_id}'"; /* Add this code if you want another bugtracker to open in a new window if( BUGTRACKER != 'rth' ) { print" target='new'"; } */ print ">" . lang_get('defect_link') . "</a></td>" . NEWLINE; # target='new' } else { # display a link to the defect id $padded_defect_id = util_pad_id($defect_id); //print"<td class='tbl-c'><a href='$view_defect_page?bug_id=$defect_id'>$padded_defect_id</a></td>". NEWLINE; #target='new' print "<td class='tbl-c'><a href='" . VIEW_BUG_URL . "?bug_id={$defect_id}&id={$defect_id}'"; /* Add this code if you want another bugtracker to open in a new window if( BUGTRACKER != 'rth' ) { print" target='new'"; } */ print ">{$padded_defect_id}</a></td>" . NEWLINE; #target='new' } if ($show_custom_1 == 'Y') { print "<td class='tbl-c'>{$custom_1}</td>" . NEWLINE; } if ($show_custom_2 == 'Y') { print "<td class='tbl-c'>{$custom_2}</td>" . NEWLINE;