Go to the source code of this file.
Functions | |
| trackers_data_get_all_fields ($group_id=false, $reload=false) | |
| trackers_data_get_item_group ($item_id) | |
| & | trackers_data_get_notification_settings ($group_id, $tracker_name) |
| trackers_data_show_notification_settings ($group_id, $tracker_name, $show_intro_msg) | |
| trackers_data_post_notification_settings ($group_id, $tracker_name) | |
| trackers_data_get_item_notification_info ($item_id, $artifact, $updated) | |
| cmp_place ($ar1, $ar2) | |
| cmp_place_query ($ar1, $ar2) | |
| cmp_place_result ($ar1, $ar2) | |
| trackers_data_get_all_report_fields ($group_id=false, $report_id=100) | |
| trackers_data_get_field_predefined_values ($field, $group_id=false, $checked=false, $by_field_id=false, $active_only=true) | |
| trackers_data_use_field_predefined_values ($field, $group_id) | |
| trackers_data_is_custom ($field, $by_field_id=false) | |
| trackers_data_is_special ($field, $by_field_id=false) | |
| trackers_data_is_empty_ok ($field, $by_field_id=false) | |
| trackers_data_mandatory_flag ($field, $by_field_id=false) | |
| trackers_data_do_keep_history ($field, $by_field_id=false) | |
| trackers_data_is_required ($field, $by_field_id=false) | |
| trackers_data_is_used ($field, $by_field_id=false) | |
| trackers_data_is_showed_on_query ($field) | |
| trackers_data_is_showed_on_result ($field) | |
| trackers_data_is_showed_on_add ($field, $by_field_id=false) | |
| trackers_data_is_showed_on_add_nologin ($field, $by_field_id=false) | |
| trackers_data_is_showed_on_add_members ($field, $by_field_id=false) | |
| trackers_data_is_date_field ($field, $by_field_id=false) | |
| trackers_data_is_text_field ($field, $by_field_id=false) | |
| trackers_data_is_text_area ($field, $by_field_id=false) | |
| trackers_data_is_select_box ($field, $by_field_id=false) | |
| trackers_data_is_username_field ($field, $by_field_id=false) | |
| trackers_data_is_project_scope ($field, $by_field_id=false) | |
| trackers_data_is_status_closed ($status) | |
| trackers_data_get_field_name ($field_id) | |
| trackers_data_get_field_id ($field_name) | |
| trackers_data_get_group_id ($field, $by_field_id=false) | |
| trackers_data_get_label ($field, $by_field_id=false) | |
| trackers_data_get_description ($field, $by_field_id=false) | |
| trackers_data_get_display_type ($field, $by_field_id=false) | |
| trackers_data_get_display_type_in_clear ($field, $by_field_id=false) | |
| trackers_data_get_keep_history ($field, $by_field_id=false) | |
| trackers_data_get_place ($field, $by_field_id=false) | |
| trackers_data_get_scope ($field, $by_field_id=false) | |
| trackers_data_get_col_width ($field, $by_field_id=false) | |
| trackers_data_get_display_size ($field, $by_field_id=false) | |
| trackers_data_get_default_value ($field, $by_field_id=false) | |
| trackers_data_get_max_value_id ($field, $group_id, $by_field_id=false) | |
| trackers_data_get_cached_field_value ($field, $group_id, $value_id) | |
| trackers_data_get_field_value ($item_fv_id) | |
| trackers_data_is_default_value ($item_fv_id) | |
| trackers_data_create_value ($field, $group_id, $value, $description, $order_id, $status='A', $by_field_id=false) | |
| trackers_data_update_value ($item_fv_id, $field, $group_id, $value, $description, $order_id, $status='A') | |
| trackers_data_reset_usage ($field_name, $group_id) | |
| trackers_data_update_usage ($field_name, $group_id, $label, $description, $use_it, $rank, $display_size, $empty_ok, $keep_history, $show_on_add_members=0, $show_on_add=0, $transition_default_auth='A') | |
| trackers_data_get_technicians ($group_id) | |
| trackers_data_get_transition ($group_id) | |
| trackers_data_get_submitters ($group_id=false) | |
| trackers_data_get_items ($group_id=false, $artifact) | |
| trackers_data_get_dependent_items ($item_id=false, $artifact, $notin=false) | |
| trackers_data_get_valid_bugs ($group_id=false, $item_id='') | |
| trackers_data_get_followups ($item_id=false, $rorder=true) | |
| trackers_data_get_commenters ($item_id) | |
| trackers_data_get_history ($item_id=false) | |
| trackers_data_get_attached_files ($item_id=false, $order='DESC') | |
| trackers_data_get_cc_list ($item_id=false) | |
| trackers_data_add_history ($field_name, $old_value, $new_value, $item_id, $type=false, $artifact=0, $force=0) | |
| trackers_data_handle_update ($group_id, $item_id, $dependent_on_task, $dependent_on_bugs, $dependent_on_support, $dependent_on_patch, $canned_response, $vfl, &$changes, &$extra_addresses) | |
|
||||||||||||
|
Definition at line 360 of file data.php. 00361 { 00362 if ($ar1['place']< $ar2['place']) 00363 return -1; 00364 else if ($ar1['place']>$ar2['place']) 00365 return 1; 00366 return 0; 00367 }
|
|
||||||||||||
|
Definition at line 369 of file data.php. 00370 { 00371 if ($ar1['place_query']< $ar2['place_query']) 00372 return -1; 00373 else if ($ar1['place_query']>$ar2['place_query']) 00374 return 1; 00375 return 0; 00376 }
|
|
||||||||||||
|
Definition at line 378 of file data.php. 00379 { 00380 if ($ar1['place_result']< $ar2['place_result']) 00381 return -1; 00382 else if ($ar1['place_result']>$ar2['place_result']) 00383 return 1; 00384 return 0; 00385 }
|
|
||||||||||||||||||||||||||||||||
|
Definition at line 1332 of file data.php. Referenced by cookbook_handle_update(), trackers_data_handle_update(), and trackers_transition_update_item(). 01340 { 01341 01342 # If no artifact is defined, get the default one 01343 if (!$artifact) 01344 { 01345 $artifact = ARTIFACT; 01346 } 01347 01348 # If field is not to be kept in bug change history then do nothing 01349 if (!$force && !trackers_data_get_keep_history($field_name)) 01350 { return; } 01351 01352 if (!user_isloggedin()) 01353 { 01354 $user=100; 01355 } 01356 else 01357 { 01358 $user=user_getid(); 01359 } 01360 01361 # If type has a value add it into the sql statement (this is only for 01362 # the follow up comments (details field)) 01363 if ($type) 01364 { 01365 $fld_type = ',type'; $val_type = ",'$type'"; 01366 } 01367 else 01368 { 01369 # No comment type specified for a followup comment 01370 # so force it to None (100) 01371 if ($field_name == 'details') 01372 { 01373 $fld_type = ',type'; $val_type = ",'100'"; 01374 } 01375 } 01376 01377 01378 $sql="INSERT INTO ".$artifact."_history (bug_id,field_name,old_value,new_value,mod_by,date $fld_type) ". 01379 "VALUES ('$item_id','$field_name','$old_value','$new_value','$user','".time()."' $val_type)"; 01380 return db_query($sql); 01381 }
|
|
||||||||||||||||||||||||||||||||
|
Definition at line 975 of file data.php. References $feedback, $field_id, $sql, db_affected_rows(), db_query(), group_id, trackers_data_get_field_id(), and trackers_data_get_max_value_id(). 00976 { 00977 00978 global $feedback,$ffeedback; 00979 00980 /* 00981 Insert a new value for a given field for a given group 00982 */ 00983 00984 # An empty field value is not allowed 00985 if (preg_match ("/^\s*$/", $value)) 00986 { 00987 fb(_("Empty field value not allowed"), 0); 00988 return; 00989 } 00990 00991 if (!$by_field_id) 00992 { 00993 $field_id = trackers_data_get_field_id($field); 00994 } 00995 00996 # if group_id=100 (None) then do nothing 00997 # because no real project should have the group number '100' 00998 if ($group_id != 100) 00999 { 01000 01001 # if the current value set for this project is empty 01002 # then copy the default values first (if any) 01003 if (trackers_data_is_value_set_empty($field,$group_id)) 01004 { 01005 trackers_data_copy_default_values($field,$group_id); 01006 } 01007 01008 # Find the next value_id to give to this new value. (Start arbitrarily 01009 # at 200 if no value exists (and therefore max is undefined) 01010 $max_value_id = trackers_data_get_max_value_id($field, $group_id); 01011 01012 if ($max_value_id < 0) 01013 { 01014 $value_id = 200; 01015 } 01016 else 01017 { 01018 $value_id = $max_value_id +1; 01019 } 01020 01021 01022 $sql = "INSERT INTO ".ARTIFACT."_field_value ". 01023 "(bug_field_id,group_id,value_id,value,description,order_id,status) ". 01024 "VALUES ('$field_id','$group_id','$value_id','$value','$description','$order_id','$status')"; 01025 db_query($sql); 01026 01027 if (db_affected_rows($result) < 1) 01028 { 01029 fb(_("Insert failed."), 0); 01030 ' - '.db_error(); 01031 } 01032 else 01033 01034 { 01035 fb(_("New field value inserted.")); 01036 } 01037 } 01038 }
|
|
||||||||||||
|
Definition at line 554 of file data.php. References $field. 00555 { 00556 global $BF_USAGE_BY_ID,$BF_USAGE_BY_NAME; 00557 if ($by_field_id) 00558 { 00559 $val = $BF_USAGE_BY_ID[$field]['custom_keep_history']; 00560 if (!isset($val)) 00561 { $val = $BF_USAGE_BY_ID[$field]['empty_keep_history']; } 00562 } else 00563 { 00564 $val = $BF_USAGE_BY_NAME[$field]['custom_keep_history']; 00565 if (!isset($val)) 00566 { $val = $BF_USAGE_BY_NAME[$field]['keep_history']; } 00567 } 00568 return($val); 00569 }
|
|
||||||||||||
|
Definition at line 37 of file data.php. References $sql, db_fetch_array(), db_query(), and group_id. 00038 { 00039 00040 /* 00041 Get all the possible bug fields for this project both used and unused. If 00042 used then show the project specific information about field usage 00043 otherwise show the default usage parameter 00044 Make sure array element are sorted by ascending place 00045 */ 00046 00047 global $BF_USAGE_BY_ID,$BF_USAGE_BY_NAME, $AT_START; 00048 00049 # Do nothing if already set and reload not forced 00050 if (isset($BF_USAGE_BY_ID) && !$reload) 00051 { 00052 return; 00053 } 00054 00055 # Clean up the array 00056 $BF_USAGE_BY_ID=array(); 00057 $BF_USAGE_BY_NAME=array(); 00058 00059 # First get the all the defaults. 00060 $sql='SELECT '.ARTIFACT.'_field.bug_field_id, field_name, display_type, '. 00061 'display_size,label, description,scope,required,empty_ok,keep_history,special, custom, '. 00062 'group_id, use_it,show_on_add,show_on_add_members, place, custom_label,'. 00063 'custom_description,custom_display_size,custom_empty_ok,custom_keep_history '. 00064 'FROM '.ARTIFACT.'_field, '.ARTIFACT.'_field_usage '. 00065 'WHERE group_id=100 '. 00066 'AND '.ARTIFACT.'_field.bug_field_id='.ARTIFACT.'_field_usage.bug_field_id '; 00067 00068 $res_defaults = db_query($sql); 00069 00070 # Now put all used fields in a global array for faster access 00071 # Index both by field_name and bug_field_id 00072 while ($field_array = db_fetch_array($res_defaults)) 00073 { 00074 $BF_USAGE_BY_ID[$field_array['bug_field_id'] ] = $field_array; 00075 $BF_USAGE_BY_NAME[$field_array['field_name'] ] = $field_array; 00076 } 00077 00078 # Then select all project specific entries 00079 $sql='SELECT '.ARTIFACT.'_field.bug_field_id, field_name, display_type, '. 00080 'display_size,label, description,scope,required,empty_ok,keep_history,special, custom, '. 00081 'group_id, use_it, show_on_add, show_on_add_members, place, custom_label,'. 00082 'custom_description,custom_display_size,custom_empty_ok,custom_keep_history '. 00083 'FROM '.ARTIFACT.'_field, '.ARTIFACT.'_field_usage '. 00084 'WHERE group_id='.$group_id. 00085 ' AND '.ARTIFACT.'_field.bug_field_id= '.ARTIFACT.'_field_usage.bug_field_id '; 00086 00087 00088 $res_project = db_query($sql); 00089 00090 # And override entries in the default array 00091 while ($field_array = db_fetch_array($res_project)) 00092 { 00093 $BF_USAGE_BY_ID[$field_array['bug_field_id'] ] = $field_array; 00094 $BF_USAGE_BY_NAME[$field_array['field_name'] ] = $field_array; 00095 } 00096 00097 #Debug code 00098 #print "<br />DBG - At end of bug_get_all_fields: $rows"; 00099 #reset($BF_USAGE_BY_NAME); 00100 #while (list($key, $val) = each($BF_USAGE_BY_NAME)) 00101 #{ 00102 #print "<br />DBG - $key -> use_it: $val[use_it], $val[place]"; 00103 #} 00104 00105 # rewind internal pointer of global arrays 00106 reset($BF_USAGE_BY_ID); 00107 reset($BF_USAGE_BY_NAME); 00108 $AT_START = true; 00109 }
|
|
||||||||||||
|
Definition at line 387 of file data.php. References $field, $field_id, $res, $sql, db_fetch_array(), db_query(), safeinput(), and trackers_data_get_field_id(). 00388 { 00389 global $BF_USAGE_BY_ID,$BF_USAGE_BY_NAME; 00390 00391 /* 00392 Get all the bug fields involved in the bug report. 00393 WARNING: This function ust only be called after bug_init() 00394 */ 00395 00396 # Build the list of fields involved in this report 00397 $sql = "SELECT * FROM ".ARTIFACT."_report_field WHERE report_id='".safeinput($report_id)."'"; 00398 $res = db_query($sql); 00399 00400 while ($arr = db_fetch_array($res)) 00401 { 00402 $field = $arr['field_name']; 00403 $field_id = trackers_data_get_field_id($field); 00404 $BF_USAGE_BY_NAME[$field]['show_on_query'] = 00405 $BF_USAGE_BY_ID[$field_id]['show_on_query'] = $arr['show_on_query']; 00406 00407 $BF_USAGE_BY_NAME[$field]['show_on_result'] = 00408 $BF_USAGE_BY_ID[$field_id]['show_on_result'] = $arr['show_on_result']; 00409 00410 $BF_USAGE_BY_NAME[$field]['place_query'] = 00411 $BF_USAGE_BY_ID[$field_id]['place_query'] = $arr['place_query']; 00412 00413 $BF_USAGE_BY_NAME[$field]['place_result'] = 00414 $BF_USAGE_BY_ID[$field_id]['place_result'] = $arr['place_result']; 00415 00416 $BF_USAGE_BY_NAME[$field]['col_width'] = 00417 $BF_USAGE_BY_ID[$field_id]['col_width'] = $arr['col_width']; 00418 } 00419 }
|
|
||||||||||||
|
Definition at line 1313 of file data.php. Referenced by format_item_attached_files(). 01314 { 01315 $sql="SELECT file_id,filename,filesize,filetype,description,date,user.user_name ". 01316 "FROM trackers_file,user ". 01317 "WHERE submitted_by=user.user_id ". 01318 "AND artifact='".ARTIFACT."' ". 01319 "AND item_id='$item_id' ORDER BY date $order"; 01320 return db_query($sql); 01321 }
|
|
||||||||||||||||
|
Definition at line 933 of file data.php. References $field, $res, db_fetch_array(), group_id, and trackers_data_get_field_predefined_values(). Referenced by show_item_list(), and show_item_list_sober(). 00934 { 00935 global $BF_VALUE_BY_NAME; 00936 00937 if (!isset($BF_VALUE_BY_NAME[$field][$value_id])) 00938 { 00939 $res = trackers_data_get_field_predefined_values ($field, $group_id,false,false,false); 00940 00941 while ($fv_array = db_fetch_array($res)) 00942 { 00943 # $fv_array[0] has the value_id and [1] is the value 00944 $BF_VALUE_BY_NAME[$field][$fv_array['value_id']] = $fv_array[1]; 00945 } 00946 } 00947 00948 return $BF_VALUE_BY_NAME[$field][$value_id]; 00949 }
|
|
|
Definition at line 1323 of file data.php. Referenced by format_item_cc_list(). 01324 { 01325 $sql="SELECT bug_cc_id,".ARTIFACT."_cc.email,".ARTIFACT."_cc.added_by,".ARTIFACT."_cc.comment,".ARTIFACT."_cc.date,user.user_name ". 01326 "FROM ".ARTIFACT."_cc,user ". 01327 "WHERE added_by=user.user_id ". 01328 "AND bug_id='$item_id' ORDER BY date DESC"; 01329 return db_query($sql); 01330 }
|
|
||||||||||||
|
Definition at line 783 of file data.php. References $field. 00784 { 00785 global $BF_USAGE_BY_ID,$BF_USAGE_BY_NAME; 00786 return($by_field_id ? $BF_USAGE_BY_ID[$field]['col_width'] : $BF_USAGE_BY_NAME[$field]['col_width']); 00787 }
|
|
|
Definition at line 1295 of file data.php. 01296 { 01297 $sql="SELECT DISTINCT mod_by FROM ".ARTIFACT."_history ". 01298 "WHERE ".ARTIFACT."_history.bug_id='$item_id' ". 01299 "AND ".ARTIFACT."_history.field_name = 'details' "; 01300 return db_query($sql); 01301 }
|
|
||||||||||||
|
Definition at line 806 of file data.php. References $field, $result, bug, db_query(), db_result, and trackers_data_get_field_name(). 00807 { 00808 global $BF_USAGE_BY_ID,$BF_USAGE_BY_NAME; 00809 /* 00810 Return the default value associated to a field_name as defined in the 00811 bug table (SQL definition) 00812 */ 00813 if ($by_field_id) 00814 { 00815 $field = trackers_data_get_field_name($field); 00816 } 00817 00818 $result = db_query('describe bug '.$field); 00819 return (db_result($result,0,'Default')); 00820 00821 }
|
|
||||||||||||||||
|
Definition at line 1250 of file data.php. References $sql, db_query(), and print. 01251 { 01252 /* 01253 Get the list of ids this is dependent on 01254 */ 01255 $sql="SELECT is_dependent_on_item_id FROM ".ARTIFACT."_dependencies WHERE item_id='$item_id' AND is_dependent_on_item_id_artifact='".$artifact."' "; 01256 if ($notin) 01257 { 01258 $sql .= ' AND is_dependent_on_item_id NOT IN ('. join(',',$notin).')'; 01259 } 01260 # print $sql; #DBG 01261 return db_query($sql); 01262 }
|
|
||||||||||||
|
Definition at line 706 of file data.php. References $field. 00707 { 00708 global $BF_USAGE_BY_ID,$BF_USAGE_BY_NAME; 00709 if ($by_field_id) 00710 { 00711 $desc = $BF_USAGE_BY_ID[$field]['custom_description']; 00712 if (!isset($desc)) 00713 { $desc = $BF_USAGE_BY_ID[$field]['description']; } 00714 } else 00715 { 00716 $desc = $BF_USAGE_BY_NAME[$field]['custom_description']; 00717 if (!isset($desc)) 00718 { $desc = $BF_USAGE_BY_NAME[$field]['description']; } 00719 } 00720 return($desc); 00721 }
|
|
||||||||||||
|
Definition at line 789 of file data.php. References $field. 00790 { 00791 global $BF_USAGE_BY_ID,$BF_USAGE_BY_NAME; 00792 if ($by_field_id) 00793 { 00794 $val = $BF_USAGE_BY_ID[$field]['custom_display_size']; 00795 if (!isset($val)) 00796 { $val = $BF_USAGE_BY_ID[$field]['display_size']; } 00797 } else 00798 { 00799 $val = $BF_USAGE_BY_NAME[$field]['custom_display_size']; 00800 if (!isset($val)) 00801 { $val = $BF_USAGE_BY_NAME[$field]['display_size']; } 00802 } 00803 return(explode('/',$val)); 00804 }
|
|
||||||||||||
|
Definition at line 723 of file data.php. References $field. Referenced by trackers_data_is_date_field(), trackers_data_is_select_box(), trackers_data_is_text_area(), and trackers_data_is_text_field(). 00724 { 00725 global $BF_USAGE_BY_ID,$BF_USAGE_BY_NAME; 00726 return($by_field_id ? $BF_USAGE_BY_ID[$field]['display_type'] : $BF_USAGE_BY_NAME[$field]['display_type']); 00727 }
|
|
||||||||||||
|
Definition at line 729 of file data.php. References trackers_data_is_date_field(), trackers_data_is_select_box(), trackers_data_is_text_area(), and trackers_data_is_text_field(). 00730 { 00731 if (trackers_data_is_select_box($field, $by_field_id)) 00732 { 00733 return 'Select Box'; 00734 } 00735 else if (trackers_data_is_text_field($field, $by_field_id)) 00736 { 00737 return 'Text Field'; 00738 } 00739 else if (trackers_data_is_text_area($field, $by_field_id)) 00740 { 00741 return 'Text Area'; 00742 } 00743 else if (trackers_data_is_date_field($field, $by_field_id)) 00744 { 00745 return 'Date Field'; 00746 } 00747 else 00748 { 00749 return '?'; 00750 } 00751 }
|
|
|
Definition at line 677 of file data.php. Referenced by trackers_data_create_value(), trackers_data_get_all_report_fields(), trackers_data_get_field_predefined_values(), trackers_data_get_max_value_id(), trackers_data_handle_update(), trackers_data_reset_usage(), trackers_data_update_usage(), and trackers_data_use_field_predefined_values(). 00678 { 00679 global $BF_USAGE_BY_NAME; 00680 return($BF_USAGE_BY_NAME[$field_name]['bug_field_id']); 00681 }
|
|
|
Definition at line 671 of file data.php. References $field_id. Referenced by trackers_data_get_default_value(), trackers_data_get_field_predefined_values(), and trackers_data_is_username_field(). 00672 { 00673 global $BF_USAGE_BY_ID; 00674 return($BF_USAGE_BY_ID[$field_id]['field_name']); 00675 }
|
|
||||||||||||||||||||||||
|
Definition at line 421 of file data.php. References $field, $field_id, $rows, $sql, db_numrows(), db_query(), group_id, trackers_data_get_field_id(), trackers_data_get_field_name(), trackers_data_get_submitters(), and trackers_data_get_technicians(). Referenced by trackers_data_get_cached_field_value(). 00422 { 00423 00424 /* 00425 Return all possible values for a select box field 00426 Rk: if the checked value is given then it means that we want this value 00427 in the list in any case (even if it is hidden and active_only is requested) 00428 */ 00429 $field_id = ($by_field_id ? $field : trackers_data_get_field_id($field)); 00430 $field_name = ($by_field_id ? trackers_data_get_field_name($field) : $field); 00431 00432 # The "Assigned_to" box requires some special processing 00433 # because possible values are project members) and they are 00434 # not stored in the trackers_field_value table but in the user_group table 00435 if ($field_name == 'assigned_to') 00436 { 00437 $res_value = trackers_data_get_technicians($group_id); 00438 } 00439 else if ($field_name == 'submitted_by') 00440 { 00441 $res_value = trackers_data_get_submitters($group_id); 00442 } 00443 else 00444 { 00445 00446 # If only active field 00447 if ($active_only) 00448 { 00449 if ($checked) 00450 { 00451 $status_cond = "AND (status IN ('A','P') OR value_id='$checked') "; 00452 } 00453 else 00454 { 00455 $status_cond = "AND status IN ('A','P') "; 00456 } 00457 } 00458 00459 # CAUTION !! the fields value_id and value must be first in the 00460 # select statement because the output is used in the html_build_select_box 00461 # function 00462 00463 # yeupou@gnu.org 2003-11-24 00464 # FIXME!!!!! WHAT IS THIS CRAP! 00465 # It _on purpose_ ignores the permanent values for the 00466 # system when a group have his own values. 00467 # And when creating group specific values, it insert the permanent 00468 # system values in the group specific values. 00469 # 00470 # Can someone bring a reasonnable explanation for such a behavior? 00471 # - permanent field must by nature be permanent, in any case! 00472 # - database must never duplicates information without good reason 00473 # 00474 # When improving this code, please change that so it uses the permanent 00475 # values in any case, whatever the group specific values may be. 00476 00477 # Look for project specific values first 00478 $sql="SELECT value_id,value,bug_fv_id,bug_field_id,group_id,description,order_id,status ". 00479 "FROM ".ARTIFACT."_field_value ". 00480 "WHERE group_id=$group_id AND bug_field_id=$field_id ". 00481 $status_cond." ORDER BY order_id,value ASC"; 00482 $res_value = db_query($sql); 00483 $rows=db_numrows($res_value); 00484 00485 # If no specific value for this group then look for default values 00486 if ($rows == 0) 00487 { 00488 $sql="SELECT value_id,value,bug_fv_id,bug_field_id,group_id,description,order_id,status ". 00489 "FROM ".ARTIFACT."_field_value ". 00490 "WHERE group_id=100 AND bug_field_id=$field_id ". 00491 $status_cond." ORDER BY order_id,value ASC"; 00492 $res_value = db_query($sql); 00493 $rows=db_numrows($res_value); 00494 } 00495 } 00496 00497 return($res_value); 00498 00499 }
|
|
|
Definition at line 951 of file data.php. References $res, $sql, and db_query(). 00952 { 00953 /* 00954 Get all the columns associated to a given field value 00955 */ 00956 00957 $sql = "SELECT * FROM ".ARTIFACT."_field_value WHERE bug_fv_id='$item_fv_id'"; 00958 $res = db_query($sql); 00959 return($res); 00960 }
|
|
||||||||||||
|
Definition at line 1273 of file data.php. Referenced by format_item_changes(), and format_item_details(). 01274 { 01275 if ($rorder == "true") 01276 { $rorder = "DESC"; } 01277 else 01278 { $rorder = "ASC"; } 01279 01280 $sql="SELECT DISTINCT ".ARTIFACT."_history.bug_history_id,".ARTIFACT."_history.field_name,".ARTIFACT."_history.old_value,".ARTIFACT."_history.date,user.user_name,user.realname,".ARTIFACT."_field_value.value AS comment_type ". 01281 "FROM ".ARTIFACT."_history,".ARTIFACT."_field_value,".ARTIFACT."_field,".ARTIFACT.",user ". 01282 "WHERE ".ARTIFACT."_history.bug_id='$item_id' ". 01283 "AND ".ARTIFACT."_history.field_name = 'details' ". 01284 "AND ".ARTIFACT."_history.mod_by=user.user_id ". 01285 "AND ".ARTIFACT."_history.bug_id=".ARTIFACT.".bug_id ". 01286 "AND ".ARTIFACT."_history.type = ".ARTIFACT."_field_value.value_id ". 01287 "AND ".ARTIFACT."_field_value.bug_field_id = ".ARTIFACT."_field.bug_field_id ". 01288 "AND (".ARTIFACT."_field_value.group_id = ".ARTIFACT.".group_id OR ".ARTIFACT."_field_value.group_id = '100') ". 01289 "AND ".ARTIFACT."_field.field_name = 'comment_type_id' ". 01290 "ORDER BY ".ARTIFACT."_history.date $rorder"; 01291 01292 return db_query($sql); 01293 }
|
|
||||||||||||
|
Definition at line 683 of file data.php. References $field, and group_id. 00684 { 00685 global $BF_USAGE_BY_ID,$BF_USAGE_BY_NAME; 00686 return($by_field_id ? $BF_USAGE_BY_ID[$field]['group_id'] : $BF_USAGE_BY_NAME[$field]['group_id']); 00687 }
|
|
|
Definition at line 1303 of file data.php. Referenced by show_item_history(). 01304 { 01305 $sql="select ".ARTIFACT."_history.field_name,".ARTIFACT."_history.old_value,".ARTIFACT."_history.date,".ARTIFACT."_history.type,user.user_name,".ARTIFACT."_history.new_value ". 01306 "FROM ".ARTIFACT."_history,user ". 01307 "WHERE ".ARTIFACT."_history.mod_by=user.user_id ". 01308 "AND ".ARTIFACT."_history.field_name <> 'details' ". 01309 "AND bug_id='$item_id' ORDER BY ".ARTIFACT."_history.date DESC"; 01310 return db_query($sql); 01311 }
|
|
|
Definition at line 112 of file data.php. References db_query(), db_result, and group_id. 00113 { 00114 return db_result( 00115 db_query("SELECT group_id FROM ".ARTIFACT." WHERE bug_id='$item_id'"), 00116 0, 00117 'group_id'); 00118 }
|
|
||||||||||||||||
|
Definition at line 303 of file data.php. References $result, $rows, $sql, db_numrows(), db_query(), and db_result. Referenced by trackers_data_handle_update(). 00304 { 00305 $emailad = ""; 00306 $sendemail = 0; 00307 # Get group information bur new entity notification settings 00308 $sql="SELECT groups.$artifact"."_glnotif, groups.send_all_"."$artifact, groups.new_"."$artifact"."_address ". 00309 "FROM "."$artifact, groups ". 00310 "WHERE "."$artifact.bug_id='$item_id' ". 00311 "AND groups.group_id="."$artifact.group_id"; 00312 $result=db_query($sql); 00313 00314 $glnotif = db_result($result,0,$artifact."_glnotif"); 00315 $glsendall = db_result($result,0,"send_all_".$artifact); 00316 $glnewad = db_result($result,0,"new_".$artifact."_address"); 00317 if ($glnotif != 1) { # if not 'global only' 00318 $cat_field_name = "category_id"; 00319 00320 $sql="SELECT "."$artifact"."_field_value.email_ad, "."$artifact"."_field_value.send_all_flag ". 00321 "FROM "."$artifact"."_field_value, "."$artifact"."_field, $artifact ". 00322 "WHERE "."$artifact.bug_id='$item_id' ". 00323 "AND "."$artifact"."_field.field_name='$cat_field_name' ". 00324 "AND "."$artifact"."_field_value.bug_field_id="."$artifact"."_field.bug_field_id ". 00325 "AND "."$artifact"."_field_value.group_id="."$artifact.group_id ". 00326 "AND "."$artifact"."_field_value.value_id="."$artifact.category_id"; 00327 00328 $result=db_query($sql); 00329 $rows=db_numrows($result); 00330 if ($rows > 0) { 00331 $sendallflag = db_result($result, 0, 'send_all_flag'); 00332 if (($updated == 0) || (($updated == 1) && ($sendallflag == 1))) { 00333 $emailad .= db_result($result, 0, 'email_ad'); 00334 } 00335 } else { 00336 # could be that administrator closes category notification and forgot 00337 # to define categories BUT in most cases it means the submitter selected 00338 # the 'NONE' category for this bug 00339 if (($updated == 0) || (($updated == 1) && ($glsendall == 1))) { 00340 $emailad .= $glnewad; 00341 } 00342 } 00343 } 00344 if ($glnotif > 0) { # if not 'category only' 00345 if (($updated == 0) || (($updated == 1) && ($glsendall == 1))) { 00346 if ($emailad != "") { 00347 $emailad .= ','; 00348 } 00349 $emailad .= $glnewad; 00350 } 00351 } 00352 if (trim($emailad) != "") { 00353 $sendemail = 1; 00354 } 00355 # print "EMAILAD=$emailad SENDEMAIL=$sendemail"; 00356 return array($emailad, $sendemail); 00357 }
|
|
||||||||||||
|
Definition at line 1237 of file data.php. References $sql, and db_query(). 01238 { 01239 /* 01240 Get the items for this project 01241 */ 01242 $sql="SELECT bug_id,summary ". 01243 "FROM ".$artifact." ". 01244 "WHERE group_id='".$group_id."'". 01245 " AND status_id <> '3' ". 01246 " ORDER BY bug_id DESC LIMIT 100"; 01247 return db_query($sql); 01248 }
|
|
||||||||||||
|
Definition at line 754 of file data.php. References $field. 00755 { 00756 global $BF_USAGE_BY_ID,$BF_USAGE_BY_NAME; 00757 if ($by_field_id) 00758 { 00759 $val = $BF_USAGE_BY_ID[$field]['custom_keep_history']; 00760 if (!isset($val)) 00761 { $val = $BF_USAGE_BY_ID[$field]['keep_history']; } 00762 } else 00763 { 00764 $val = $BF_USAGE_BY_NAME[$field]['custom_keep_history']; 00765 if (!isset($val)) 00766 { $val = $BF_USAGE_BY_NAME[$field]['keep_history']; } 00767 } 00768 return($val); 00769 }
|
|
||||||||||||
|
Definition at line 689 of file data.php. References $field. Referenced by format_item_changes(), show_item_history(), and trackers_transition_update_item(). 00690 { 00691 global $BF_USAGE_BY_ID,$BF_USAGE_BY_NAME; 00692 if ($by_field_id) 00693 { 00694 $lbl = $BF_USAGE_BY_ID[$field]['custom_label']; 00695 if (!isset($lbl)) 00696 { $lbl = $BF_USAGE_BY_ID[$field]['label']; } 00697 } else 00698 { 00699 $lbl = $BF_USAGE_BY_NAME[$field]['custom_label']; 00700 if (!isset($lbl)) 00701 { $lbl = $BF_USAGE_BY_NAME[$field]['label']; } 00702 } 00703 return($lbl); 00704 }
|
| ||||||||||||||||