Time_tracking required custom function

Post about your customizations to share with others.

Moderators: Developer, Contributor

Post Reply
Posts: 1
Joined: Mar 28, 2019 12:25 pm

Time_tracking required custom function

Post by bentobox »

Hi, I wanted to share if anyone else needed or propose a change to custom function.

I ran into a issue where I needed my developers to make sure they used the time tracking function, the following changes were required.


# Allow a custom function to validate the proposed bug updates. Note that
# custom functions are being deprecated in MantisBT. You should migrate to
# the new plugin system instead.
helper_call_custom_function( 'issue_update_validate', array( $f_bug_id, $t_updated_bug, $t_bug_note ) );

helper_call_custom_function( 'issue_update_validate', array( $f_bug_id, $t_updated_bug, $t_bug_note->note ) );

custom function
function custom_function_override_issue_update_validate( $p_issue_id, $p_bug_data, $p_bugnote) {
if( $p_bug_data->status == CLOSED ) {
if ( helper_duration_to_minutes( $p_bugnote->time_tracking ) == 0 ) {
error_parameters( 'time tracking = 0 ' );

Please note this change allows access to t_bug_note variable which previously did not have full access to this variable and only the text.

Post Reply