View Issue Details

IDProjectCategoryView StatusLast Update
0025372mantisbtcustom fieldspublic2019-09-26 16:42
Reportersmartmantis Assigned Todregad  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionduplicate 
Product Version2.19.0 
Summary0025372: custom fields with default value unable to saved ot database if they are not on the report issue page
Description

If i have a custom field with default value but the field is not shown on the report issue page, it's not saved to the database.

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).
TagsNo tags attached.

Relationships

duplicate of 0026151 new Custom fields required but not displayed should be filled with the default value 

Activities

zeroion

zeroion

2019-08-22 11:01

reporter   ~0062627

I'm also experiencing this error.