[ Index ]

PHP Cross Reference of MantisBT

title

Body

[close]

/core/ -> bugnote_api.php (summary)

Bugnote 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: 719 lines (22 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

BugnoteData:: (19 methods):
  bugnote_exists()
  bugnote_ensure_exists()
  bugnote_is_user_reporter()
  bugnote_add()
  bugnote_delete()
  bugnote_delete_all()
  bugnote_get_text()
  bugnote_get_field()
  bugnote_get_latest_id()
  bugnote_get_all_visible_bugnotes()
  bugnote_get_all_bugnotes()
  bugnote_set_time_tracking()
  bugnote_date_update()
  bugnote_set_text()
  bugnote_set_view_state()
  bugnote_format_id()
  bugnote_stats_get_events_array()
  bugnote_stats_get_project_array()
  bugnote_clear_cache()


Class: BugnoteData  - X-Ref

Bugnote Data Structure Definition

bugnote_exists( $p_bugnote_id )   X-Ref
Check if a bugnote with the given ID exists
return true if the bugnote exists, false otherwise

param: int $p_bugnote_id bugnote id
return: bool

bugnote_ensure_exists( $p_bugnote_id )   X-Ref
Check if a bugnote with the given ID exists
return true if the bugnote exists, raise an error if not

param: int $p_bugnote_id bugnote id

bugnote_is_user_reporter( $p_bugnote_id, $p_user_id )   X-Ref
Check if the given user is the reporter of the bugnote
return true if the user is the reporter, false otherwise

param: int $p_bugnote_id bugnote id
param: int $p_user_id user id
return: bool

bugnote_add( $p_bug_id, $p_bugnote_text, $p_time_tracking = '0:00', $p_private = false, $p_type = 0, $p_attr = '', $p_user_id = null, $p_send_email = TRUE, $p_date_submitted = 0, $p_last_modified = 0, $p_skip_bug_update = FALSE )   X-Ref
Add a bugnote to a bug
return the ID of the new bugnote

param: int $p_bug_id bug id
param: string $p_bugnote_text bugnote text
param: string $p_time_tracking hh:mm string
param: bool $p_private whether bugnote is private
param: int $p_type bugnote type
param: string $p_attr
param: int $p_user_id user id
param: bool $p_send_email generate email?
param: int $p_date_submitted date submitted (defaults to now())
param: int $p_last_modified last modification date (defaults to now())
param: bool $p_skip_bug_update skip bug last modification update (useful when importing bugs/bugnotes)
return: false|int false or indicating bugnote id added

bugnote_delete( $p_bugnote_id )   X-Ref
Delete a bugnote

param: int $p_bugnote_id bug note id
return: bool

bugnote_delete_all( $p_bug_id )   X-Ref
delete all bugnotes associated with the given bug

param: int $p_bug_id bug id
return: bool

bugnote_get_text( $p_bugnote_id )   X-Ref
Get the text associated with the bugnote

param: int $p_bugnote_id bugnote id
return: string bugnote text

bugnote_get_field( $p_bugnote_id, $p_field_name )   X-Ref
Get a field for the given bugnote

param: int $p_bugnote_id bugnote id
param: string $p_field_name field name
return: string field value

bugnote_get_latest_id( $p_bug_id )   X-Ref
Get latest bugnote id

param: int $p_bug_id bug id
return: int latest bugnote id

bugnote_get_all_visible_bugnotes( $p_bug_id, $p_user_bugnote_order, $p_user_bugnote_limit, $p_user_id = null )   X-Ref
Build the bugnotes array for the given bug_id filtered by specified $p_user_access_level.
Bugnotes are sorted by date_submitted according to 'bugnote_order' configuration setting.
Return BugnoteData class object with raw values from the tables except the field
last_modified - it is UNIX_TIMESTAMP.

param: int $p_bug_id bug id
param: int $p_user_bugnote_order sort order
param: int $p_user_bugnote_limit number of bugnotes to display to user
param: int $p_user_id user id
return: array array of bugnotes

bugnote_get_all_bugnotes( $p_bug_id )   X-Ref
Build the bugnotes array for the given bug_id.
Return BugnoteData class object with raw values from the tables except the field
last_modified - it is UNIX_TIMESTAMP.
The data is not filtered by VIEW_STATE !!

param: int $p_bug_id bug id
return: array array of bugnotes

bugnote_set_time_tracking( $p_bugnote_id, $p_time_tracking )   X-Ref
Update the time_tracking field of the bugnote

param: int $p_bugnote_id bugnote id
param: string $p_time_tracking timetracking string (hh:mm format)
return: bool

bugnote_date_update( $p_bugnote_id )   X-Ref
Update the last_modified field of the bugnote

param: int $p_bugnote_id bugnote id
return: bool

bugnote_set_text( $p_bugnote_id, $p_bugnote_text )   X-Ref
Set the bugnote text

param: int $p_bugnote_id bugnote id
param: string $p_bugnote_text bugnote text
return: bool

bugnote_set_view_state( $p_bugnote_id, $p_private )   X-Ref
Set the view state of the bugnote

param: int $p_bugnote_id bugnote id
param: bool $p_private
return: bool

bugnote_format_id( $p_bugnote_id )   X-Ref
Pad the bugnote id with the appropriate number of zeros for printing

param: int $p_bugnote_id bugnote id
return: string

bugnote_stats_get_events_array( $p_bug_id, $p_from, $p_to )   X-Ref
Returns an array of bugnote stats

param: int $p_bug_id bug id
param: string $p_from Starting date (yyyy-mm-dd) inclusive, if blank, then ignored.
param: string $p_to Ending date (yyyy-mm-dd) inclusive, if blank, then ignored.
return: array array of bugnote stats

bugnote_stats_get_project_array( $p_project_id, $p_from, $p_to, $p_cost )   X-Ref
Returns an array of bugnote stats

param: int $p_project_id project id
param: string $p_from Starting date (yyyy-mm-dd) inclusive, if blank, then ignored.
param: string $p_to Ending date (yyyy-mm-dd) inclusive, if blank, then ignored.
param: int $p_cost cost
return: array array of bugnote stats

bugnote_clear_cache( $p_bugnote_id = null )   X-Ref
Clear a bugnote from the cache or all bug notes if no bugnote id specified.

param: int bugnote id to clear (optional)
return: null



Generated: Thu Jul 28 15:48:31 2011 Cross-referenced by PHPXref 0.7