Task NotesText removes the last two caracters when save

Hello,

I use the Trial licence key and the 4.7.0.0 component in C#.
When i edit and save a task in an MPP file, it removes the last two caracters of the “NotesText” field.
Another bug, the dates are always saved to 01/01/2001 when i edit and save a task. I just saw this topic, may be same bug ?

<a href="https://forum.aspose.com/t/5218

Thanks.

Nicolas.

Hi Nicolas,


Thank you for writing to us.

I am afraid inform that I was not able to reproduce this issue at my end. Please download and use the latest version of Aspose.Tasks for .NET 4.8.0 and let us know your feedback.

I have tried to reproduce this issue at my end with the following lines of code:

string newProject = “New project File.mpp”;

ProjectReader reader = new ProjectReader();

Project project = reader.Read(newProject);

string testFile = “Output.mpp”;

Task task1 = new Task(“First task”);

project.StartDate = task1.Start = new DateTime(2012, 11, 23, 8, 0, 0);

task1.Duration = new TimeSpan(3 * 8, 0, 0);

task1.DurationFormat = TimeUnitType.MinuteEstimated;

task1.NotesText = “This is test note”;

Task summary = new Task(“Summary task”);

summary.Children.Add(task1);

project.RootTask.Children.Add(summary);

project.UpdateReferences();

project.CalcTaskIds();

project.CalcTaskUids();

//Update the task

task1.Duration = new TimeSpan(4 * 8, 0, 0);

project.CalcTaskIds();

project.CalcTaskUids();

Task.Recalculate(task1);

project.Save(testFile, Aspose.Tasks.Saving.SaveFileFormat.MPP);


If the problem still persists at your end, please provide us with your sample runnable code and sample project file(s) to reproduce this issue at our end. We will look into it and assist you further as soon as possible.

Ok, thank you.

After our investigations, we are able to set dates as we want. But for the “NotesText”, it is well saved in the .mpp file, but when we get it from the .mpp file, your component send the “NotesText” without the last two characters.

Nicolas.

Hi Nicolas,

Thank you for the feedback.

I am afraid to inform you that I was not able to reproduce this issue at my end, as the NotesText was retrieved properly. Using the above example, I added the below lines to it to retrieve the NotesText and the text was displayed properly without removing the last two characters.

If this is not how to reproduce this issue at our end, please provide us with your sample file and code so that we can further investigate this issue by reproducing at our end. We will try to assist you further as soon as possible.

Project project2 = reader.Read(testFile);
Task tsk = project2.GetTaskById(2);
Console.WriteLine(tsk.NotesText);