function bug_technician_box($name = 'assigned_to', $group_id, $checked = 'xyxy', $text_100 = 'None') { /* Returns a select box populated with the bug_techs that are defined for this project */ if (!$group_id) { return 'ERROR - no group_id'; } else { $result = bug_data_get_technicians($group_id); return html_build_select_box($result, $name, $checked, true, $text_100); } }
} //if bug_group selected, add to where clause if ($_bug_group && $_bug_group != 100) { $bug_group_str = "AND bug.bug_group_id='{$_bug_group}' "; } else { //no bug_group was chosen, so don't add it to where clause $bug_group_str = ''; } //build page title to make bookmarking easier //if a user was selected, add the user_name to the title //same for status bug_header(array('title' => 'Browse Bugs' . ($_assigned_to ? ' For: ' . user_getname($_assigned_to) : '') . ($_status && $_status != 100 ? ' By Status: ' . bug_data_get_status_name($_status) : ''))); /* creating a custom technician box which includes "any" and "unassigned" */ $res_tech = bug_data_get_technicians($group_id); $tech_id_arr = util_result_column_to_array($res_tech, 0); $tech_id_arr[] = '0'; //this will be the 'any' row $tech_name_arr = util_result_column_to_array($res_tech, 1); $tech_name_arr[] = 'Any'; $tech_box = html_build_select_box_from_arrays($tech_id_arr, $tech_name_arr, '_assigned_to', $_assigned_to, true, 'Unassigned'); /* Show the new pop-up boxes to select assigned to and/or status */ echo '<FORM ACTION="' . $PHP_SELF . '" METHOD="GET"> <INPUT TYPE="HIDDEN" NAME="group_id" VALUE="' . $group_id . '"> <INPUT TYPE="HIDDEN" NAME="set" VALUE="custom"> <H2>Browse Bug Requests by</H2> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="6"> <TR><TD><b>Assigned User:</b></TD><TD><b>Status:</b></TD><TD><b>Category:</b></TD><TD><b>Group:</b></TD></TR>