View Issue Details

IDProjectCategoryView StatusLast Update
0022857mantisbtcustom fieldspublic2017-05-23 15:12
Reporterjohgoe Assigned Toatrol  
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionno change required 
Product Version2.4.0 
Summary0022857: Use of custom fields of type TEXTAREA breaks editing and reporting bugs
Description

In 0006626 a new column type TEXTAREA was added, which uses a new column textin custom_field_text table instead of value column. The schema just added a new text column, but the valuecolumn was a not changed to a nullable column. The usage of custom fields of type TEXTAREA causes in an mysql DB error because mantis bt tries to write null into a not nullable column.

Steps To Reproduce

1) Migrating Mantis from 1.2.19 to 2.4.0
2) Add a new custom field of new type TEXTAREA to an project
3) Try to save a new bug.

It fails with a sql exception because value is not nullable in database but TEXTAREA use new text column instead.

Additional Information

The fix is easy: Just alter the value column to a nullable one.

TagsNo tags attached.

Activities

atrol

atrol

2017-05-12 05:07

developer   ~0056836

johgoe,

I was not able to reproduce your problem with a fresh install of MantisBT 2.4.0.

Please provide detailed step-by-step instructions to reproduce the issue; the following additional information may also be useful:

  • Exact version of PHP, Database, Web server, Browser and Operating System
  • Relevant customizations (e.g. changes in config_inc.php, etc)
  • Installed plugins or custom functions ?
  • Was the MantisBT source code modified in any way ?

in custom_field_text table

I assume you mean custom_field_string table

but the value column was a not changed to a nullable column

This is strange as I would expect that it is nullable and the default is null, see
https://github.com/mantisbt/mantisbt/blob/release-2.4.0/admin/schema.php#L812

johgoe

johgoe

2017-05-12 05:48

reporter   ~0056838

Yes I mean custom_field_string table. It seems like the empty text value default from https://github.com/mantisbt/mantisbt/blob/release-2.4.0/admin/schema.php#L206 was not part of our schema. You can close this issue.