View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0024056||mantisbt||custom fields||public||2018-02-28 17:59||2018-03-31 19:58|
|Target Version||2.13.0||Fixed in Version||2.13.0|
|Summary||0024056: Custom Fields of type "Textarea" cannot contain more than 255 chars due to bug_history table|
I have a custom field of type 10 (textarea) that is meant to contain more than 255 characters. If I report an issue and enter more than 255 characters, I run into an SQL error because Mantis tries to write the field's whole content to the bug_history table's new_value field, which is defined as varchar(255).
It would be okay to cut the value for the history at 255 characters.
|Tags||No tags attached.|
For my scenario solution 1 would be sufficient. Solution 3 could break plugins that access those fields in SQL queries. I don't consider this very common though.
I think (1) is good enough for now.
Regarding (3), instead of going for a specific functionality for custom fields, i'd rather propose an extension of history table itself, having change header and detail in separated tables (for long texts as a start)
Having long texts can be a performance hit when reading multiple rows cointaining that field when it may not actually be needed. As found in Oracle, where they are CLOB fields that need a separate query for retrieving each individual clob value (which is done under the hood by adodb)
MantisBT: master 339cf883
2018-03-01 07:53:03Details Diff
|Truncate values before writing to database history table
TEXTAREA custom fields can contain more than 255 characters.
Changing such fields fails, as the new value can't be stored
in history table.
This change fixes the issue by truncating the string.
See 0024056 for other options to fix it.
|mod - core/constant_inc.php||Diff File|
|mod - core/history_api.php||Diff File|
|2018-02-28 17:59||TiKu||New Issue|
|2018-03-01 03:04||atrol||Relationship added||related to 0010923|
|2018-03-01 03:18||atrol||Status||new => confirmed|
|2018-03-01 03:18||atrol||Note Added: 0059061|
|2018-03-01 03:20||atrol||Note Edited: 0059061||View Revisions|
|2018-03-01 06:37||TiKu||Note Added: 0059062|
|2018-03-01 07:59||atrol||Assigned To||=> atrol|
|2018-03-01 07:59||atrol||Status||confirmed => assigned|
|2018-03-01 08:06||atrol||Note Added: 0059063|
|2018-03-02 04:42||cproensa||Note Added: 0059066|
|2018-03-04 16:06||atrol||Target Version||=> 2.13.0|
|2018-03-08 02:49||atrol||Changeset attached||=> MantisBT master 339cf883|
|2018-03-08 02:49||atrol||Status||assigned => resolved|
|2018-03-08 02:49||atrol||Resolution||open => fixed|
|2018-03-08 02:49||atrol||Fixed in Version||=> 2.13.0|
|2018-03-31 19:58||vboctor||Status||resolved => closed|