Skip to content

Commit 0eee323

Browse files
committedOct 25, 2024
[TASKSCLOUD-859] - Deployed new 24.10 version.
1 parent 42e5e26 commit 0eee323

16 files changed

+227
-8
lines changed
 

‎README.md

+3
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ Feel free to explore the [Developer's Guide](https://docs.aspose.cloud/display/t
3434
XER, XLSX, HTML, XML, TXT, TIF, SVG, PNG, JPEG
3535

3636

37+
## Enhancements in Version 24.10
38+
- Enhanced reading data from Primavera-specific task's properties.
39+
3740
## Enhancements in Version 24.4
3841
- Added new ability to get views information
3942
- Possibility to modify table text styles for Gantt Chart views.

‎api/models/calendar.go

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ package models
2929

3030
// Represents a calendar used in a project.
3131
type Calendar struct {
32+
// Gets calendar's Guid.
33+
Guid string `json:"guid,omitempty"`
3234
// The name of the calendar.
3335
Name string `json:"name,omitempty"`
3436
// The unique identifier of the calendar.

‎api/models/configuration.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ func NewConfiguration(configFilePath string) (pConfig *Configuration, err error)
9292
cfg := Configuration{
9393
BaseUrl: "https://api.aspose.cloud",
9494
DebugMode: false,
95-
DefaultHeader: map[string]string{"x-aspose-client": "go sdk", "x-aspose-client-version": "24.4"},
95+
DefaultHeader: map[string]string{"x-aspose-client": "go sdk", "x-aspose-client-version": "24.10"},
9696
}
9797
err = json.Unmarshal(data, &cfg)
9898

‎api/models/primavera_activity_type.go

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/*
2+
* --------------------------------------------------------------------------------
3+
* <copyright company="Aspose" file="primavera_activity_type.go">
4+
* Copyright (c) 2021 Aspose.Tasks Cloud
5+
* </copyright>
6+
* <summary>
7+
* Permission is hereby granted, free of charge, to any person obtaining a copy
8+
* of this software and associated documentation files (the "Software"), to deal
9+
* in the Software without restriction, including without limitation the rights
10+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
* copies of the Software, and to permit persons to whom the Software is
12+
* furnished to do so, subject to the following conditions:
13+
*
14+
* The above copyright notice and this permission notice shall be included in all
15+
* copies or substantial portions of the Software.
16+
*
17+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23+
* SOFTWARE.
24+
* </summary>
25+
* --------------------------------------------------------------------------------
26+
*/
27+
28+
package models
29+
// PrimaveraActivityType : Specifies type of Primavera activity.
30+
type PrimaveraActivityType string
31+
32+
// List of PrimaveraActivityType
33+
const (
34+
NONE_PrimaveraActivityType PrimaveraActivityType = "None"
35+
START_MILESTONE_PrimaveraActivityType PrimaveraActivityType = "StartMilestone"
36+
FINISH_MILESTONE_PrimaveraActivityType PrimaveraActivityType = "FinishMilestone"
37+
TASK_DEPENDENT_PrimaveraActivityType PrimaveraActivityType = "TaskDependent"
38+
RESOURCE_DEPENDENT_PrimaveraActivityType PrimaveraActivityType = "ResourceDependent"
39+
LEVEL_OF_EFFORT_PrimaveraActivityType PrimaveraActivityType = "LevelOfEffort"
40+
WBS_SUMMARY_PrimaveraActivityType PrimaveraActivityType = "WbsSummary"
41+
)

‎api/models/primavera_duration_type.go

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/*
2+
* --------------------------------------------------------------------------------
3+
* <copyright company="Aspose" file="primavera_duration_type.go">
4+
* Copyright (c) 2021 Aspose.Tasks Cloud
5+
* </copyright>
6+
* <summary>
7+
* Permission is hereby granted, free of charge, to any person obtaining a copy
8+
* of this software and associated documentation files (the "Software"), to deal
9+
* in the Software without restriction, including without limitation the rights
10+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
* copies of the Software, and to permit persons to whom the Software is
12+
* furnished to do so, subject to the following conditions:
13+
*
14+
* The above copyright notice and this permission notice shall be included in all
15+
* copies or substantial portions of the Software.
16+
*
17+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23+
* SOFTWARE.
24+
* </summary>
25+
* --------------------------------------------------------------------------------
26+
*/
27+
28+
package models
29+
// PrimaveraDurationType : Specifies duration type of Primavera activity.
30+
type PrimaveraDurationType string
31+
32+
// List of PrimaveraDurationType
33+
const (
34+
NONE_PrimaveraDurationType PrimaveraDurationType = "None"
35+
FIXED_DURATION_UNITS_PrimaveraDurationType PrimaveraDurationType = "FixedDurationUnits"
36+
FIXED_DURATION_UNITS_TIME_PrimaveraDurationType PrimaveraDurationType = "FixedDurationUnitsTime"
37+
FIXED_UNITS_PrimaveraDurationType PrimaveraDurationType = "FixedUnits"
38+
FIXED_UNITS_TIME_PrimaveraDurationType PrimaveraDurationType = "FixedUnitsTime"
39+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
* --------------------------------------------------------------------------------
3+
* <copyright company="Aspose" file="primavera_percent_complete_type.go">
4+
* Copyright (c) 2021 Aspose.Tasks Cloud
5+
* </copyright>
6+
* <summary>
7+
* Permission is hereby granted, free of charge, to any person obtaining a copy
8+
* of this software and associated documentation files (the "Software"), to deal
9+
* in the Software without restriction, including without limitation the rights
10+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
* copies of the Software, and to permit persons to whom the Software is
12+
* furnished to do so, subject to the following conditions:
13+
*
14+
* The above copyright notice and this permission notice shall be included in all
15+
* copies or substantial portions of the Software.
16+
*
17+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23+
* SOFTWARE.
24+
* </summary>
25+
* --------------------------------------------------------------------------------
26+
*/
27+
28+
package models
29+
// PrimaveraPercentCompleteType : Specifies value of '% Complete Type' field for Primavera activities.
30+
type PrimaveraPercentCompleteType string
31+
32+
// List of PrimaveraPercentCompleteType
33+
const (
34+
NONE_PrimaveraPercentCompleteType PrimaveraPercentCompleteType = "None"
35+
DURATION_PrimaveraPercentCompleteType PrimaveraPercentCompleteType = "Duration"
36+
PHYSICAL_PrimaveraPercentCompleteType PrimaveraPercentCompleteType = "Physical"
37+
UNITS_PrimaveraPercentCompleteType PrimaveraPercentCompleteType = "Units"
38+
)

‎api/models/primavera_task_properties.go

+42
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,46 @@ type PrimaveraTaskProperties struct {
5353
RawCompletePercentType string `json:"rawCompletePercentType,omitempty"`
5454
// Raw text representation (as in source file) of 'Status' field of the activity.
5555
RawStatus string `json:"rawStatus,omitempty"`
56+
// Gets the value of duration percent complete.
57+
DurationPercentComplete float64 `json:"durationPercentComplete"`
58+
// Gets the value of Physical Percent Complete.
59+
PhysicalPercentComplete float64 `json:"physicalPercentComplete"`
60+
// Gets the value of actual non labor units.
61+
ActualNonLaborUnits float64 `json:"actualNonLaborUnits"`
62+
// Gets the value of actual labor units.
63+
ActualLaborUnits float64 `json:"actualLaborUnits"`
64+
// Gets the value of units percent complete.
65+
UnitsPercentComplete float64 `json:"unitsPercentComplete"`
66+
// Gets the value of remaining labor units.
67+
RemainingLaborUnits float64 `json:"remainingLaborUnits"`
68+
// Gets the value of remaining non labor units.
69+
RemainingNonLaborUnits float64 `json:"remainingNonLaborUnits"`
70+
// Gets the value of 'Duration Type' field of the activity.
71+
DurationType *PrimaveraDurationType `json:"durationType"`
72+
// Gets the value of 'Activity Type' field.
73+
ActivityType *PrimaveraActivityType `json:"activityType"`
74+
// Gets the value of '% Complete Type' field of the activity.
75+
PercentCompleteType *PrimaveraPercentCompleteType `json:"percentCompleteType"`
76+
// Gets the value of actual labor cost.
77+
ActualLaborCost float32 `json:"actualLaborCost"`
78+
// Gets the value of actual non labor cost.
79+
ActualNonlaborCost float32 `json:"actualNonlaborCost"`
80+
// Gets the value of actual material cost.
81+
ActualMaterialCost float32 `json:"actualMaterialCost"`
82+
// Gets the value of actual expense cost.
83+
ActualExpenseCost float32 `json:"actualExpenseCost"`
84+
// Gets the value of remaining expense cost.
85+
RemainingExpenseCost float32 `json:"remainingExpenseCost"`
86+
// Gets the total value of actual costs.
87+
ActualTotalCost float32 `json:"actualTotalCost"`
88+
// Gets the total value of budgeted (or planned) costs.
89+
BudgetedTotalCost float32 `json:"budgetedTotalCost"`
90+
// Gets the value of budgeted (or planned) labor cost.
91+
BudgetedLaborCost float32 `json:"budgetedLaborCost"`
92+
// Gets the value of budgeted (or planned) non labor cost.
93+
BudgetedNonlaborCost float32 `json:"budgetedNonlaborCost"`
94+
// Gets the value of of budgeted (or planned) material cost.
95+
BudgetedMaterialCost float32 `json:"budgetedMaterialCost"`
96+
// Gets the value of budgeted (or planned) expense cost.
97+
BudgetedExpenseCost float32 `json:"budgetedExpenseCost"`
5698
}

‎api/models/view.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ type View struct {
3535
Type_ *ItemType `json:"type"`
3636
// Gets the screen type for the single view. Read-only.
3737
Screen *ViewScreen `json:"screen"`
38-
// Gets or sets the name of a View object.
38+
// Gets or sets the name of a view object.
3939
Name string `json:"name,omitempty"`
4040
// Gets the unique identifier of a view.
4141
Uid int32 `json:"uid"`

‎docs/Calendar.md

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## Properties
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6+
**Guid** | **string** | Gets calendar&#39;s Guid. | [optional] [default to null]
67
**Name** | **string** | The name of the calendar. | [optional] [default to null]
78
**Uid** | **int32** | The unique identifier of the calendar. | [default to null]
89
**Days** | [**[]WeekDay**](WeekDay.md) | The collection of weekdays that defines the calendar. | [optional] [default to null]

‎docs/PrimaveraActivityType.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# PrimaveraActivityType
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
7+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
8+
9+

‎docs/PrimaveraDurationType.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# PrimaveraDurationType
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
7+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
8+
9+

‎docs/PrimaveraPercentCompleteType.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# PrimaveraPercentCompleteType
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
7+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
8+
9+

‎docs/PrimaveraTaskProperties.md

+21
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,27 @@ Name | Type | Description | Notes
1313
**RawActivityType** | **string** | Raw text representation (as in source file) of &#39;Activity Type&#39; field of the activity. | [optional] [default to null]
1414
**RawCompletePercentType** | **string** | Raw text representation (as in source file) of &#39;% Complete Type&#39; field of the activity. | [optional] [default to null]
1515
**RawStatus** | **string** | Raw text representation (as in source file) of &#39;Status&#39; field of the activity. | [optional] [default to null]
16+
**DurationPercentComplete** | **float64** | Gets the value of duration percent complete. | [default to null]
17+
**PhysicalPercentComplete** | **float64** | Gets the value of Physical Percent Complete. | [default to null]
18+
**ActualNonLaborUnits** | **float64** | Gets the value of actual non labor units. | [default to null]
19+
**ActualLaborUnits** | **float64** | Gets the value of actual labor units. | [default to null]
20+
**UnitsPercentComplete** | **float64** | Gets the value of units percent complete. | [default to null]
21+
**RemainingLaborUnits** | **float64** | Gets the value of remaining labor units. | [default to null]
22+
**RemainingNonLaborUnits** | **float64** | Gets the value of remaining non labor units. | [default to null]
23+
**DurationType** | [***PrimaveraDurationType**](PrimaveraDurationType.md) | Gets the value of &#39;Duration Type&#39; field of the activity. | [default to null]
24+
**ActivityType** | [***PrimaveraActivityType**](PrimaveraActivityType.md) | Gets the value of &#39;Activity Type&#39; field. | [default to null]
25+
**PercentCompleteType** | [***PrimaveraPercentCompleteType**](PrimaveraPercentCompleteType.md) | Gets the value of &#39;% Complete Type&#39; field of the activity. | [default to null]
26+
**ActualLaborCost** | **float32** | Gets the value of actual labor cost. | [default to null]
27+
**ActualNonlaborCost** | **float32** | Gets the value of actual non labor cost. | [default to null]
28+
**ActualMaterialCost** | **float32** | Gets the value of actual material cost. | [default to null]
29+
**ActualExpenseCost** | **float32** | Gets the value of actual expense cost. | [default to null]
30+
**RemainingExpenseCost** | **float32** | Gets the value of remaining expense cost. | [default to null]
31+
**ActualTotalCost** | **float32** | Gets the total value of actual costs. | [default to null]
32+
**BudgetedTotalCost** | **float32** | Gets the total value of budgeted (or planned) costs. | [default to null]
33+
**BudgetedLaborCost** | **float32** | Gets the value of budgeted (or planned) labor cost. | [default to null]
34+
**BudgetedNonlaborCost** | **float32** | Gets the value of budgeted (or planned) non labor cost. | [default to null]
35+
**BudgetedMaterialCost** | **float32** | Gets the value of of budgeted (or planned) material cost. | [default to null]
36+
**BudgetedExpenseCost** | **float32** | Gets the value of budgeted (or planned) expense cost. | [default to null]
1637

1738
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1839

‎docs/View.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
66
**ShowInMenu** | **bool** | Gets or sets a value indicating whether Microsoft Project shows the single view name in the View or the Other Views drop-down lists in the Ribbon | [default to null]
77
**Type_** | [***ItemType**](ItemType.md) | Gets the type of item in the single view, such as tasks or resources. Read-only. | [default to null]
88
**Screen** | [***ViewScreen**](ViewScreen.md) | Gets the screen type for the single view. Read-only. | [default to null]
9-
**Name** | **string** | Gets or sets the name of a View object. | [optional] [default to null]
9+
**Name** | **string** | Gets or sets the name of a view object. | [optional] [default to null]
1010
**Uid** | **int32** | Gets the unique identifier of a view. | [default to null]
1111

1212
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

‎tests/calendars_test.go

+6-5
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ func Test_Calendars_GetCalendar(t *testing.T) {
7979
}
8080
assert.Equal(t, int32(200), result.Code)
8181
assert.NotNil(t, result.Calendar)
82+
assert.Equal(t, "3F979F74-B9D3-4E5F-98DC-5E08060A0C30", result.Calendar.Guid)
8283
assert.Equal(t, "Standard", result.Calendar.Name)
8384
assert.Equal(t, int32(1), result.Calendar.Uid)
8485
assert.True(t, result.Calendar.IsBaseCalendar)
@@ -221,11 +222,11 @@ func Test_Calendars_PutCalendar(t *testing.T) {
221222
ToTime: CreateTime(1, 1, 1, 17, 0, 0),
222223
}
223224
putCalendarOpts := &requests.PutCalendarOpts{
224-
Name: remoteFileName,
225-
Folder: optional.NewString(remoteBaseTestDataFolder),
225+
Name: remoteFileName,
226+
Folder: optional.NewString(remoteBaseTestDataFolder),
226227
CalendarUid: 1,
227228
Calendar: models.Calendar{
228-
Uid: 1,
229+
Uid: 1,
229230
Name: "Modified calendar",
230231
IsBaseCalendar: false,
231232
IsBaselineCalendar: false,
@@ -301,8 +302,8 @@ func Test_Calendars_DeleteCalendar(t *testing.T) {
301302
assert.Equal(t, int32(200), deleteResult.Code)
302303

303304
getResult, _, err := client.TasksApi.GetCalendars(ctx, &requests.GetCalendarsOpts{
304-
Name: remoteFileName,
305-
Folder: optional.NewString(remoteBaseTestDataFolder),
305+
Name: remoteFileName,
306+
Folder: optional.NewString(remoteBaseTestDataFolder),
306307
})
307308
if err != nil {
308309
t.Error(err)

‎tests/primavera_properties_test.go

+4
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ package api_test
3030

3131
import (
3232
"github.com/antihax/optional"
33+
"github.com/aspose-tasks-cloud/aspose-tasks-cloud-go/api/models"
3334
"github.com/aspose-tasks-cloud/aspose-tasks-cloud-go/api/requests"
3435
"github.com/stretchr/testify/assert"
3536
"testing"
@@ -62,5 +63,8 @@ func Test_PrimaveraProperties_GetPrimaveraTaskProperties(t *testing.T) {
6263
assert.Equal(t, "Task Dependent", result.PrimaveraProperties.RawActivityType)
6364
assert.Equal(t, "Units", result.PrimaveraProperties.RawCompletePercentType)
6465
assert.Equal(t, "Not Started", result.PrimaveraProperties.RawStatus)
66+
assert.Equal(t, models.FIXED_UNITS_PrimaveraDurationType, *result.PrimaveraProperties.DurationType)
67+
assert.Equal(t, models.TASK_DEPENDENT_PrimaveraActivityType, *result.PrimaveraProperties.ActivityType)
68+
assert.Equal(t, models.UNITS_PrimaveraPercentCompleteType, *result.PrimaveraProperties.PercentCompleteType)
6569
t.Cleanup(func() { DeleteTestFileFromStorage(t, ctx, client) })
6670
}

0 commit comments

Comments
 (0)