Code: Select all
function custom_function_override_issue_update_validate( $p_issue_id, BugData $p_new_issue_data, $p_bugnote_text ) {
$t_issue = bug_get( $p_issue_id );
if ($t_issue->status == INVESTIGATE && $p_new_issue_data->status == Proposal) {
// Get the values for the fields
$annual_costs = custom_field_get_value('Estimated Annual Costs', $p_issue_id);
$est_hours = custom_field_get_value('Estimated Hours', $p_issue_id);
$est_costs = custom_field_get_value('Estimated Initial Costs', $p_issue_id);
// At least one of these fields must have a non-zero value, otherwise, throw
// an exception
if ($annual_costs == 0.0 && $est_hours == 0.0 && $est_costs == 0.0) {
error_parameters('this is testing to verify override function is activated');
trigger_error(ERROR_VALIDATE_FAILURE, ERROR);
}
}
}
Basically, I need to know if there is some technique I can use to debug. I tried using printf statements but I don't know where the results are displayed and, AFAIK, there is no debugger (like GDB) which I can use to set breakpoints and examine variables.