Distinguish if Start Date/ End Date is displayed in MPP

Hi,

I have created a sample MPP file (attached), and edited it to create another MPP file where the only difference is Start Date and End Date are not displayed, whereas all the other details, ex: duration, dependencies, resource assignment are kept intact.

My requirement is to distinguish these MPP files, so that file in which Start Date/ End Date are not displayed, should get started on the today's date.

One difference that I found was that "IsManual" property is true for MPP where Start Date and End Date are not displayed.

Do you guys, know a correct way to differentiate this files?

Regards,
Biswajeet

Hi Biswajeet,


Thank you for writing to Aspose support team.

Tsk.StartText and Tsk.FinishText property can be used to identify if some text is there or not. Currently there is some issue with this property and logged under Id:TASKSNET-1667 for further investigation by the product team. You will be automatically notified once any update is received in this regard.

Hi Kashif,


Is there any update on this issue?

I tried testing using StartText property, but this property turned out to be empty in both scenario (with start and without start date MPPs).

Regards,
Biswajeet

Hi Biswajeet,


The issue is pending for investigation at our Product team’s end and will be addressed upon its turn. At present, there is no news available about the resolution of this problem. We’ll update you here once there is some information available in this regard.

Hi,

Is there any update on this issue?

I have one more similar issue, how to check if the ‘Duration’ text/ property in MSP is available or not.

On debug, we can still find the earlier duration present in MPP (i.e. before removing duration text).

I need a resoulution at earliest.

Regards,
Biswajeet
Hi Biswajeet,

I have observed that when we have a task in MPP file having start, finish and duration then no tag for StartText, FinishText and DurationText is present in the project. If we read this MPP using Aspose.Tasks and display value of these text properties we get NULL. This null shows that respective fields have proper values.

On the other hand if we delete some text from a field say “Start”, then a text tag is automatically added containing an empty string. Now if we use Aspose.Task to read “StartText” property, it does not return NULL but returns empty string “”, which shows that this field has no text in the field.

You may please try following sample code which demonstrates this behavior. If some Text property is NULL, it means data is there and if it returns empty string i.e. “”, it means that respective property has no text in the field.

It should be noted that deleting text from the field does not remove that property from the respective field. For example if you delete text from start field, it will set the StartText property value to “” but it will not empty the START field. This can be confirmed by saving the MPP file (after deleting text) as XML using MSP 2010 and viewing the tags in notepad.

static void test()
{
var without = new Project(@"MPPIWithoutStart&End.mpp");
var with = new Project(@"MPPIWithStart&End.mpp");

var taskWithout = without.RootTask.Children.ToList()[0];
var taskWith = with.RootTask.Children.ToList()[0];

var startTextWithout = taskWithout.Get(Tsk.StartText);
var startTextWith = taskWith.Get(Tsk.StartText);
var startWithout = taskWithout.Get(Tsk.Start);
var startWith = taskWith.Get(Tsk.Start);


var endTextWithout = taskWithout.Get(Tsk.FinishText);
var endTextWith = taskWith.Get(Tsk.FinishText);
var endWithout = taskWithout.Get(Tsk.Finish);
var endWith = taskWith.Get(Tsk.Finish);

var durationTextWithout = taskWithout.Get(Tsk.DurationText);
var durationTextWith = taskWith.Get(Tsk.DurationText);
var durationWithout = taskWithout.Get(Tsk.Duration);
var durationWith = taskWith.Get(Tsk.Duration);
}

The issues you have found earlier (filed as TASKSNET-1667) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by kashif.iqbal