View Revisions: Issue #25372

Summary 0025372: custom fields with default value unable to saved ot database if they are not on the report issue page
Revision 2019-08-23 03:48 by dregad
Steps To Reproduce

Something went wrong in the new bug_report.php somewhere here:

# Produce an error if the field is required but wasn't posted
if( gpc_isset_custom_field( $t_id, $t_def['type'] ) ) {
  $t_custom_fields[] = array('field' => array( 'id' => $t_id ),'value' => gpc_get_custom_field( 'custom_field_' . $t_id, $t_def['type'], null ));
  1. this is not generate errors anymore, maybe comment left there from the old bug_report.php where this if has one more parameter && $t_def['require_report'] and trigger an error, not build the $t_custom_fields array.
  2. gpc will never check any default value and never call the custom function of the custom field (#function_string_value).
Revision 2019-01-23 10:00 by smartmantis
Steps To Reproduce

Something went wrong in the new bug_report.php somewhere here:

Produce an error if the field is required but wasn't posted

if( gpc_isset_custom_field( $t_id, $t_def['type'] ) ) {
$t_custom_fields[] = array('field' => array( 'id' => $t_id ),'value' => gpc_get_custom_field( 'customfield' . $t_id, $t_def['type'], null ));

  1. this is not generate errors anymore, maybe comment left there from the old bug_report.php where this if has one more parameter && $t_def['require_report'] and trigger an error, not build the $t_custom_fields array.
  2. gpc will never check any default value and never call the custom function of the custom field (#function_string_value).