View Issue Details

IDProjectCategoryView StatusLast Update
0016014mantisbtcustom fieldspublic2013-06-05 16:18
Reporterrafacamargo Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
OSWindowsOS Version7 
Product Version1.2.11 
Summary0016014: Error when you submit an issue with an Email custom field not visible
Description

Error when you submit an issue with an Email custom field not visible

Steps To Reproduce

[Steps]
1)Create a custom field:

  • Type: Email
  • Mandatory: false to all cases
  • Show on Report page: false
  • Link it to a project
    2)Try to report an issue in the project which the field was linked to

[Behavior]
Application error is shown: email invalid.

[Expected behavior]
Like any other field, it should not throw an error if the field is not shown in the page, because it's not mandatory.

Additional Information

I fixed this issue changing the function custom_field_validate.
In custom_field_api file, near line 1209 (case CUSTOM_FIELD_TYPE_EMAIL:).
Old code: if ( $p_value !== '' ) {

New code: if ( $p_value !== '' && $p_value !== null ) {

TagsNo tags attached.

Activities

There are no notes attached to this issue.