View Issue Details

IDProjectCategoryView StatusLast Update
0011918mantisbtcustom fieldspublic2010-09-19 03:12
Reporterjurgenhaas Assigned Toatrol  
PriorityurgentSeverityblockReproducibilityalways
Status closedResolutionduplicate 
Product Version1.2.1 
Summary0011918: Can't create new issues since I created a list type custom field
Description

I've added a custom field of type "list" and defined 4 possible values for the list and the first one ist defined as the default value. This custom field is defined to only be visible when editing an issue, not while creating it.

So, when I now create a new issue´, the field is not displayed which is correct. But when I click on "Save" I get an Application Error #11 which says that the required field is empty.

What can I do about that? I gues this is a bug, isn't it?

TagsNo tags attached.

Relationships

duplicate of 0011684 closedvboctor Incorrect error "A necessary field "MyField" was empty. Please recheck your inputs." when submitting new issue 

Activities

picochip

picochip

2010-05-21 09:43

reporter   ~0025573

I think I also have the same problem. Trying to upgrade from version 1.1.1, a custom field called "In ReleaseNotes" has stopped working.
It's an enumeration with possible values:
"|Yes|Not required"
and is only required on Resolve, not on Report or Update. With Mantis 1.2.1 it now produces the following error:

"APPLICATION ERROR #11

A necessary field "In ReleaseNotes" was empty. Please recheck your inputs"
Thanks,
Andy

cas

cas

2010-05-21 10:08

reporter   ~0025574

Or make it non mandatory or show on the create report

jurgenhaas

jurgenhaas

2010-05-21 10:11

reporter   ~0025575

@cas, yes obviously that would work but it's not really a suitable solution. None of the both suggestions.

picochip

picochip

2010-05-21 10:21

reporter   ~0025576

It doesn't seem to be all types that are affected. Looking at the code in bug_report.php there seems to be a block which stops enumerations, lists, multilists and radio buttons!

Line 106:

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

    if ( !gpc_isset_custom_field( $t_id, $t_def['type'] ) &&
        ( $t_def['require_report'] ||
            $t_def['type'] == CUSTOM_FIELD_TYPE_ENUM ||
            $t_def['type'] == CUSTOM_FIELD_TYPE_LIST ||
            $t_def['type'] == CUSTOM_FIELD_TYPE_MULTILIST ||
            $t_def['type'] == CUSTOM_FIELD_TYPE_RADIO ) ) {
        error_parameters( lang_get_defaulted( custom_field_get_field( $t_id, 'name' ) ) );
        trigger_error( ERROR_EMPTY_FIELD, ERROR );
    }

Really not sure what this meant to be doing and it's certainly very different from the version in 1.1.1 which doesn't have any of these explicit checks.

Andy

picochip

picochip

2010-05-21 10:37

reporter   ~0025577

As far as I can see removing these tests:
$t_def['type'] == CUSTOM_FIELD_TYPE_ENUM ||
$t_def['type'] == CUSTOM_FIELD_TYPE_LIST ||
$t_def['type'] == CUSTOM_FIELD_TYPE_MULTILIST ||
$t_def['type'] == CUSTOM_FIELD_TYPE_RADIO )
makes it work as I want it to!