Export tasks to MS Project for percent completed

Hi

Current statement
Tasks types:
Milestone
Usual project task (usual tasks can have percent of execution between 0% and 100%)

Tasks has resources. Tasks has calendar.
See script code attached below. That code makes export of project tasks into XML-format.

Problem
Project tasks has percentage set up into 100%, without some specific value that we had before

Attaches
Check please next files attached to that request:
File MyProject.mpp – results of real export, XML-file saved as *.MPP
File example.mpp – we are waiting export results as in that file (some awaited model).
File Program.cs – C# script

Hi Anton,


Thank you for contacting Aspose support.

I have analyzed the code and observed that you are setting Actual Start/Finish dates. If we create a task using Microsoft Project(MSP) and assign Start, Finish, Duration only and save the file on disc, it contains 0% complete. However if we set the Actual Start/Finish date equal to Start and finish date, the % complete automatically changes to 100% in MSP. Similarly in MSP if we change the % complete to 0, the Actual start and Actual Finish dates automatically become NA.

Hence if you set Actual Start/Finish dates, the %complete value is adjusted. You may please verify it by commenting the lines of code in your sample code where ActualFinish date is assigned a value. You will see that the %complete remains 0% as expected.

Please feel free to write us back if you have any other query in this regard.
Hi

I created *.xml project file with the help of Aspose.Tasks. Open this file in the MS Project 2013, and next save to *.mpp format.

Then I try to open the file I've done:

var reader = new ProjectReader();
var project = reader.Read("c:\\MyProject.mpp");

and get the “Project reading exception. Item has already been added. Key in dictionary: '0' Key being added: '0'" in the last line. If I do the same with MS Project 2010, it doesn't happen (there is no exception). I'm attaching code file and *.xml and *.mpp files. Will be grateful for your help.

Hi Anton,

Could you please make sure that you are using the latest version of Aspose.Tasks at your end? I am unable to reproduce this issue using the latest version of Aspose.Tasks. Please try it at your end and let us know your feedback for further assistance.

Hi

I have new problem. Created *.xml project file with the help of Aspose.Tasks. Open this file in the MS Project 2010, and next save to *.mpp format. Next reading from

var reader = new ProjectReader();
var project = reader.Read("c:\\MyProject.mpp");

and get the “Project reading exception. "Прибавление или вычитание значения приводит к непредставимому значению DateTime.". Will be grateful for your help.

Hi Anton,


I have reviewed your code and observed that you are using old library for which support is discontinued. You may please convert it according to new revamped library Aspose.Tasks for .NET 8.3.0 and if issue is reproduced, please share the code and output file with us. We shall try to provide assistance immediately once the feedback is received in this regard.

Hi


I update to Aspose 8.3.0 and use code:
var project = new Project(file);
var pc = new ChildTasksCollector();
TaskUtils.Apply(project.RootTask, pc, 0);

and get the “Project reading exception. “Прибавление или вычитание значения приводит к непредставимому значению DateTime.”. Will be grateful for your help.


Hi Anton,


Thank you for providing sample MPP file. I have reproduced the exception and have logged it in our bug tracking system as :TASKS-34032 for further analysis by our product team. I shall write here once any update is available about this issue.

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


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

Hi


I have new problem in version Aspose 8.4.1 (file project.zip, attach solution AsposeTest).
use:
var project = new Project {CalculationMode = CalculationMode.None}
and get exception

System.NullReferenceException was unhandled
HResult=-2147467261
Message=Ссылка на объект не указывает на экземпляр объекта.
Source=Aspose.Tasks
StackTrace:
в . ()
в . (Object , XmlElement , Int32 )
в . (Object , XmlElement , Int32 )
в . [T](IEnumerable`1 , XmlElement , , String )
в . (Project , Stream )
в . (Project , Stream , TasksDataFormat )
в . (Stream , SaveFileFormat )
в Aspose.Tasks.Project.Save(String filename, SaveFileFormat format)

If use CalculationMode.Manual then i have over bag:
1. I have bad finish date for Task2 - 2015-06-09T17:00:00 instead of the correct date 2015-06-09T23:59:50
2. See files “correct - aspose 7.2.0.xml” and “bad - aspose 8.4.1.xml”. In old Aspose version file “correct - aspose 7.2.0.xml” not exists xml-nodes for task , , , , , , it’s file is correct. How sets fileds Stop, Resume, EarlyStart, EarlyFinish, LateStart, LateFinish for task is null?
Hi Anton,

I have reviewed your code and its quite a lengthy code which is not helpful to identify the problem. As you have mentioned that it is a new problem, therefore could you please create a new thread and provide a simplified code which can be used to re-produce the scenario here?

Similarly, you have sent two files "bad - aspose 8.4.1.xml" and "correct - aspose 7.2.0.xml" for another issue. Please create a separate thread and provide the simplified code using new library Aspose.Tasks for .NET 8.4.1 for re=producing the issue here. It will help us to re=produce scenario here and provide assistance at the earliest.

The issues you have found earlier (filed as ) have been fixed in this Aspose.Words for JasperReports 18.3 update.