1<?php 2# --------------------------------------------------------------------- 3# rth is a requirement, test, and bugtracking system 4# Copyright (C) 2005 George Holbrook - rth@lists.sourceforge.net 5# This program is distributed under the terms and conditions of the GPL 6# See the README and LICENSE files for details 7#---------------------------------------------------------------------- 8# --------------------------------------------------------------------- 9# Test Workflow Page 10# 11# $RCSfile: test_workflow_page.php,v $ $Revision: 1.8 $ 12# --------------------------------------------------------------------- 13 14 15if( isset($_POST['submit_button']) ) { 16 17 require_once("test_workflow_group_action.php"); 18 exit; 19} 20 21include"./api/include_api.php"; 22auth_authenticate_user(); 23 24$page = basename(__FILE__); 25$num = 0; 26$bg_color = ''; 27$project_properties = session_get_project_properties(); 28$project_name = $project_properties['project_name']; 29$project_id = $project_properties['project_id']; 30 31$s_display_options = session_set_display_options("test_workflow", $_POST); 32$order_by = $s_display_options['order_by']; 33$order_dir = $s_display_options['order_dir']; 34$page_number = $s_display_options['page_number']; 35$filter_per_page = $s_display_options['filter']['per_page']; 36$filter_manual_auto = $s_display_options['filter']['manual_auto']; 37$filter_test_type = $s_display_options['filter']['test_type']; 38$filter_ba_owner = $s_display_options['filter']['ba_owner']; 39$filter_qa_owner = $s_display_options['filter']['qa_owner']; 40$filter_tester = $s_display_options['filter']['tester']; 41$filter_area_tested = $s_display_options['filter']['area_tested']; 42$filter_test_status = $s_display_options['filter']['test_status']; 43$filter_priority = $s_display_options['filter']['priority']; 44$filter_test_search = $s_display_options['filter']['test_search']; 45 46html_window_title(); 47html_print_body(); 48html_page_title($project_name ." - TESTS WORKFLOW"); 49html_page_header($db, $project_name); 50html_print_menu(); 51 52test_menu_print($page); 53 54error_report_check( $_GET ); 55 56print"<br>". NEWLINE; 57 58print"<form method=post action=$page id='form_order'>". NEWLINE; 59 60print"<div align=center>". NEWLINE; 61 62html_print_tests_filter( $project_id, 63 $filter_manual_auto, 64 $filter_test_type, 65 $filter_ba_owner, 66 $filter_qa_owner, 67 $filter_tester, 68 $filter_area_tested, 69 $filter_test_status, 70 $filter_priority, 71 $filter_per_page, 72 $filter_test_search); 73 74print"<br>". NEWLINE; 75 76 77$g_timer->mark_time( "Load rows to display on page from db into memory" ); 78 79$row = test_workflow_filter_rows( $project_id, 80 $filter_manual_auto, 81 $filter_test_type, 82 $filter_ba_owner, 83 $filter_qa_owner, 84 $filter_tester, 85 $filter_area_tested, 86 $filter_test_status, 87 $filter_priority, 88 $filter_per_page, 89 $filter_test_search, 90 $order_by, 91 $order_dir, 92 $page_number, 93 $csv_name="test_workflow" ); 94 95if( $row ) { 96 97 $g_timer->mark_time( "Finished load rows to display on page from db into memory" ); 98 99 $page_count = ceil($num / $filter_per_page ); 100 101 #print"<table id='sortabletable' class='sortable' rules=cols>". NEWLINE; 102 print"<table class='sortable' rules=cols>". NEWLINE; 103 print"<thead>".NEWLINE; 104 print"<tr class=tbl_header>". NEWLINE; 105 106 html_tbl_print_sortable_header( lang_get('test_id'), TEST_ID, $order_by, $order_dir ); 107 html_tbl_print_sortable_header( lang_get('man_auto') ); 108 html_tbl_print_sortable_header( lang_get('test_name'), TEST_NAME, $order_by, $order_dir ); 109 html_tbl_print_sortable_header( lang_get('test_status'), TEST_STATUS, $order_by, $order_dir ); 110 html_tbl_print_sortable_header( lang_get('priority'), TEST_PRIORITY, $order_by, $order_dir ); 111 html_tbl_print_sortable_header( lang_get('ba_owner'), TEST_BA_OWNER, $order_by, $order_dir ); 112 html_tbl_print_sortable_header( lang_get('qa_owner'), TEST_QA_OWNER, $order_by, $order_dir ); 113 html_tbl_print_sortable_header( lang_get('tester'), TEST_TESTER, $order_by, $order_dir ); 114 html_tbl_print_sortable_header( lang_get('date_assigned'), TEST_DATE_ASSIGNED, $order_by, $order_dir ); 115 html_tbl_print_sortable_header( lang_get('date_expected'), TEST_DATE_EXPECTED, $order_by, $order_dir ); 116 html_tbl_print_sortable_header( lang_get('date_complete'), TEST_DATE_COMPLETE, $order_by, $order_dir ); 117 html_tbl_print_sortable_header( lang_get('ba_signoff_date'), TEST_BA_SIGNOFF, $order_by, $order_dir ); 118 html_tbl_print_sortable_header( lang_get('info'), TEST_COMMENTS, $order_by, $order_dir ); 119 120 #html_tbl_print_header( lang_get('test_id') ); 121 #html_tbl_print_header_not_sortable( lang_get('man_auto') ); 122 #html_tbl_print_header( lang_get('test_name') ); 123 #html_tbl_print_header( lang_get('test_status') ); 124 #html_tbl_print_header( lang_get('priority') ); 125 #html_tbl_print_header( lang_get('ba_owner') ); 126 #html_tbl_print_header( lang_get('qa_owner') ); 127 #html_tbl_print_header( lang_get('tester') ); 128 #html_tbl_print_header( lang_get('date_assigned') ); 129 #html_tbl_print_header( lang_get('date_expected') ); 130 #html_tbl_print_header( lang_get('date_complete') ); 131 #html_tbl_print_header( lang_get('ba_signoff_date') ); 132 #html_tbl_print_header_not_sortable( lang_get('info') ); 133 print"</tr>". NEWLINE; 134 135 print"</thead>".NEWLINE; 136 print"<tbody>".NEWLINE; 137 $row_style = ''; 138 139 $g_timer->mark_time( "Outputting main html table to browser" ); 140 141 foreach( $row as $test_wf ) { 142 143 $test_id = util_pad_id($test_wf[TEST_ID]); 144 $test_name = $test_wf[TEST_NAME]; 145 $ba_owner = $test_wf[TEST_BA_OWNER]; 146 $qa_owner = $test_wf[TEST_QA_OWNER]; 147 $tester = $test_wf[TEST_TESTER]; 148 $test_status = $test_wf[TEST_STATUS]; 149 $test_priority = $test_wf[TEST_PRIORITY]; 150 $manual = $test_wf[TEST_MANUAL]; 151 $automated = $test_wf[TEST_AUTOMATED]; 152 $autopass = $test_wf[TEST_AUTO_PASS]; 153 $date_assigned = $test_wf[TEST_DATE_ASSIGNED]; 154 $date_expected = $test_wf[TEST_DATE_EXPECTED]; 155 $date_complete = $test_wf[TEST_DATE_COMPLETE]; 156 $ba_signoff = $test_wf[TEST_BA_SIGNOFF]; 157 $comments = $test_wf[TEST_COMMENTS]; 158 $priority = $test_wf[TEST_PRIORITY]; 159 160 if ("Y" == $test_wf[TEST_AUTO_PASS] ) 161 $autopass = "Yes". NEWLINE; 162 else 163 $autopass = "No". NEWLINE; 164 165 $filename = test_get_filename ($test_id ) ; 166 167 $row_style = html_tbl_alternate_bgcolor( $row_style ); 168 print"<tr class='$row_style'>". NEWLINE; 169 print"<td class='tbl-c'><a href='test_detail_page.php?test_id=$test_id&project_id=$project_id'>$test_id</a></td>". NEWLINE; 170 print"<td class='tbl-l'>".html_print_testtype_icon( $manual, $automated)."</td>". NEWLINE; 171 print"<td class='tbl-l'>$test_name</td>". NEWLINE; 172 print"<td class='tbl-l'>$test_status</td>". NEWLINE; 173 print"<td class='tbl-l'>$test_priority</td>". NEWLINE; 174 print"<td class='tbl-l'>$ba_owner</td>". NEWLINE; 175 print"<td class='tbl-l'>$qa_owner</td>". NEWLINE; 176 print"<td class='tbl-l'>$tester</td>". NEWLINE; 177 print"<td class='tbl-l'>$date_assigned</td>". NEWLINE; 178 print"<td class='tbl-l'>$date_expected</td>". NEWLINE; 179 print"<td class='tbl-l'>$date_complete</td>". NEWLINE; 180 print"<td class='tbl-l'>$ba_signoff</td>". NEWLINE; 181 print"<td class='tbl-l'>". NEWLINE; 182 if($comments) { 183 print "<img src='". IMG_SRC . "/info.gif' title='" . $comments . "'>". NEWLINE; 184 } 185 else { 186 print ' '; 187 } 188 print"</td>". NEWLINE; 189 print"</tr>". NEWLINE; 190 191 } 192 $g_timer->mark_time( "Finished outputting main html table to browser" ); 193 print"</tbody>".NEWLINE; 194 print"</table>". NEWLINE; 195} else { 196 197 html_no_records_found_message( lang_get('no_tests') ); 198} 199 200print"</div>". NEWLINE; 201print"</form>"; 202 203html_print_footer(); 204 205# --------------------------------------------------------------------- 206# $Log: test_workflow_page.php,v $ 207# Revision 1.8 2008/08/04 06:54:58 peter_thal 208# added sorting function to several tables 209# 210# Revision 1.7 2008/07/09 07:13:26 peter_thal 211# added direct linking of test detail by adding project_id link parameter 212# added automated project switching if necessary 213# 214# Revision 1.6 2008/01/22 07:53:56 cryobean 215# made the table sortable 216# 217# Revision 1.5 2007/02/03 10:26:19 gth2 218# no message 219# 220# Revision 1.4 2006/08/05 22:09:13 gth2 221# adding NEWLINE constant to support multiple OS newline chars - gth 222# 223# Revision 1.3 2006/02/24 11:36:04 gth2 224# update to div - class=div-c not working in firefox - gth 225# 226# Revision 1.2 2006/01/16 13:27:45 gth2 227# adding excel integration - gth 228# 229# Revision 1.1.1.1 2005/11/30 23:00:58 gth2 230# importing initial version - gth 231# 232# --------------------------------------------------------------------- 233 234?> 235