View Issue Details

IDProjectCategoryView StatusLast Update
0005587mantisbtcustom fieldspublic2005-05-31 11:23
Reporterdrifter Assigned Tothraxisp  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version1.0.0a2 
Fixed in Version1.0.0a3 
Summary0005587: Custom field date type reset to blank
Description

When the Required on Update flag is not checked, custom field DATE type is reset to blank when changing the status of the issue. The string type custom fields work fine and retain their values though.

Additional Information

**notes: field "date in" = required on report only
field "date out" = required on update only
field "date tested" = not required at all
field "ORS Number" = string required on report only
field "Repairperson" = string not required at all
status "for repair" is equivalent to new_ (we just renamed it)

Date Modified Username Field Change
05-11-05 14:51 administrator New Issue
05-11-05 14:51 administrator Date In => 1112284800
05-11-05 14:51 administrator Date Out => 1114790400
05-11-05 14:51 administrator Date Tested => 1113494400
05-11-05 14:51 administrator ORS Number => Z542
05-11-05 14:51 administrator RepairPerson => Philip
** then i assigned the issue. (pls. take a look at change column)
05-11-05 14:59 administrator Date In 1112284800 =>
05-11-05 14:59 administrator Date Tested 1113494400 =>
05-11-05 14:59 administrator Note Added: 0000010
05-11-05 14:59 administrator Assigned To => chris
05-11-05 14:59 administrator Status for repair => assigned

TagsNo tags attached.

Relationships

has duplicate 0005615 closedgrangeway changing status deletes custom fields 
has duplicate 0005651 closedthraxisp The values in a mulitselect custom field disappear when updating the status of the issue 
has duplicate 0005558 closedthraxisp Problem with customfield multiselect List 
child of 0005460 closedvboctor Critical Issues to Fix for Mantis 1.0.0 Release 

Activities

drifter

drifter

2005-05-11 22:50

reporter   ~0010092

can someone look at this please? bump

thraxisp

thraxisp

2005-05-12 07:23

reporter   ~0010099

I can't reporduce this in CVS HEAD. There have been a few changes in this area.

drifter

drifter

2005-05-20 02:38

reporter   ~0010181

sir thraxisp, please try this:

  1. make a custom field with date type.
  2. edit the custom field properties. check "display when updating issues" and "display when reporting issues". DO NOT check "required on update".
  3. attach custom field to a project.
  4. report an sample issue. input a date into the custom date field. submit.
  5. view the issue normally. take note that the custom date field has your value. now, assign the issue using the assign button. you will be directed to the bug_change_status_page.php. note that the custom field is not displayed.
  6. choose someone to assign to, submit.
  7. view the issue again normally. take note that the custom date field is now empty. the bug history also records that it has been set to blank.

**** some personal notes:
i think the problem is, since the bug_change_status_page.php does not display the custom date field, the gpc_get_custom_field() in bug_update.php returns an empty string (as opposed to nulls for other field types). since it is not null, it will pass through the custom field validations in bug_update.php into custom_field_get_field(), where the data will be reset to an empty string.

if the date field will be displayed even if it is not required on the bug_change_status_page.php, i think the process will be ok.

thraxisp

thraxisp

2005-05-25 17:55

reporter   ~0010233

I can reproduce this now.

thraxisp

thraxisp

2005-05-25 20:09

reporter   ~0010239

Fixed in CVS.

core/gpc_api.php -> 1.37
bug_update.php -> 1.84