Open
Description
Discussed in #383
Originally posted by SebDaniViaDanubius May 5, 2025
I had a problem with the length limitation in TimeEntry class for the Comments field (255 chars). There were comments that were 471 characters long.
I was forced to hack this:
public sealed class TimeEntry : Identifiable<TimeEntry>, ICloneable
{
/// <summary>
/// Gets or sets the maximum length of comments. The default value is 255.
/// </summary>
public static int MaxLengthOfComments = 255;
...
/// <summary>
/// Gets or sets the short description for the entry (<see cref="MaxLengthOfComments">length is maximized</see>).
/// </summary>
/// <value>The comments.</value>
public string Comments
{
get => comments;
set => comments = value.Truncate(MaxLengthOfComments);
}
...
}
This way I can set the limit up to 1000 (in my code).
TimeEntry.MaxLengthOfComments = 1000;
Someone could put this change in the master.