| [ Index ] |
PHP Cross Reference of MantisBT |
[Source view] [Print] [Project Stats]
Bug API
| Copyright: | Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org |
| Copyright: | Copyright (C) 2002 - 2011 MantisBT Team - mantisbt-dev@lists.sourceforge.net |
| File Size: | 1908 lines (61 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
BugData:: (52 methods):
get_attachment_count()
get_bugnotes_count()
__set()
__get()
__isset()
loadrow()
fetch_extended_info()
is_extended_field()
bug_get_bugnote_count()
validate()
create()
update()
bug_cache_database_result()
bug_cache_row()
bug_cache_array_rows()
bug_add_to_cache()
bug_clear_cache()
bug_text_cache_row()
bug_text_clear_cache()
bug_exists()
bug_ensure_exists()
bug_is_user_reporter()
bug_is_user_handler()
bug_is_readonly()
bug_is_resolved()
bug_is_overdue()
bug_check_workflow()
bug_copy()
bug_move()
bug_delete()
bug_delete_all()
bug_get_extended_row()
bug_get_row()
bug_get()
bug_row_to_object()
bug_get_field()
bug_get_text_field()
bug_format_summary()
bug_get_newest_bugnote_timestamp()
bug_get_bugnote_stats()
bug_get_attachments()
bug_set_field()
bug_assign()
bug_close()
bug_resolve()
bug_reopen()
bug_update_date()
bug_monitor()
bug_get_monitors()
bug_monitor_copy()
bug_unmonitor()
bug_format_id()
| get_attachment_count() X-Ref |
| return number of file attachment's linked to current bug return: int |
| get_bugnotes_count() X-Ref |
| return number of bugnotes's linked to current bug return: int |
| __set($name, $value) X-Ref |
| __get($name) X-Ref |
| __isset($name) X-Ref |
| loadrow( $p_row ) X-Ref |
| fast-load database row into bugobject param: array $p_row |
| fetch_extended_info() X-Ref |
| Retrieves extended information for bug (e.g. bug description) return: null |
| is_extended_field( $p_field_name ) X-Ref |
| Returns if the field is an extended field which needs fetch_extended_info() return: boolean |
| bug_get_bugnote_count() X-Ref |
| Returns the number of bugnotes for the given bug_id return: int number of bugnotes |
| validate( $p_update_extended = true) X-Ref |
| validate current bug object for database insert/update triggers error on failure param: bool $p_update_extended |
| create() X-Ref |
| Insert a new bug into the database return: int integer representing the bug id that was created |
| update( $p_update_extended = false, $p_bypass_mail = false ) X-Ref |
| Update a bug from the given data structure If the third parameter is true, also update the longer strings table param: bool p_update_extended param: bool p_bypass_email Default false, set to true to avoid generating emails (if sending elsewhere) return: bool (always true) |
| bug_cache_database_result( $p_bug_database_result, $p_stats = null ) X-Ref |
| Cache a database result-set containing full contents of bug_table row. param: array p_bug_database_result database row containing all columns from mantis_bug_table param: array p_stats (optional) array representing bugnote stats return: array returns an array representing the bug row if bug exists |
| bug_cache_row( $p_bug_id, $p_trigger_errors = true ) X-Ref |
| Cache a bug row if necessary and return the cached copy param: array p_bug_id id of bug to cache from mantis_bug_table param: array p_trigger_errors set to true to trigger an error if the bug does not exist. return: bool|array returns an array representing the bug row if bug exists or false if bug does not exist |
| bug_cache_array_rows( $p_bug_id_array ) X-Ref |
| Cache a set of bugs param: array p_bug_id_array integer array representing bug ids to cache return: null |
| bug_add_to_cache( $p_bug_row, $p_stats = null ) X-Ref |
| Inject a bug into the bug cache param: array p_bug_row bug row to cache param: array p_stats bugnote stats to cache return: null |
| bug_clear_cache( $p_bug_id = null ) X-Ref |
| Clear a bug from the cache or all bugs if no bug id specified. param: int bug id to clear (optional) return: null |
| bug_text_cache_row( $p_bug_id, $p_trigger_errors = true ) X-Ref |
| Cache a bug text row if necessary and return the cached copy param: int p_bug_id integer bug id to retrieve text for param: bool p_trigger_errors If the second parameter is true (default), trigger an error if bug text not found. return: bool|array returns false if not bug text found or array of bug text |
| bug_text_clear_cache( $p_bug_id = null ) X-Ref |
| Clear a bug's bug text from the cache or all bug text if no bug id specified. param: int bug id to clear (optional) return: null |
| bug_exists( $p_bug_id ) X-Ref |
| Check if a bug exists param: int p_bug_id integer representing bug id return: bool true if bug exists, false otherwise |
| bug_ensure_exists( $p_bug_id ) X-Ref |
| Check if a bug exists. If it doesn't then trigger an error param: int p_bug_id integer representing bug id return: null |
| bug_is_user_reporter( $p_bug_id, $p_user_id ) X-Ref |
| check if the given user is the reporter of the bug param: int p_bug_id integer representing bug id param: int p_user_id integer reprenting a user id return: bool return true if the user is the reporter, false otherwise |
| bug_is_user_handler( $p_bug_id, $p_user_id ) X-Ref |
| check if the given user is the handler of the bug param: int p_bug_id integer representing bug id param: int p_user_id integer reprenting a user id return: bool return true if the user is the handler, false otherwise |
| bug_is_readonly( $p_bug_id ) X-Ref |
| Check if the bug is readonly and shouldn't be modified For a bug to be readonly the status has to be >= bug_readonly_status_threshold and current user access level < update_readonly_bug_threshold. param: int p_bug_id integer representing bug id return: bool |
| bug_is_resolved( $p_bug_id ) X-Ref |
| Check if a given bug is resolved param: int p_bug_id integer representing bug id return: bool true if bug is resolved, false otherwise |
| bug_is_overdue( $p_bug_id ) X-Ref |
| Check if a given bug is overdue param: int p_bug_id integer representing bug id return: bool true if bug is overdue, false otherwise |
| bug_check_workflow( $p_bug_status, $p_wanted_status ) X-Ref |
| Validate workflow state to see if bug can be moved to requested state param: int p_bug_status current bug status param: int p_wanted_status new bug status return: bool |
| bug_copy( $p_bug_id, $p_target_project_id = null, $p_copy_custom_fields = false, $p_copy_relationships = false, $p_copy_history = false, $p_copy_attachments = false, $p_copy_bugnotes = false, $p_copy_monitoring_users = false ) X-Ref |
| Copy a bug from one project to another. Also make copies of issue notes, attachments, history, email notifications etc. param: array p_bug_id integer representing bug id param: int p_target_project_id param: bool p_copy_custom_fields param: bool p_copy_relationships return: int representing the new bugid |
| bug_move( $p_bug_id, $p_target_project_id ) X-Ref |
| Moves an issue from a project to another. param: int p_bug_id The bug to be moved. param: int p_target_project_id The target project to move the bug to. |
| bug_delete( $p_bug_id ) X-Ref |
| allows bug deletion : delete the bug, bugtext, bugnote, and bugtexts selected param: array p_bug_id integer representing bug id return: bool (always true) |
| bug_delete_all( $p_project_id ) X-Ref |
| Delete all bugs associated with a project param: array p_project_id integer representing a projectid return: bool always true |
| bug_get_extended_row( $p_bug_id ) X-Ref |
| Returns the extended record of the specified bug, this includes the bug text fields param: int p_bug_id integer representing bug id return: array |
| bug_get_row( $p_bug_id ) X-Ref |
| Returns the record of the specified bug param: int p_bug_id integer representing bug id return: array |
| bug_get( $p_bug_id, $p_get_extended = false ) X-Ref |
| Returns an object representing the specified bug param: int p_bug_id integer representing bug id param: bool p_get_extended included extended information (including bug_text) return: object BugData Object |
| bug_row_to_object( $p_row ) X-Ref |
| No description |
| bug_get_field( $p_bug_id, $p_field_name ) X-Ref |
| return the specified field of the given bug if the field does not exist, display a warning and return '' param: int p_bug_id integer representing bug id param: string p_fieldname field name return: string |
| bug_get_text_field( $p_bug_id, $p_field_name ) X-Ref |
| return the specified text field of the given bug if the field does not exist, display a warning and return '' param: int p_bug_id integer representing bug id param: string p_fieldname field name return: string |
| bug_format_summary( $p_bug_id, $p_context ) X-Ref |
| return the bug summary this is a wrapper for the custom function param: int p_bug_id integer representing bug id param: int p_context representing SUMMARY_CAPTION, SUMMARY_FIELD return: string |
| bug_get_newest_bugnote_timestamp( $p_bug_id ) X-Ref |
| return the timestamp for the most recent time at which a bugnote associated with the bug was modified param: int p_bug_id integer representing bug id return: bool|int false or timestamp in integer format representing newest bugnote timestamp |
| bug_get_bugnote_stats( $p_bug_id ) X-Ref |
| return the timestamp for the most recent time at which a bugnote associated with the bug was modified and the total bugnote count in one db query param: int p_bug_id integer representing bug id return: object consisting of bugnote stats |
| bug_get_attachments( $p_bug_id ) X-Ref |
| Get array of attachments associated with the specified bug id. The array will be sorted in terms of date added (ASC). The array will include the following fields: id, title, diskfile, filename, filesize, file_type, date_added, user_id. param: int p_bug_id integer representing bug id return: array array of results or null |
| bug_set_field( $p_bug_id, $p_field_name, $p_value ) X-Ref |
| Set the value of a bug field param: int p_bug_id integer representing bug id param: string p_field_name pre-defined field name param: any p_value value to set return: bool (always true) |
| bug_assign( $p_bug_id, $p_user_id, $p_bugnote_text = '', $p_bugnote_private = false ) X-Ref |
| assign the bug to the given user param: array p_bug_id_array integer array representing bug ids to cache return: null |
| bug_close( $p_bug_id, $p_bugnote_text = '', $p_bugnote_private = false, $p_time_tracking = '0:00' ) X-Ref |
| close the given bug param: int p_bug_id param: string p_bugnote_text param: bool p_bugnote_private param: string p_time_tracking return: bool (always true) |
| bug_resolve( $p_bug_id, $p_resolution, $p_fixed_in_version = '', $p_bugnote_text = '', $p_duplicate_id = null, $p_handler_id = null, $p_bugnote_private = false, $p_time_tracking = '0:00' ) X-Ref |
| resolve the given bug return: bool (alawys true) |
| bug_reopen( $p_bug_id, $p_bugnote_text = '', $p_time_tracking = '0:00', $p_bugnote_private = false ) X-Ref |
| reopen the given bug param: int p_bug_id param: string p_bugnote_text param: string p_time_tracking param: bool p_bugnote_private return: bool (always true) |
| bug_update_date( $p_bug_id ) X-Ref |
| updates the last_updated field param: int p_bug_id integer representing bug ids return: bool (always true) |
| bug_monitor( $p_bug_id, $p_user_id ) X-Ref |
| enable monitoring of this bug for the user param: int p_bug_id integer representing bug ids param: int p_user_id integer representing user ids return: true if successful, false if unsuccessful |
| bug_get_monitors( $p_bug_id ) X-Ref |
| Returns the list of users monitoring the specified bug param: int $p_bug_id |
| bug_monitor_copy( $p_source_bug_id, $p_dest_bug_id ) X-Ref |
| Copy list of users monitoring a bug to the monitor list of a second bug param: int p_source_bug_id integer representing the bug ID of the source bug param: int p_dest_bug_id integer representing the bug ID of the destination bug return: bool (always true) |
| bug_unmonitor( $p_bug_id, $p_user_id ) X-Ref |
| disable monitoring of this bug for the user if $p_user_id = null, then bug is unmonitored for all users. param: int p_bug_id integer representing bug ids param: int p_user_id integer representing user ids return: bool (always true) |
| bug_format_id( $p_bug_id ) X-Ref |
| Pads the bug id with the appropriate number of zeros. param: int p_bug_id return: string |
| Generated: Thu Jul 28 15:48:31 2011 | Cross-referenced by PHPXref 0.7 |