function testset_email($project_id, $release_id, $build_id, $testset_id, $recipients, $action) { $display_generic_info = true; $display_generic_url = true; $generic_url = RTH_URL . "login.php?project_id={$project_id}&page=results_page.php&release_id={$release_id}&build_id={$build_id}&testset_id={$testset_id}"; $username = session_get_username(); $project_name = session_get_project_name(); $release_name = admin_get_release_name($release_id); $build_name = admin_get_build_name($build_id); $user_details = user_get_name_by_username($username); $first_name = $user_details[USER_FNAME]; $last_name = $user_details[USER_LNAME]; $testset_detail = testset_get_details_by_build($build_id, $testset_id); $testset_id = $testset_detail[TS_ID]; $testset_name = $testset_detail[TS_NAME]; $testset_date_created = $testset_detail[TS_DATE_CREATED]; $testset_description = $testset_detail[TS_DESCRIPTION]; # CREATE EMAIL SUBJECT AND MESSAGE switch ($action) { case "new_testset": $subject = "RTH: New TestSet for {$project_name}"; $message = "TestSet {$testset_name} has been created by {$first_name} {$last_name}" . NEWLINE . NEWLINE; break; } # Generic link to results page if the $generic_url variable has been set if ($display_generic_url) { $message .= "Click the following link to view results:" . NEWLINE . NEWLINE; $message .= "{$generic_url}" . NEWLINE . NEWLINE; $message .= "Please update automated scripts with TESTSETID={$testset_id}" . NEWLINE . NEWLINE; } if ($display_generic_info) { $message .= "" . lang_get("project_name") . ": {$project_name}" . NEWLINE; $message .= "" . lang_get("release") . ": {$release_name}" . NEWLINE; $message .= "" . lang_get("build") . ": {$build_name}" . NEWLINE; $message .= "" . lang_get("testset_name") . ": {$testset_name}" . NEWLINE; $message .= "" . lang_get("description") . ": {$testset_description}" . NEWLINE; $message .= NEWLINE . "If you do not wish to be notified of any new testsets created, please edit your User profile by navigating to the Users link in RTH."; } # Convert any html entities stored in the DB back to characters. $message = util_unhtmlentities($message); email_send($recipients, $subject, $message); }
print "<td class='form-lbl-r'>" . lang_get('description') . "</td>" . NEWLINE; print "<td class='form-data-l'><textarea name='testset_description' rows=5 cols=30 >" . session_validate_form_get_field("testset_description") . "</textarea></td>" . NEWLINE; print "</tr>" . NEWLINE; # SUBMIT BUTTON print "<tr>" . NEWLINE; print "<td colspan='2' class='form-data-c'><input type='submit' value='" . lang_get('add') . "'></td>" . NEWLINE; print "</tr>" . NEWLINE; print "</table>" . NEWLINE; print "</form>" . NEWLINE; print "</td>" . NEWLINE; print "</tr>" . NEWLINE; print "</table>" . NEWLINE; print "<br><br>" . NEWLINE; ################################################################################ # TESTSET TABLE $testset_details = testset_get_details_by_build($build_id, null, $order_by, $order_dir); if (!empty($testset_details)) { print "<table id='sortabletable' class='sortable' rules=cols>" . NEWLINE; print "<thead>" . NEWLINE; print "<tr>" . NEWLINE; html_tbl_print_header(lang_get('testset_name')); html_tbl_print_header_not_sortable(lang_get('edit_add_tests')); #html_tbl_print_header( lang_get('testset_date_received'), TS_DATE_CREATED, $order_by, $order_dir, $page ); html_tbl_print_header(lang_get('testset_date_received')); html_tbl_print_header(lang_get('description')); if (user_has_rights($project_id, $user_id, ADMIN)) { html_tbl_print_header_not_sortable(lang_get('copy')); } html_tbl_print_header_not_sortable(lang_get('edit')); html_tbl_print_header_not_sortable(lang_get('delete')); print "</tr>" . NEWLINE;