Skip to content

Commit 87d2818

Browse files
author
Maria Rudenko
committed
Merge pull request '[update] msproject and primavera6 export/import guides and api' (#102) from update-export-msproject-docs-56 into master
Reviewed-on: https://git.webix.io/Servers/gantt-docs/pulls/102
2 parents 67e0abb + edb080a commit 87d2818

File tree

7 files changed

+455
-156
lines changed

7 files changed

+455
-156
lines changed

data/api/gantt_exporttomsproject.md

Lines changed: 11 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -33,33 +33,17 @@ gantt.exportToMSProject({
3333
The **exportToMSProject()** method takes as a parameter an object with a number of properties (all of the properties are optional):
3434

3535
- **name** - (*string*) the name of the obtained file ('gantt.xml' by default).
36-
- **auto_scheduling** - (boolean) indicates the scheduling mode for tasks in the exported project. **true** will mark tasks as auto scheduled, **false** will mark tasks as manually scheduled (the default state).
37-
- **skip_circular_links** - (boolean) indicates whether the circular links will be removed or not (true - will be removed (the default mode), false - will not be removed).
38-
- **project** - (object) allows setting custom properties to the exported project entity.
39-
- **tasks** - (object) allows setting custom properties to the exported task items.
40-
- **data** - (object) allows setting a custom data source that will be presented in the output Gantt chart. It is expected that the **start_date** and **end_date** properties will be specified in the format which includes both the date and time (*%d-%m-%Y %H:%i*).
41-
- **callback** - (function) if you want to receive an url to download a generated XML, the *callback* property can be used. It receives a JSON object with the *url* property.
42-
- **resources** - (array) allows exporting the list of resources into an MS Project file.
43-
- **server** - (string) the API endpoint for the request. Can be used with the local install of the export service. The default value is **https://export.dhtmlx.com/gantt**.
44-
45-
### Response
46-
47-
The response will contain a JSON of the following structure:
48-
49-
~~~js
50-
{
51-
data: {},
52-
config: {},
53-
resources: [],
54-
worktime: {}
55-
}
56-
~~~
57-
58-
- **data** - a gantt [data object](desktop/supported_data_formats.md#json). Each task has the following properties: *id*, *open*, *parent*, *progress*, *start_date*, *text*, *resource*.
59-
Dates are stringified in the "%Y-%m-%d %H:%i" format.
60-
- **config** - a gantt [configuration](api/refs/gantt_props.md) object with settings retrieved from the project file.
61-
- **resources** - an array of objects (each having the following properties: {*id: string, name:string, type:string*}) that represent the list of resources from the project file.
62-
- **worktime** - an object containing the working time settings from the project calendar.
36+
- **auto_scheduling** - (*boolean*) indicates the scheduling mode for tasks in the exported project. **true** will mark tasks as auto scheduled, **false** will mark tasks as manually scheduled (the default state).
37+
- **skip_circular_links** - (*boolean*) indicates whether the circular links will be removed or not (true - will be removed (the default mode), false - will not be removed).
38+
- **project** - (*object*) allows setting custom properties to the exported project entity.
39+
- **tasks** - (*object*) allows setting custom properties to the exported task items.
40+
- **data** - (*object*) allows setting a custom data source that will be presented in the output Gantt chart. It is expected that the **start_date** and **end_date** properties will be specified in the format which includes both the date and time (*%d-%m-%Y %H:%i*).
41+
- **callback** - (*function*) if you want to receive an url to download a generated XML, the *callback* property can be used. It receives a JSON object with the *url* property.
42+
- **resources** - (*array*) allows exporting the list of resources into an MS Project file. If the resource calendars are used, you need to specify -1 for a task in the *CalendarUID* property during the export (in the **tasks** object).
43+
Then the task will use the resource calendar.
44+
- **server** - (*string*) the API endpoint for the request. Can be used with the local install of the export service. The default value is **https://export.dhtmlx.com/gantt**.
45+
46+
Check the detailed descriptions of the export settings in the [related section](desktop/export_msproject.md#exportsettings).
6347

6448
@related:
6549
desktop/export_msproject.md#exporttomsproject

data/api/gantt_exporttoprimaverap6.md

Lines changed: 11 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -33,33 +33,17 @@ gantt.exportToPrimaveraP6({
3333
The **exportToPrimaveraP6()** method takes as a parameter an object with a number of properties (all of the properties are optional):
3434

3535
- **name** - (*string*) the name of the obtained file ('gantt.xml' by default).
36-
- **auto_scheduling** - (boolean) indicates the scheduling mode for tasks in the exported project. **true** will mark tasks as auto scheduled, **false** will mark tasks as manually scheduled (the default state).
37-
- **skip_circular_links** - (boolean) indicates whether the circular links will be removed or not (true - will be removed (the default mode), false - will not be removed).
38-
- **project** - (object) allows setting custom properties to the exported project entity.
39-
- **tasks** - (object) allows setting custom properties to the exported task items.
40-
- **data** - (object) allows setting a custom data source that will be presented in the output Gantt chart. It is expected that the **start_date** and **end_date** properties will be specified in the format which includes both the date and time (*%d-%m-%Y %H:%i*).
41-
- **callback** - (function) if you want to receive an url to download a generated XML, the *callback* property can be used. It receives a JSON object with the *url* property.
42-
- **resources** - (array) allows exporting the list of resources into a Primavera P6 file.
43-
- **server** - (string) the API endpoint for the request. Can be used with the local install of the export service. The default value is **https://export.dhtmlx.com/gantt**.
44-
45-
### Response
46-
47-
The response will contain a JSON of the following structure:
48-
49-
~~~js
50-
{
51-
data: {},
52-
config: {},
53-
resources: [],
54-
worktime: {}
55-
}
56-
~~~
57-
58-
- **data** - a gantt [data object](desktop/supported_data_formats.md#json). Each task has the following properties: *id*, *open*, *parent*, *progress*, *start_date*, *text*, *resource*.
59-
Dates are stringified in the "%Y-%m-%d %H:%i" format.
60-
- **config** - a gantt [configuration](api/refs/gantt_props.md) object with settings retrieved from the project file.
61-
- **resources** - an array of objects (each having the following properties: {*id: string, name:string, type:string*}) that represent the list of resources from the project file.
62-
- **worktime** - an object containing the working time settings from the project calendar.
36+
- **auto_scheduling** - (*boolean*) indicates the scheduling mode for tasks in the exported project. **true** will mark tasks as auto scheduled, **false** will mark tasks as manually scheduled (the default state).
37+
- **skip_circular_links** - (*boolean*) indicates whether the circular links will be removed or not (true - will be removed (the default mode), false - will not be removed).
38+
- **project** - (*object*) allows setting custom properties to the exported project entity.
39+
- **tasks** - (*object*) allows setting custom properties to the exported task items.
40+
- **data** - (*object*) allows setting a custom data source that will be presented in the output Gantt chart. It is expected that the **start_date** and **end_date** properties will be specified in the format which includes both the date and time (*%d-%m-%Y %H:%i*).
41+
- **callback** - (*function*) if you want to receive an url to download a generated XML, the *callback* property can be used. It receives a JSON object with the *url* property.
42+
- **resources** - (*array*) allows exporting the list of resources into a Primavera P6 file. If the resource calendars are used, you need to specify -1 for a task
43+
in the *CalendarUID* property during the export (in the **tasks** object). Then the task will use the resource calendar.
44+
- **server** - (*string*) the API endpoint for the request. Can be used with the local install of the export service. The default value is **https://export.dhtmlx.com/gantt**.
45+
46+
Check the detailed descriptions of the export settings in the [related section](desktop/export_primavera.md#exportsettings).
6347

6448
@related:
6549
desktop/export_primavera.md#exporttoprimaverap6

data/api/gantt_importfrommsproject.md

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ The method takes as a parameter an object with configuration properties of an im
4949
- **projectProperties** - specifies an array of project properties that should be put into the response.
5050
- **taskProperties** - specifies an array of additional task properties to be imported.
5151

52-
###Response
52+
Check the detailed descriptions of the import settings in the [related section](desktop/export_msproject.md#importsettings).
53+
54+
### Response
5355

5456
The response will contain a JSON of the following structure:
5557

@@ -58,15 +60,29 @@ The response will contain a JSON of the following structure:
5860
data: {},
5961
config: {},
6062
resources: [],
61-
worktime: {}
63+
worktime: {},
64+
calendars: []
6265
}
6366
~~~
6467

65-
- **data** - a gantt [data object](desktop/supported_data_formats.md#json). Each task has the following properties: *id*, *open*, *parent*, *progress*, *start_date*, *text*, *resource*.
68+
- **data** - (*object*) a gantt [data object](desktop/supported_data_formats.md#json). Each task has the following properties: *id*, *open*, *parent*, *progress*, *start_date*, *text*, *resource*.
6669
Dates are stringified in the "%Y-%m-%d %H:%i" format.
67-
- **config** - a gantt [configuration](api/refs/gantt_props.md) object with settings retrieved from the project file.
68-
- **resources** - an array of objects (each having the following properties: {*id:string, name:string, type:string*} that represent the list of resources from the project file.
69-
- **worktime** - an object containing the working time settings from the project calendar.
70+
- **config** - (*object*) a gantt [configuration](api/refs/gantt_props.md) object with settings retrieved from the project file.
71+
- **resources** - (*array*) an array of objects (each having the following properties: {*id: string, name: string, type: string, calendar: string*} that represent the list of resources from the project file.
72+
- **worktime** - (*object*) an object containing the working time settings from the project calendar. It can contain the following attributes:
73+
- **id** - (*string | number*) optional, the calendar id
74+
- **hours** - (*array*) an array with global working hours, sets the start and end hours of the task
75+
- **dates** - (*array*) an array of dates that can contain:
76+
- 7 days of the week (from 0 - Sunday, to 6 - Saturday), where 1/true stands for a working day and 0/false - a non-working day
77+
- other records are dates
78+
- **calendars** - (*array*) an array containing calendar configuration objects for creating a new calendar.
79+
- **calendarConfig** - (*object*) a calendar configuration object that can contain the following attributes:
80+
- **id** - (*string | number*) optional, the calendar id
81+
- **name** - (*string*) the calendar name
82+
- **hours** - (*array*) an array with global working hours, sets the start and end hours of the task
83+
- **dates** - (*array*) an array of dates that can contain:
84+
- 7 days of the week (from 0 - Sunday, to 6 - Saturday), where 1/true stands for a working day and 0/false - a non-working day
85+
- other records are dates
7086

7187
@related:
7288
desktop/export_msproject.md#importfrommsproject

data/api/gantt_importfromprimaverap6.md

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ The method takes as a parameter an object with configuration properties of an im
4949
- **projectProperties** - specifies an array of project properties that should be put into the response.
5050
- **taskProperties** - specifies an array of additional task properties to be imported.
5151

52+
Check the detailed descriptions of the import settings in the [related section](desktop/export_primavera.md#importsettings).
53+
5254
### Response
5355

5456
The response will contain a JSON of the following structure:
@@ -58,15 +60,30 @@ The response will contain a JSON of the following structure:
5860
data: {},
5961
config: {},
6062
resources: [],
61-
worktime: {}
63+
worktime: {},
64+
calendars: []
6265
}
6366
~~~
6467

65-
- **data** - a gantt [data object](desktop/supported_data_formats.md#json). Each task has the following properties: *id*, *open*, *parent*, *progress*, *start_date*, *text*, *resource*.
68+
- **data** - (*object*) a gantt [data object](desktop/supported_data_formats.md#json). Each task has the following properties: *id*, *open*, *parent*, *progress*, *start_date*, *text*, *resource*.
6669
Dates are stringified in the "%Y-%m-%d %H:%i" format.
67-
- **config** - a gantt [configuration](api/refs/gantt_props.md) object with settings retrieved from the project file.
68-
- **resources** - an array of objects (each having the following properties: {*id:string, name:string, type:string*} that represent the list of resources from the project file.
69-
- **worktime** - an object containing the working time settings from the project calendar.
70+
- **config** - (*object*) a gantt [configuration](api/refs/gantt_props.md) object with settings retrieved from the project file.
71+
- **resources** - (*array*) an array of objects (each having the following properties:
72+
{*id: string, name: string, type: string, calendar: string*} that represent the list of resources from the project file.
73+
- **worktime** - (*object*) an object containing the working time settings from the project calendar. It can contain the following attributes:
74+
- **id** - (*string | number*) optional, the calendar id
75+
- **hours** - (*array*) an array with global working hours, sets the start and end hours of the task
76+
- **dates** - (*array*) an array of dates that can contain:
77+
- 7 days of the week (from 0 - Sunday, to 6 - Saturday), where 1/true stands for a working day and 0/false - a non-working day
78+
- other records are dates
79+
- **calendars** - (*array*) an array containing calendar configuration objects for creating a new calendar.
80+
- **calendarConfig** - (*object*) a calendar configuration object that can contain the following attributes:
81+
- **id** - (*string | number*) optional, the calendar id
82+
- **name** - (*string*) the calendar name
83+
- **hours** - (*array*) an array with global working hours, sets the start and end hours of the task
84+
- **dates** - (*array*) an array of dates that can contain:
85+
- 7 days of the week (from 0 - Sunday, to 6 - Saturday), where 1/true stands for a working day and 0/false - a non-working day
86+
- other records are dates
7087

7188
@related:
7289
desktop/export_primavera.md#importfromprimaverap6

0 commit comments

Comments
 (0)