Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read custom columns from MPP imports #90

Open
AntoRin opened this issue Dec 13, 2022 · 3 comments
Open

Cannot read custom columns from MPP imports #90

AntoRin opened this issue Dec 13, 2022 · 3 comments

Comments

@AntoRin
Copy link

AntoRin commented Dec 13, 2022

I am using the following block of code to import MPP files:

gantt.importFromMSProject({ data: file, taskProperties: ["Notes", "Name", "Start", "Finish", "Start1", "Finish1"], callback: function (project) {}...

Given that "Start", "Finish", "Start1", "Finish1" are all names of columns in the MPP file. But after import, the properties "Start1" and "Finish1" happen to be null, while the properties "Start" and "Finish" happen to be time in hours - although the file clearly has dates.

@gearcoded
Copy link

gearcoded commented Jan 4, 2023

@AntoRin,
The Start1 and Finish1 properties are not supported:
https://docs.dhtmlx.com/gantt/desktop__tags.html#tasksproperties
The dev team will try to add it in the future, but I cannot promise that.

Regarding the Start and Finish properties - it is a bug. The dev team will fix it in the future, but I cannot give you any ETA.

As a workaround, you can obtain the Start and Finish properties from the $raw parameter:
https://snipboard.io/56hQKJ.jpg

@AntoRin
Copy link
Author

AntoRin commented Mar 15, 2023

@AntoRin,
The Start1 and Finish1 properties are not supported:
https://docs.dhtmlx.com/gantt/desktop__tags.html#tasksproperties
The dev team will try to add it in the future, but I cannot promise that.

Regarding the Start and Finish properties - it is a bug. The dev team will fix it in the future, but I cannot give you any ETA.

As a workaround, you can obtain the Start and Finish properties from the $raw parameter:
https://snipboard.io/56hQKJ.jpg

I am not only talking about start1 and finish1 properties. Let's say there's a column in the MPP called "totally_custom_column".

Is there a way to read the values for this column using .mpp import?

@gearcoded
Copy link

@AntoRin,
To import custom properties, you need to specify them in the taskProperties paramerter, then load them from the $custom_data property:
https://docs.dhtmlx.com/gantt/desktop__export_msproject.html#importfrommsproject:~:text=Getting%20tasks%20properties

Some of them will be imported, but there is no way to tell which properties will work.

We use the MPXJ library to convert files, and when it doesn't return a custom property from a file, we cannot do anything there.
And it works differently for MPP and XML file, so, if you cannot import it from the MPP file, you can try the XML file, and vice versa:

https://snipboard.io/0MSzY9.jpg

When I checked the totally_custom_column the data was imported:
https://snippet.dhtmlx.com/dw8lx21a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants