Regarding Import MPP

Hi Abhishek,


Our Product team is looking into it and we’ll update you soon about the progress in this regard.

Hi Abhishek,


Please download the hotfix version for issue TASKSNET-1723 and share your feedback once you test it at your end.

Hi Kashif,


Thanks for your response!!
I checked Import functionality with the latest hotfix dll provided by you but I am still getting Project Reading Exception.

Please help !!

Thanks
Abhishek Prasad

Hi Abhishek,


We have tested your sample input file with this hotfix version and could not observe any exception as you have specified. Can you make sure you have tested with this provided hotfix version? If the issue arises with some other sample input file, please share that with us in a new thread so that we can investigate the issue further at our for reporting to our Product team.

Hi Kashif,


PFA the sample which is throwing error, test with the hotfix version.
I have attached the error along with this mail.Do let me know if you were able to replicate the same or not ?

Please revert ASAP.

Thanks
Abhishek Prasad

Hi Abhishek,

Thank you for sharing the sample file. We tried reading your sample MPP file with the hotfix version shared with you earlier but we still didn’t get any project reading exception. The project loads fine and we were able to read its properties and save it back without any issues. The sample project used at our end is attached for your reference. Please check if you are able to observe the exception in the attached project. If the issue still persists at your end, please create a similar console application project and share with us to investigate the issue further and assist you appropriately.

Hi Kashif/Team,


Thanks for the Hotfix, it is working perfectly.

I want to handle a null situation when the user inputs no resource name when importing the MPP.
I am using the below code:-

foreach (Aspose.Tasks.Task tsk in collector.Tasks)
{
foreach (ExtendedAttribute att in tsk.ExtendedAttributes)
{
//Adding Resource Name to the TASK Object.
foreach (Aspose.Tasks.ResourceAssignment ass in tsk.Assignments)
{
if(!string.IsNullOrEmpty(ass.Get(Asn.Resource).Get(Rsc.Name)))
tskObj.OwnerNm = ass.Get(Asn.Resource).Get(Rsc.Name);
}
}
}

But unable to check for the null condition. Please let me know if there is a way to check for null value before setting. (The bold text, where I am checking for the null condition).

It is throwing error Object refrence not set to instance of an object.

Thanks

Abhishek Prasad






Hi Abhishek,

I have tried this scenario by creating a sample project with a resoucre having name value null. I am afraid that no such exception is raised and this line of code works fine. Could you please send us a sample project file for our testing here?

I tried with the following sample code and attached project file.

Project proj = new Project(@"NullResource.mpp");
ChildTasksCollector collector = new ChildTasksCollector();
TaskUtils.Apply(proj.RootTask, collector, 0);
foreach (Aspose.Tasks.Task tsk in collector.Tasks)
{
    foreach (Aspose.Tasks.ResourceAssignment ass in tsk.Assignments)
    {
        Resource rsc = ass.Get(Asn.Resource);
        string Name = rsc.Get(Rsc.Name);
        if (!string.IsNullOrEmpty(ass.Get(Asn.Resource).Get(Rsc.Name)))
        {
            string OwnerNm = ass.Get(Asn.Resource).Get(Rsc.Name);
        }
    }
}

The issues you have found earlier (filed as TASKSNET-1723) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.