View Issue Details

IDProjectCategoryView StatusLast Update
0016954mantisbtcustom fieldspublic2019-09-26 16:41
Reporterbadfiles Assigned Todregad  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionduplicate 
Product Version1.2.17 
Summary0016954: Date type custom field with a default value set might result in application error on a new bug adding
Description

The issue is conditional

Steps To Reproduce

Set a default value to a date type custom filed.
Make it shown on a new bug adding.
Do not require it.
Try adding a new bug blanking the date.

You will get the bug added with an empty field (just as desired) and the application error shown.
If you had not set a default value, an empty date field would not cause an error.

TagsNo tags attached.

Relationships

duplicate of 0016952 new When reporting issue receive error on custom field, but issue is still created 
related to 0017354 closedcproensa Non-required custom fields with a minimum length fail to validate 

Activities

badfiles

badfiles

2014-02-11 15:03

reporter   ~0039376

seems like it's a dupe of 0016952

badfiles

badfiles

2014-02-15 07:29

reporter   ~0039411

This is how I've overridden the problem with an empty date field, but the problem is more complex – an error in a custom field does not prevent new bug to be inserted into the database.
Also a reporter is suggested to go back and fix the issue, and if one does so, an identical bug will be added.

https://github.com/badfiles/mantisbt/commit/4bbe25949154849b065f4e94565a2d3c7eb31c7d

ftaysse

ftaysse

2014-07-24 12:45

reporter   ~0040969

Last edited: 2014-07-24 12:47

View 3 revisions

Related to 0017354
Custom fields that are not required are still validated (twice)

In file bug_report.php:
Line 165: if( !custom_field_set_value( $t_id, $t_bug_id, gpc_get_custom_field( "customfield$t_id", $t_def['type'], $t_def['default_value'] ), false ) ) {
Modified: if( !custom_field_set_value( $t_id, $t_bug_id, gpc_get_custom_field( "customfield$t_id", $t_def['type'], $t_def['default_value'] ), false ) && ( $t_def['require_report'] ) ) {

dregad

dregad

2019-09-17 08:15

developer   ~0062849

Closing as duplicate of 0016952 per 0016954:0039376

Issue History

Date Modified Username Field Change
2014-02-11 14:52 badfiles New Issue
2014-02-11 15:03 badfiles Note Added: 0039376
2014-02-15 07:29 badfiles Note Added: 0039411
2014-07-24 12:45 ftaysse Note Added: 0040969
2014-07-24 12:47 ftaysse Note Edited: 0040969 View Revisions
2014-07-24 12:47 ftaysse Note Edited: 0040969 View Revisions
2014-07-24 14:41 atrol Relationship added related to 0017354
2014-10-12 16:34 grangeway Product Version git trunk => 1.2.17
2019-09-17 08:15 dregad Assigned To => dregad
2019-09-17 08:15 dregad Status new => resolved
2019-09-17 08:15 dregad Resolution open => duplicate
2019-09-17 08:15 dregad Note Added: 0062849
2019-09-17 08:15 dregad Relationship added duplicate of 0016952
2019-09-26 16:41 atrol Status resolved => closed