CoreAPI
[ class tree: CoreAPI ] [ index: CoreAPI ] [ all elements ]

Procedural File: bugnote_api.php

Source Location: /core/bugnote_api.php



Classes:

BugnoteData
Bugnote Data Structure Definition


Page Details:

BugNote API



Tags:

copyright:  Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
copyright:  Copyright (C) 2002 - 2010 MantisBT Team - mantisbt-dev@lists.sourceforge.net
link:  http://www.mantisbt.org
usedby:  bug_reopen()
usedby:  access_api.php


Includes:

require_once('history_api.php') [line 37]
requires history_api

require_once('current_user_api.php') [line 29]
requires current_user_api

require_once('bug_api.php') [line 41]
requires bug_api

require_once('email_api.php') [line 33]
requires email_api







bugnote_add [line 126]

false|int bugnote_add( int $p_bug_id, string $p_bugnote_text, [string $p_time_tracking = '0:00'], [bool $p_private = false], [int $p_type = 0], [string $p_attr = ''], [int $p_user_id = null], [bool $p_send_email = TRUE])

Add a bugnote to a bug

return the ID of the new bugnote




Tags:

return:  false or indicating bugnote id added
access:  public


Parameters

int   $p_bug_id   bug id
string   $p_bugnote_text   bugnote text
string   $p_time_tracking   hh:mm string
bool   $p_private   whether bugnote is private
int   $p_type   bugnote type
string   $p_attr  
int   $p_user_id   user id
bool   $p_send_email   generate email?
[ Top ]



bugnote_clear_cache [line 700]

null bugnote_clear_cache( [int $p_bugnote_id = null])

Clear a bugnote from the cache or all bug notes if no bugnote id specified.



Tags:

access:  public


Parameters

int   $p_bugnote_id   bugnote id to clear (optional)
[ Top ]



bugnote_date_update [line 486]

bool bugnote_date_update( int $p_bugnote_id)

Update the last_modified field of the bugnote



Tags:

access:  public


Parameters

int   $p_bugnote_id   bugnote id
[ Top ]



bugnote_delete [line 220]

bool bugnote_delete( int $p_bugnote_id)

Delete a bugnote



Tags:

access:  public


Parameters

int   $p_bugnote_id   bug note id
[ Top ]



bugnote_delete_all [line 247]

bool bugnote_delete_all( int $p_bug_id)

delete all bugnotes associated with the given bug



Tags:

access:  public


Parameters

int   $p_bug_id   bug id
[ Top ]



bugnote_ensure_exists [line 90]

void bugnote_ensure_exists( int $p_bugnote_id)

Check if a bugnote with the given ID exists

return true if the bugnote exists, raise an error if not




Tags:

access:  public


Parameters

int   $p_bugnote_id   bugnote id
[ Top ]



bugnote_exists [line 68]

bool bugnote_exists( int $p_bugnote_id)

Check if a bugnote with the given ID exists

return true if the bugnote exists, false otherwise




Tags:

access:  public


Parameters

int   $p_bugnote_id   bugnote id
[ Top ]



bugnote_format_id [line 576]

string bugnote_format_id( int $p_bugnote_id)

Pad the bugnote id with the appropriate number of zeros for printing



Tags:

access:  public


Parameters

int   $p_bugnote_id   bugnote id
[ Top ]



bugnote_get_all_bugnotes [line 407]

array bugnote_get_all_bugnotes( int $p_bug_id)

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 !!




Tags:

return:  array of bugnotes
access:  public


Parameters

int   $p_bug_id   bug id
[ Top ]



bugnote_get_all_visible_bugnotes [line 353]

array bugnote_get_all_visible_bugnotes( int $p_bug_id, int $p_user_bugnote_order, int $p_user_bugnote_limit, [int $p_user_id = null])

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.




Tags:

return:  array of bugnotes
access:  public


Parameters

int   $p_bug_id   bug id
int   $p_user_bugnote_order   sort order
int   $p_user_bugnote_limit   number of bugnotes to display to user
int   $p_user_id   user id
[ Top ]



bugnote_get_field [line 303]

string bugnote_get_field( int $p_bugnote_id, string $p_field_name)

Get a field for the given bugnote



Tags:

return:  field value
access:  public


Parameters

int   $p_bugnote_id   bugnote id
string   $p_field_name   field name
[ Top ]



bugnote_get_latest_id [line 328]

int bugnote_get_latest_id( int $p_bug_id)

Get latest bugnote id



Tags:

return:  latest bugnote id
access:  public


Parameters

int   $p_bug_id   bug id
[ Top ]



bugnote_get_text [line 283]

string bugnote_get_text( int $p_bugnote_id)

Get the text associated with the bugnote



Tags:

return:  bugnote text
access:  public


Parameters

int   $p_bugnote_id   bugnote id
[ Top ]



bugnote_is_user_reporter [line 104]

bool bugnote_is_user_reporter( int $p_bugnote_id, int $p_user_id)

Check if the given user is the reporter of the bugnote

return true if the user is the reporter, false otherwise




Tags:

access:  public


Parameters

int   $p_bugnote_id   bugnote id
int   $p_user_id   user id
[ Top ]



bugnote_set_text [line 506]

bool bugnote_set_text( int $p_bugnote_id, string $p_bugnote_text)

Set the bugnote text



Tags:

access:  public


Parameters

int   $p_bugnote_id   bugnote id
string   $p_bugnote_text   bugnote text
[ Top ]



bugnote_set_time_tracking [line 466]

bool bugnote_set_time_tracking( int $p_bugnote_id, string $p_time_tracking)

Update the time_tracking field of the bugnote



Tags:

access:  public


Parameters

int   $p_bugnote_id   bugnote id
string   $p_time_tracking   timetracking string (hh:mm format)
[ Top ]



bugnote_set_view_state [line 548]

bool bugnote_set_view_state( int $p_bugnote_id, bool $p_private)

Set the view state of the bugnote



Tags:

access:  public


Parameters

int   $p_bugnote_id   bugnote id
bool   $p_private  
[ Top ]



bugnote_stats_get_events_array [line 590]

array bugnote_stats_get_events_array( int $p_bug_id, string $p_from, string $p_to)

Returns an array of bugnote stats



Tags:

return:  array of bugnote stats
access:  public


Parameters

int   $p_bug_id   bug id
string   $p_from   Starting date (yyyy-mm-dd) inclusive, if blank, then ignored.
string   $p_to   Ending date (yyyy-mm-dd) inclusive, if blank, then ignored.
[ Top ]



bugnote_stats_get_project_array [line 637]

array bugnote_stats_get_project_array( int $p_project_id, string $p_from, string $p_to, int $p_cost)

Returns an array of bugnote stats



Tags:

return:  array of bugnote stats
access:  public


Parameters

int   $p_project_id   project id
string   $p_from   Starting date (yyyy-mm-dd) inclusive, if blank, then ignored.
string   $p_to   Ending date (yyyy-mm-dd) inclusive, if blank, then ignored.
int   $p_cost   cost
[ Top ]



Documentation generated on Sun, 12 Dec 2010 23:50:07 +0900 by phpDocumentor 1.4.3
inserted by FC2 system