Problem setting Company property if not already set manually

Hi, we have an Aspose Total developer license. In Tasks we have problem setting one property, the Company property, we cannot set it from scratch by code, but if the property is set manually first then we are able to change it by code. I would consider it a bug, since we do not have this problem with any other property in any other Aspose product, and not this problem using MS-Project API either. This is ths C# code, it is only the Company line we have problems with:
switch (name.ToLower())
{
case “author”:
document.Set(Aspose.Tasks.Prj.Author, value);
break;
case “category”:
document.Set(Aspose.Tasks.Prj.Category, value);
break;
case “company”:
document.Set(Aspose.Tasks.Prj.Company, value);
break;
case “keywords”:
document.Set(Aspose.Tasks.Prj.Keywords, value);
break;
case “manager”:
document.Set(Aspose.Tasks.Prj.Manager, value);
break;
case “subject”:
document.Set(Aspose.Tasks.Prj.Subject, value);
break;
case “title”:
document.Set(Aspose.Tasks.Prj.Title, value);
break;
// custom property
default:
document.CustomProperties[name] = value;
break;
}

Thanks, and kind regards
Sven

Hi Sven,

Thank you for contacting Aspose support team.

I have tried to reproduce the issue but could not succeed. Could you please give a try to the following sample code and let us know the feedback? If it does not fulfill your requirement, please send us a complete program which can be compiled and executed here for our testing. It will help us to analyze the problem and provide assistance accordingly.

Project proj = new Project(path + “Blank2010.mpp”);
Console.WriteLine("Before writing Company name = {0}" , proj.Get(Prj.Company));
proj.Set(Prj.Company, "This is company name");
Console.WriteLine("After writing Company name = {0}", proj.Get(Prj.Company));
proj.Save(path + "Output.mpp", SaveFileFormat.MPP);

Project proj2 = new Project(path + "Output.mpp");
Console.WriteLine("After loading Company name = {0}", proj2.Get(Prj.Company));

Hi Kashid, many thanks for fast response. This is very weird. Your script kind of works, meaning that it stores “This is comapny name” somewhere and the value is preserved to following file load later in script. But when I open the file in MS Project the Company property is blank. I have attached the resulting Output.mpp file, if you run your script you will see that the Company property is “This is Company name”, and if you open the file in Microsoft Project then you will see that the Company property is blank. I am testing using fully updated MS Project 2016 professional.

Another observation (bug?) is that if the project is completely empty (no tasks) then Aspose Tasks throws an exception on file load. I created the test mpp file by right-clicking a folder and selecting New Microsoft Project Document, if I forget to add a task then Aspose Task crashes on file load. I have not filed a new Apose issue ticket on this.

Hi Sven,


1. Could you please share with us where you look for the Company information when you open the MPP file in MS Project?

2. We were able to reproduce the exception while loading an MPP file that is created by right-clicking in any folder. It has been logged as TASKSNET-1577 in our issue tracking system for further investigation by our Product team. We’ll update you here once there is some information available in this regard.

Hi Kahif,



In MS Project You find the builtin Company property the following way:



1. Open the Output.mpp file.

2. Click File tab.

3. Click Project Information (right), and select Advanced Properties.

4. There You will find the BuilitIn properties including Company.



I have attached ViewProjectProperties.docx which includes screen dumps showing you how to do it, and showing You what I see when I do the same with the mpp file I send you in my last reply.



Thanks and kind regards

Sven

Hi Sven,


Thank you for information.

We were able to reproduce the issue at our end and have logged it as TASKSNET-1586 in our issue tracking system for further investigation by our Product team. We’ll update you here once there is some information available about this issue.

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


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