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

Procedural File: bugnote_api.php

Source Location: /core/bugnote_api.php

Page Details

BugNote API

Copyright:  Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
Copyright:  Copyright (C) 2002 - 2009 MantisBT Team - mantisbt-dev@lists.sourceforge.net
Link:  http://www.mantisbt.org
Usedby:  bug_reopen()
Usedby:  access_api.php
Classes
Class Description
BugnoteData Bugnote Data Structure Definition
Includes
require_once ($t_core_dir.'current_user_api.php') [line 31]

requires current_user_api

[ Top ]

require_once ($t_core_dir.'bug_api.php') [line 43]

requires bug_api

[ Top ]

require_once ($t_core_dir.'history_api.php') [line 39]

requires history_api

[ Top ]

require_once ($t_core_dir.'email_api.php') [line 35]

requires email_api

[ Top ]


Functions
bugnote_add  [line 128]

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

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?

API Tags:
Return:  false or indicating bugnote id added
Access:  public


[ Top ]
bugnote_date_update  [line 474]

bool bugnote_date_update( int $p_bugnote_id  )

Update the last_modified field of the bugnote

Parameters:
int   $p_bugnote_id:  bugnote id

API Tags:
Access:  public


[ Top ]
bugnote_delete  [line 205]

bool bugnote_delete( int $p_bugnote_id  )

Delete a bugnote

Parameters:
int   $p_bugnote_id:  bug note id

API Tags:
Access:  public


[ Top ]
bugnote_delete_all  [line 234]

bool bugnote_delete_all( int $p_bug_id  )

delete all bugnotes associated with the given bug

Parameters:
int   $p_bug_id:  bug id

API Tags:
Access:  public


[ Top ]
bugnote_ensure_exists  [line 92]

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

Parameters:
int   $p_bugnote_id:  bugnote id

API Tags:
Access:  public


[ Top ]
bugnote_exists  [line 70]

bool bugnote_exists( int $p_bugnote_id  )

Check if a bugnote with the given ID exists

return true if the bugnote exists, false otherwise

Parameters:
int   $p_bugnote_id:  bugnote id

API Tags:
Access:  public


[ Top ]
bugnote_format_id  [line 547]

string bugnote_format_id( int $p_bugnote_id  )

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

Parameters:
int   $p_bugnote_id:  bugnote id

API Tags:
Access:  public


[ Top ]
bugnote_get_all_bugnotes  [line 380]

array bugnote_get_all_bugnotes( int $p_bug_id, int $p_user_bugnote_order, int $p_user_bugnote_limit  )

Build the bugnotes array for the given bug_id. 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. The data is not filtered by VIEW_STATE !!

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

API Tags:
Return:  array of bugnotes
Access:  public


[ Top ]
bugnote_get_all_visible_bugnotes  [line 334]

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.

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

API Tags:
Return:  array of bugnotes
Access:  public


[ Top ]
bugnote_get_field  [line 290]

string bugnote_get_field( int $p_bugnote_id, string $p_field_name  )

Get a field for the given bugnote

Parameters:
int   $p_bugnote_id:  bugnote id
string   $p_field_name:  field name

API Tags:
Return:  field value
Access:  public


[ Top ]
bugnote_get_latest_id  [line 309]

int bugnote_get_latest_id( int $p_bug_id  )

Get latest bugnote id

Parameters:
int   $p_bug_id:  bug id

API Tags:
Return:  latest bugnote id
Access:  public


[ Top ]
bugnote_get_text  [line 270]

string bugnote_get_text( int $p_bugnote_id  )

Get the text associated with the bugnote

Parameters:
int   $p_bugnote_id:  bugnote id

API Tags:
Return:  bugnote text
Access:  public


[ Top ]
bugnote_is_user_reporter  [line 106]

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

Parameters:
int   $p_bugnote_id:  bugnote id
int   $p_user_id:  user id

API Tags:
Access:  public


[ Top ]
bugnote_set_text  [line 494]

bool bugnote_set_text( int $p_bugnote_id, string $p_bugnote_text  )

Set the bugnote text

Parameters:
int   $p_bugnote_id:  bugnote id
string   $p_bugnote_text:  bugnote text

API Tags:
Access:  public


[ Top ]
bugnote_set_time_tracking  [line 454]

bool bugnote_set_time_tracking( int $p_bugnote_id, string $p_time_tracking  )

Update the time_tracking field of the bugnote

Parameters:
int   $p_bugnote_id:  bugnote id
string   $p_time_tracking:  timetracking string (hh:mm format)

API Tags:
Access:  public


[ Top ]
bugnote_set_view_state  [line 519]

bool bugnote_set_view_state( int $p_bugnote_id, bool $p_private  )

Set the view state of the bugnote

Parameters:
int   $p_bugnote_id:  bugnote id
bool   $p_private: 

API Tags:
Access:  public


[ Top ]
bugnote_stats_get_events_array  [line 561]

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

Returns an array of bugnote stats

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.

API Tags:
Return:  array of bugnote stats
Access:  public


[ Top ]
bugnote_stats_get_project_array  [line 608]

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

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

API Tags:
Return:  array of bugnote stats
Access:  public


[ Top ]


Documentation generated on Sun, 05 Apr 2009 23:00:55 +0100 by phpDocumentor 1.4.1