Skip to content

Commit 00eaeda

Browse files
[TASKSCLOUD-898] - Deployed new 25.4 version.
1 parent 0eee323 commit 00eaeda

11 files changed

+733
-645
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ 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 25.4
38+
- Enhanced Task model.
39+
- Enhanced TaskLink model.
40+
- Enhanced ProjectRecalculationResult model.
41+
3742
## Enhancements in Version 24.10
3843
- Enhanced reading data from Primavera-specific task's properties.
3944

api/models/configuration.go

Lines changed: 1 addition & 1 deletion
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.10"},
95+
DefaultHeader: map[string]string{"x-aspose-client": "go sdk", "x-aspose-client-version": "25.4"},
9696
}
9797
err = json.Unmarshal(data, &cfg)
9898

api/models/project_recalculation_result.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,6 @@ package models
3131
type ProjectRecalculationResult struct {
3232
ValidationState *ProjectValidationState `json:"validationState"`
3333
ValidationErrorMessage string `json:"validationErrorMessage,omitempty"`
34+
// Gets the task uid which caused the validation error.
35+
FailedTaskUid int32 `json:"failedTaskUid,omitempty"`
3436
}

api/models/task.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ type Task struct {
8585
Contact string `json:"contact,omitempty"`
8686
// The projected or scheduled cost of a task.
8787
Cost float32 `json:"cost"`
88+
// Gets or sets a value of OutlineNumber.
89+
OutlineNumber string `json:"outlineNumber,omitempty"`
8890
// The difference between the baseline cost and total cost for a task.
8991
Cv float64 `json:"cv"`
9092
// The deadline for a task to be completed.
@@ -254,4 +256,6 @@ type Task struct {
254256
Warning bool `json:"warning"`
255257
// Represents activity id field - a task's unique identifier used by Primavera (only applicable to Primavera projects).
256258
ActivityId string `json:"activityId,omitempty"`
259+
// Contains the external task's Unique identifier when the task is external.
260+
ExternalUid int32 `json:"externalUid"`
257261
}

api/models/task_link.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,6 @@ type TaskLink struct {
3535
LinkType *TaskLinkType `json:"linkType"`
3636
Lag int32 `json:"lag"`
3737
LagFormat *TimeUnitType `json:"lagFormat"`
38+
// Gets or sets lag duration, depending on LagFormat.
39+
LinkLagTimeSpan *string `json:"linkLagTimeSpan,omitempty"`
3840
}

api/tasks_api.go

Lines changed: 654 additions & 640 deletions
Large diffs are not rendered by default.

docs/ProjectRecalculationResult.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
66
**ValidationState** | [***ProjectValidationState**](ProjectValidationState.md) | | [default to null]
77
**ValidationErrorMessage** | **string** | | [optional] [default to null]
8+
**FailedTaskUid** | **int32** | Gets the task uid which caused the validation error. | [optional] [default to null]
89

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

docs/Task.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Name | Type | Description | Notes
2929
**ConstraintType** | [***ConstraintType**](ConstraintType.md) | Provides choices for the type of constraint that can be applied for scheduling a task. | [default to null]
3030
**Contact** | **string** | The contact person for a task. | [optional] [default to null]
3131
**Cost** | **float32** | The projected or scheduled cost of a task. | [default to null]
32+
**OutlineNumber** | **string** | Gets or sets a value of OutlineNumber. | [optional] [default to null]
3233
**Cv** | **float64** | The difference between the baseline cost and total cost for a task. | [default to null]
3334
**Deadline** | [**time.Time**](time.Time.md) | The deadline for a task to be completed. | [default to null]
3435
**DurationVariance** | **string** | Contains the difference between the total duration of a task and the baseline duration of a task. | [default to null]
@@ -118,6 +119,7 @@ Name | Type | Description | Notes
118119
**OutlineCodes** | [**[]OutlineCode**](OutlineCode.md) | Task outline codes. | [optional] [default to null]
119120
**Warning** | **bool** | Represents the flag which indicates that task has schedule discrepancies. | [default to null]
120121
**ActivityId** | **string** | Represents activity id field - a task's unique identifier used by Primavera (only applicable to Primavera projects). | [optional] [default to null]
122+
**ExternalUid** | **int32** | Contains the external task's Unique identifier when the task is external. | [default to null]
121123

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

docs/TaskLink.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Name | Type | Description | Notes
1010
**LinkType** | [***TaskLinkType**](TaskLinkType.md) | | [default to null]
1111
**Lag** | **int32** | | [default to null]
1212
**LagFormat** | [***TimeUnitType**](TimeUnitType.md) | | [default to null]
13+
**LinkLagTimeSpan** | **string** | Gets or sets lag duration, depending on LagFormat. | [default to null]
1314

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

tests/task_document_format_test.go

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,3 +136,59 @@ func Test_TaskDocumentFormat_PostTaskDocumentWithFormat(t *testing.T) {
136136
assert.Equal(t, "Five to Eight Weeks Before Moving,16 days", fileAsStrings[0])
137137
t.Cleanup(func() { DeleteTestFileFromStorage(t, ctx, client) })
138138
}
139+
140+
// Test for get task document with format and extended properties.
141+
func Test_TaskDocumentFormat_PostTaskDocumentWithFormat_WithExtendedProps(t *testing.T) {
142+
localFileName := "Home_move_plan.mpp"
143+
remoteFileName := CreateRandomGuid() + localFileName
144+
client, ctx := UploadTestFileToStorage(t, localFileName, remoteBaseTestDataFolder+"/"+remoteFileName)
145+
146+
// SaveOptions parameters is a representation of
147+
// Aspose.Tasks's SaveOptions class or its format-specific inheritors (Like CsvOptions, etc):
148+
// See Aspose.Tasks reference: https://apireference.aspose.com/net/tasks/aspose.tasks.saving/saveoptions
149+
type (
150+
Column = struct {
151+
Type string
152+
Name string
153+
Property string
154+
Width int
155+
}
156+
View = struct {
157+
Columns []Column
158+
}
159+
saveOptions = struct {
160+
View View
161+
}
162+
)
163+
164+
so := saveOptions{
165+
View{
166+
[]Column{
167+
{"GanttChartColumn", "ID", "Id", 120},
168+
{"GanttChartColumn", "Active", "IsActive", 120},
169+
{"GanttChartColumn", "Name", "Name", 120},
170+
{"GanttChartColumn", "Duration", "Duration", 120},
171+
{"GanttChartColumn", "Start", "Start", 120},
172+
{"GanttChartColumn", "Finish", "Finish", 120},
173+
{"GanttChartColumn", "Predecessors", "Predecessors", 120},
174+
{"GanttChartColumn", "Successors", "Successors", 120},
175+
},
176+
},
177+
}
178+
opts := &requests.PostTaskDocumentWithFormatOpts{
179+
Name: remoteFileName,
180+
SaveOptions: so,
181+
Format: string(models.CSV_ProjectFileFormat),
182+
Folder: optional.NewString(remoteBaseTestDataFolder),
183+
}
184+
data, response, err := client.TasksApi.PostTaskDocumentWithFormat(ctx, opts)
185+
if err != nil {
186+
t.Error(err)
187+
}
188+
assert.Equal(t, 200, response.StatusCode)
189+
assert.NotNil(t, data)
190+
assert.Less(t, 1, len(data))
191+
fileAsStrings := ConvertBytesToStrings(data)
192+
assert.Equal(t, "ID;Active;Name;Duration;Start;Finish;Predecessors;Successors", fileAsStrings[0])
193+
t.Cleanup(func() { DeleteTestFileFromStorage(t, ctx, client) })
194+
}

0 commit comments

Comments
 (0)