Relationship Graph

Relationship Graph
related to related to child of child of duplicate of duplicate of

View Issue Details

IDProjectCategoryView StatusLast Update
0011057mantisbtcustom fieldspublic2010-04-23 23:23
Reporterxyz123 Assigned Tovboctor  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionduplicate 
Product Version1.2.0rc2 
Summary0011057: Failed to validate required custom fields
Description

Custom fields are defined as Required. The "empty field" validation on them doesn't work in both bug_report.php and bug_update.php.

As a quick fix, in bug_report.php, I have to replace
if ( $t_def['require_report'] && !gpc_isset_custom_field( $t_id, $t_def['type'] ) ) {

with,
if ( $t_def['require_report'] && trim(gpc_get_custom_field( "customfield$t_id", $t_def['type'])) == '' ) {

I'm not sure why gpc_isset_custom_field doesn't work.

Likewise, in bug_update.php, I replace
if ( $tdef['require' . $t_custom_status_label] && !gpc_isset_custom_field( $t_id, $t_def['type'] ) ) {

with,
if ( $tdef['require' . $t_custom_status_label] && trim(gpc_get_custom_field( "customfield$t_id", $t_def['type'])) == '' ) {

Of course, the best way is to fix gpc_isset_custom_field. I'll leave that to the experts. I'm surprised it has been a long outstanding bug since 1.1.x.

Tagspatch

Relationships

duplicate of 0010670 closedvboctor Custom fields required do not work 

Activities

There are no notes attached to this issue.