Procedural File: bug_api.php
Source Location: /core/bug_api.php
Classes:
BugData
Bug Data Structure Definition
Page Details:
Bug API
Tags:
Includes:
bug_assign [line 1501]
null bug_assign(
array $p_bug_id, $p_user_id, [ $p_bugnote_text = ''], [ $p_bugnote_private = false])
|
|
assign the bug to the given user
Tags:
Parameters
array |
$p_bug_id |
p_bug_id_array integer array representing bug ids to cache |
|
$p_user_id |
|
|
$p_bugnote_text |
|
|
$p_bugnote_private |
|
bug_cache_array_rows [line 621]
null bug_cache_array_rows(
array $p_bug_id_array)
|
|
Cache a set of bugs
Tags:
Parameters
array |
$p_bug_id_array |
p_bug_id_array integer array representing bug ids to cache |
bug_cache_database_result [line 565]
array bug_cache_database_result(
array $p_bug_database_result, [array $p_stats = null])
|
|
Cache a database result-set containing full contents of bug_table row.
Tags:
Parameters
array |
$p_bug_database_result |
p_bug_database_result database row containing all columns from mantis_bug_table |
array |
$p_stats |
p_stats (optional) array representing bugnote stats |
bug_cache_row [line 583]
bool|array bug_cache_row(
array $p_bug_id, [array $p_trigger_errors = true])
|
|
Cache a bug row if necessary and return the cached copy
Tags:
Parameters
array |
$p_bug_id |
p_bug_id id of bug to cache from mantis_bug_table |
array |
$p_trigger_errors |
p_trigger_errors set to true to trigger an error if the bug does not exist. |
bug_check_workflow [line 867]
bool bug_check_workflow(
int $p_bug_status, int $p_wanted_status)
|
|
Validate workflow state to see if bug can be moved to requested state
Tags:
Parameters
int |
$p_bug_status |
p_bug_status current bug status |
int |
$p_wanted_status |
p_wanted_status new bug status |
bug_clear_cache [line 673]
null bug_clear_cache(
[int $p_bug_id = null])
|
|
Clear a bug from the cache or all bugs if no bug id specified.
Tags:
Parameters
int |
$p_bug_id |
bug id to clear (optional) |
bug_close [line 1557]
bool bug_close(
int $p_bug_id, [string $p_bugnote_text = ''], [bool $p_bugnote_private = false], [string $p_time_tracking = '0:00'])
|
|
close the given bug
Tags:
Parameters
int |
$p_bug_id |
p_bug_id |
string |
$p_bugnote_text |
p_bugnote_text |
bool |
$p_bugnote_private |
p_bugnote_private |
string |
$p_time_tracking |
p_time_tracking |
bug_copy [line 898]
int bug_copy(
array $p_bug_id, [int $p_target_project_id = null], [bool $p_copy_custom_fields = false], [bool $p_copy_relationships = false], [ $p_copy_history = false], [ $p_copy_attachments = false], [ $p_copy_bugnotes = false], [ $p_copy_monitoring_users = false])
|
|
Copy a bug from one project to another. Also make copies of issue notes, attachments, history, email notifications etc.
Tags:
Parameters
array |
$p_bug_id |
p_bug_id integer representing bug id |
int |
$p_target_project_id |
p_target_project_id |
bool |
$p_copy_custom_fields |
p_copy_custom_fields |
bool |
$p_copy_relationships |
p_copy_relationships |
|
$p_copy_history |
|
|
$p_copy_attachments |
|
|
$p_copy_bugnotes |
|
|
$p_copy_monitoring_users |
|
bug_delete [line 1082]
bool bug_delete(
array $p_bug_id)
|
|
allows bug deletion : delete the bug, bugtext, bugnote, and bugtexts selected
Tags:
Parameters
array |
$p_bug_id |
p_bug_id integer representing bug id |
bug_delete_all [line 1155]
bool bug_delete_all(
array $p_project_id)
|
|
Delete all bugs associated with a project
Tags:
Parameters
array |
$p_project_id |
p_project_id integer representing a projectid |
bug_ensure_exists [line 766]
null bug_ensure_exists(
int $p_bug_id)
|
|
Check if a bug exists. If it doesn't then trigger an error
Tags:
Parameters
int |
$p_bug_id |
p_bug_id integer representing bug id |
bug_exists [line 752]
bool bug_exists(
int $p_bug_id)
|
|
Check if a bug exists
Tags:
Parameters
int |
$p_bug_id |
p_bug_id integer representing bug id |
bug_format_id [line 1816]
string bug_format_id(
int $p_bug_id)
|
|
Pads the bug id with the appropriate number of zeros.
Tags:
Parameters
bug_format_summary [line 1282]
string bug_format_summary(
int $p_bug_id, int $p_context)
|
|
return the bug summary this is a wrapper for the custom function
Tags:
Parameters
int |
$p_bug_id |
p_bug_id integer representing bug id |
int |
$p_context |
p_context representing SUMMARY_CAPTION, SUMMARY_FIELD |
bug_get [line 1215]
object BugData bug_get(
int $p_bug_id, [bool $p_get_extended = false])
|
|
Returns an object representing the specified bug
Tags:
Parameters
int |
$p_bug_id |
p_bug_id integer representing bug id |
bool |
$p_get_extended |
p_get_extended included extended information (including bug_text) |
bug_get_attachments [line 1363]
array bug_get_attachments(
int $p_bug_id)
|
|
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.
Tags:
Parameters
int |
$p_bug_id |
p_bug_id integer representing bug id |
bug_get_bugnote_stats [line 1321]
object consisting bug_get_bugnote_stats(
int $p_bug_id)
|
|
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
Tags:
Parameters
int |
$p_bug_id |
p_bug_id integer representing bug id |
bug_get_extended_row [line 1190]
array bug_get_extended_row(
int $p_bug_id)
|
|
Returns the extended record of the specified bug, this includes the bug text fields
Tags:
Parameters
int |
$p_bug_id |
p_bug_id integer representing bug id |
bug_get_field [line 1241]
string bug_get_field(
int $p_bug_id, string $p_field_name)
|
|
return the specified field of the given bug if the field does not exist, display a warning and return ''
Tags:
Parameters
int |
$p_bug_id |
p_bug_id integer representing bug id |
string |
$p_field_name |
p_fieldname field name |
bug_get_newest_bugnote_timestamp [line 1294]
bool|int bug_get_newest_bugnote_timestamp(
int $p_bug_id)
|
|
return the timestamp for the most recent time at which a bugnote associated with the bug was modified
Tags:
Parameters
int |
$p_bug_id |
p_bug_id integer representing bug id |
bug_get_row [line 1204]
array bug_get_row(
int $p_bug_id)
|
|
Returns the record of the specified bug
Tags:
Parameters
int |
$p_bug_id |
p_bug_id integer representing bug id |
bug_get_text_field [line 1261]
string bug_get_text_field(
int $p_bug_id, string $p_field_name)
|
|
return the specified text field of the given bug if the field does not exist, display a warning and return ''
Tags:
Parameters
int |
$p_bug_id |
p_bug_id integer representing bug id |
string |
$p_field_name |
p_fieldname field name |
bug_is_overdue [line 845]
bool bug_is_overdue(
int $p_bug_id)
|
|
Check if a given bug is overdue
Tags:
Parameters
int |
$p_bug_id |
p_bug_id integer representing bug id |
bug_is_readonly [line 813]
bool bug_is_readonly(
int $p_bug_id)
|
|
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.
Tags:
Parameters
int |
$p_bug_id |
p_bug_id integer representing bug id |
bug_is_resolved [line 833]
bool bug_is_resolved(
int $p_bug_id)
|
|
Check if a given bug is resolved
Tags:
Parameters
int |
$p_bug_id |
p_bug_id integer representing bug id |
bug_is_user_handler [line 795]
bool bug_is_user_handler(
int $p_bug_id, int $p_user_id)
|
|
check if the given user is the handler of the bug
Tags:
Parameters
int |
$p_bug_id |
p_bug_id integer representing bug id |
int |
$p_user_id |
p_user_id integer reprenting a user id |
bug_is_user_reporter [line 780]
bool bug_is_user_reporter(
int $p_bug_id, int $p_user_id)
|
|
check if the given user is the reporter of the bug
Tags:
Parameters
int |
$p_bug_id |
p_bug_id integer representing bug id |
int |
$p_user_id |
p_user_id integer reprenting a user id |
bug_monitor [line 1709]
true bug_monitor(
int $p_bug_id, int $p_user_id)
|
|
enable monitoring of this bug for the user
Tags:
Parameters
int |
$p_bug_id |
p_bug_id integer representing bug ids |
int |
$p_user_id |
p_user_id integer representing user ids |
bug_monitor_copy [line 1750]
bool bug_monitor_copy(
int $p_source_bug_id, int $p_dest_bug_id)
|
|
Copy list of users monitoring a bug to the monitor list of a second bug
Tags:
Parameters
int |
$p_source_bug_id |
p_source_bug_id integer representing the bug ID of the source bug |
int |
$p_dest_bug_id |
p_dest_bug_id integer representing the bug ID of the destination bug |
bug_reopen [line 1661]
bool bug_reopen(
int $p_bug_id, [string $p_bugnote_text = ''], [string $p_time_tracking = '0:00'], [bool $p_bugnote_private = false])
|
|
reopen the given bug
Tags:
Parameters
int |
$p_bug_id |
p_bug_id |
string |
$p_bugnote_text |
p_bugnote_text |
string |
$p_time_tracking |
p_time_tracking |
bool |
$p_bugnote_private |
p_bugnote_private |
bug_resolve [line 1578]
bool 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'])
|
|
resolve the given bug
Tags:
Parameters
|
$p_bug_id |
|
|
$p_resolution |
|
|
$p_fixed_in_version |
|
|
$p_bugnote_text |
|
|
$p_duplicate_id |
|
|
$p_handler_id |
|
|
$p_bugnote_private |
|
|
$p_time_tracking |
|
bug_row_to_object [line 1227]
void bug_row_to_object(
$p_row)
|
|
Parameters
bug_set_field [line 1401]
bool bug_set_field(
int $p_bug_id, string $p_field_name, any $p_value)
|
|
Set the value of a bug field
Tags:
Parameters
int |
$p_bug_id |
p_bug_id integer representing bug id |
string |
$p_field_name |
p_field_name pre-defined field name |
any |
$p_value |
p_value value to set |
bug_text_cache_row [line 693]
bool|array bug_text_cache_row(
int $p_bug_id, [bool $p_trigger_errors = true])
|
|
Cache a bug text row if necessary and return the cached copy
Tags:
Parameters
int |
$p_bug_id |
p_bug_id integer bug id to retrieve text for |
bool |
$p_trigger_errors |
p_trigger_errors If the second parameter is true (default), trigger an error if bug text not found. |
bug_text_clear_cache [line 734]
null bug_text_clear_cache(
[int $p_bug_id = null])
|
|
Clear a bug's bug text from the cache or all bug text if no bug id specified.
Tags:
Parameters
int |
$p_bug_id |
bug id to clear (optional) |
bug_unmonitor [line 1783]
bool bug_unmonitor(
int $p_bug_id, int $p_user_id)
|
|
disable monitoring of this bug for the user if $p_user_id = null, then bug is unmonitored for all users.
Tags:
Parameters
int |
$p_bug_id |
p_bug_id integer representing bug ids |
int |
$p_user_id |
p_user_id integer representing user ids |
bug_update_date [line 1684]
bool bug_update_date(
int $p_bug_id)
|
|
updates the last_updated field
Tags:
Parameters
int |
$p_bug_id |
p_bug_id integer representing bug ids |
|
|