View Issue Details

IDProjectCategoryView StatusLast Update
0004128mantisbtcustom fieldspublic2004-08-29 01:48
Reportermatt_doran Assigned Tograngeway  
PrioritynormalSeverityblockReproducibilityalways
Status closedResolutionfixed 
Product Version0.19.0a2 
Fixed in Version0.19.0rc1 
Summary0004128: Custom field data lost on resolve and close of issue
Description

When you update or resolve an issue that has custom fields, but those custom fields are not displayed on the resolve/close page, the custom field data is set to blank.

Steps:

  • Setup a custom field with all display and required flags off
  • Assign the field to a project
  • Raise an issue and enter data in the custom field
  • Resolve (or close) the issue (you should not see the custom field on these screens, because it was switched off in custom field set up)
  • The custom field will now be set to blank. The field is blank, and the change is also listed in the issue history.

(See below for a sample of SQL taken when resolving the issue.)

This problem definately occurs on the resolve and close pages but not sure it if happens elsewhere.

Additional Information

SELECT field_id FROM mantis_custom_field_project_table p, mantis_custom_field_table f WHERE p.project_id='7' AND p.field_id=f.id ORDER BY p.sequence ASC, f.name ASC

SELECT * FROM mantis_custom_field_table WHERE id='1'

SELECT name, type, possible_values, valid_regexp, access_level_rw, length_min, length_max, default_value FROM mantis_custom_field_table WHERE id='1'

SELECT name, type, possible_values, valid_regexp, access_level_rw, length_min, length_max, default_value FROM mantis_custom_field_table WHERE id='1'

SELECT value FROM mantis_custom_field_string_table WHERE field_id='1' AND bug_id='4048'

UPDATE mantis_custom_field_string_table SET value='' WHERE field_id='1' AND bug_id='4048'

INSERT INTO mantis_bug_history_table ( user_id, bug_id, date_modified, field_name, old_value, new_value ) VALUES ( '14', '4048', '2004-07-19 11:59:01', 'Client Name', 'XXXXX', '' )

TagsNo tags attached.

Relationships

has duplicate 0004223 closedvboctor Solving or closing an issue clears the custom_field to default value 
has duplicate 0004180 closedgrangeway Closed bug being assigned cleared custom fields. 
child of 0003987 closedvboctor Mantis 0.19.0 Release 

Activities

grangeway

grangeway

2004-07-20 17:02

reporter   ~0006189

Ok, I think what's happening is the following:

The bug_resolve and bug_close behavious is similar to that of bug_report.
bug_update is different.

In bug_report, the custom field either takes the value supplied or the default value. bug_resolve/close currently behave the same way - hence, the set value = '' query.

In bug_update, the custom field either takes the supplied value or null. If the value is null, the custom field value is not set.

vboctor

vboctor

2004-07-21 16:44

manager   ~0006221

If a custom field is hidden in the resolve / close page, then its value must not be modified. This should be similar to the behaviour of the update page when an custom field is not visible.

grangeway

grangeway

2004-08-16 12:42

reporter   ~0007016

This issue appears to be resolved, however - we've got an issue with 'clearing' checkboxes/default values