Get help from other users here.
Moderators: Developer , Contributor
deboutv
Posts: 507 Joined: 15 Jan 2007, 14:31
Location: La Ciotat, FRANCE
Contact:
Post
by deboutv » 04 Mar 2009, 07:50
Yes of course, you need to merge the two functions in only one.
monotek
Posts: 24 Joined: 01 Jul 2008, 16:20
Post
by monotek » 04 Mar 2009, 08:04
Thanks a lot.
It works now
Code: Select all
define( 'ERROR_BUG_UPDATE_VALIDATE_FAILURE', 10001 );
function custom_function_override_issue_update_validate( $p_issue_id, $p_new_issue_data, $p_bugnote_text ) {
$t_resolved = config_get( 'bug_resolved_status_threshold' );
if ( bug_get_field( $p_issue_id, 'status' ) != $p_new_issue_data->status &&
$p_new_issue_data->status == $t_resolved && trim( $p_new_issue_data->fixed_in_version ) == '' ) {
trigger_error( ERROR_BUG_UPDATE_VALIDATE_FAILURE, ERROR );
}
if ( bug_get_field( $p_issue_id, 'status' ) != $p_new_issue_data->status &&
$p_new_issue_data->status == $t_resolved && trim( $p_bugnote_text ) == '' ) {
trigger_error( ERROR_BUG_UPDATE_VALIDATE_FAILURE2, ERROR );
}
}
Code: Select all
if ( lang_get_current() == 'french' ) {
$MANTIS_ERROR[ERROR_BUG_UPDATE_VALIDATE_FAILURE] = 'Une note doit être renseignée.';
} else {
$MANTIS_ERROR[ERROR_BUG_UPDATE_VALIDATE_FAILURE] = 'The bugnote must be filled.';
}
if ( lang_get_current() == 'french' ) {
$MANTIS_ERROR[ERROR_BUG_UPDATE_VALIDATE_FAILURE2] = 'Le champs Fixé dans la version doit être renseigné.';
} else {
$MANTIS_ERROR[ERROR_BUG_UPDATE_VALIDATE_FAILURE2] = 'The field Fixed in version must be filled.';
}
monotek
Posts: 24 Joined: 01 Jul 2008, 16:20
Post
by monotek » 06 Mar 2009, 08:43
One last Question.
Is it also possible to mark this fileds with a star now, via custom_functions.php?
deboutv
Posts: 507 Joined: 15 Jan 2007, 14:31
Location: La Ciotat, FRANCE
Contact:
Post
by deboutv » 06 Mar 2009, 15:08
No you need to modify directly the PHP file.