This is a new bug in Mantis 1.0.0a3
In bug_report.php
There is the original code:
if ( !custom_field_validate( $t_id, gpc_get_custom_field( "custom_field_$t_id", $t_def['type'], $t_def['default_value'] ) ) ) {
error_parameters( lang_get_defaulted( custom_field_get_field( $t_id, 'name' ) ) );
trigger_error( ERROR_CUSTOM_FIELD_INVALID_VALUE, ERROR );
}
Here is my optional resolution:
-----------------------------------
if ( ($t_def['display_report'] || $t_def['require_report']) && ( !custom_field_validate( $t_id, gpc_get_custom_field( "custom_field_$t_id", $t_def['type'], $t_def['default_value'] ) ) )) {
error_parameters( lang_get_defaulted( custom_field_get_field( $t_id, 'name' ) ) );
trigger_error( ERROR_CUSTOM_FIELD_INVALID_VALUE, ERROR );
}
Because some of custom fields doesn't approach on the bug report page,
and the user cannot fill them, but the system try to validate them.
(Because the diplay_report field is set to null.)
At the same bug :
# Handle custom field submission
$t_def = custom_field_get_definition( $t_id );
if( !custom_field_set_value( $t_id, $t_bug_id, gpc_get_custom_field( "custom_field_$t_id", $t_def['type'], $t_def['default_value'] ) ) ) {
error_parameters( lang_get_defaulted( custom_field_get_field( $t_id, 'name' ) ) );
trigger_error( ERROR_CUSTOM_FIELD_INVALID_VALUE, ERROR );
}
Here is my optional resolution:
-----------------------------------
if( ($t_def['display_report'] || $t_def['require_report']) && ( !custom_field_set_value( $t_id, $t_bug_id, gpc_get_custom_field( "custom_field_$t_id", $t_def['type'], $t_def['default_value'] ) ) ) ){
error_parameters( lang_get_defaulted( custom_field_get_field( $t_id, 'name' ) ) );
trigger_error( ERROR_CUSTOM_FIELD_INVALID_VALUE, ERROR );
}
Mantis Custom Field Bug
Moderators: Developer, Contributor
Use the bugtracker to report issues:
http://bugs.mantisbt.org/
---
BTW: I do not forget to use the search function to check your problem, by this way you can avoid to create a duplicate issue.
http://bugs.mantisbt.org/
---
BTW: I do not forget to use the search function to check your problem, by this way you can avoid to create a duplicate issue.