Jump to content

Comment Field Length Bug


gregsohl

Recommended Posts

I see the comment field (in the object table) has a length limit of 1,000. I think this is fairly limiting for the types of revision comments I require of our team. Certainly not exceeded regularly, but on occasion.

I decided to test it out and pasted a large piece of text into the comment field in the Properties pane for an existing changeset. it allowed me to paste in the full text (around 12K characters). Upon pressing "Save", I got an error shown in the image below about truncation of the comment text.

post-1749-0-45392900-1334263073_thumb.gif

Suggest that you:

1. Do not allow the user to enter more than the max allowed characters in the comment field.

2. Show the number of characters remaining in the comment field while the user is typing in it.

3. Increase the max length of the comment field to about 4k. It's varchar. Increasing the max length won't hurt anything.

Greg

Link to comment
Share on other sites

For what it's worth, I like suggestions 2 and 3, but I would have to disagree on suggestion 1. Taking the "twitter" type approach where you are shown the characters you have left and then it goes negative when you're over is a little easier. Where I think suggestion 1 falls short is on the edge case of copying and pasting a large amount of text. Do you let just enough text in? Fail to let any of it in? It's a little smoother to just show how much you're over and allow me to edit it in the view. A larger area to edit here would certainly go a long way as well.

Link to comment
Share on other sites

  • 2 years later...

Done!

"5.0.44.598" release.
 
Release notes:
 
New
Server: Now, the maximum comment size can be manually
configured.
To configure this parameter, add a new tag in the
server's 'db.conf' file, named 'CommentLimit'
in order to set the value for the maximum
allowed comment length (in characters).
Example:
<DbConfig>
...
<CommentLimit>2000</CommentLimit>
...
</DbConfig>

However, this configuration will require the sysadmin
to manually alter the database tables to match
this new value (see column 'scomment' on table 'object').
The comment length limit is set to 1000 characters
by default.
Even so, importing data (cm sync or cm fast-import) will
only store the first 1000 characters of incoming comments,
no matter which value is contained in the 'CommentLimit' tag.

Warning: Please note that replication operations may fail
if servers have different comment length limits.
Please make sure that all involved servers have their
'CommentLimit' tag set to the same value in the 'db.conf'
file and their repository databases have been modified
accordingly.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...