Skip to content

Commit

Permalink
Release 97 (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
tspence authored Oct 25, 2023
1 parent 712755d commit 2e2d984
Show file tree
Hide file tree
Showing 9 changed files with 138 additions and 19 deletions.
17 changes: 6 additions & 11 deletions ProjectManagerClient.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package >
<metadata>
<id>ProjectManager.SDK</id>
<version>96.0.2123</version>
<version>97.0.2178</version>
<title>ProjectManager.SDK</title>
<authors>ProjectManager.com</authors>
<owners>ProjectManager.com, Inc.</owners>
Expand All @@ -14,19 +14,14 @@
<readme>docs/README.md</readme>
<summary>ProjectManager API for DotNet</summary>
<releaseNotes>
# Patch notes for 96.0.2123
# Patch notes for 97.0.2178

These patch notes summarize the changes from version 11.1.2053.
These patch notes summarize the changes from version 96.0.2123.

Added 3 new APIs:
* ProjectMembers.RetrieveNewProjectMembers (GET /api/data/projects/members)
* ProjectTemplate.RetrieveTemplateCategories (GET /api/data/projects/templates/categories)
* Resource.RetrieveResource (GET /api/data/resources/{resourceId})

Deprecated 3 old APIs:
* Jira.RetrieveProjectsfromJirawithEpic
* Jira.RetrieveProjectsfromJira
* Jira.RetrieveProjectsfromJira
* Task.AddParentTask (POST /api/data/tasks/{taskId}/parent/{parentTaskId})
* Task.UpdateParentTask (PUT /api/data/tasks/{taskId}/parent/{parentTaskId})
* Task.RemoveParentTask (DELETE /api/data/tasks/{taskId}/parent)


</releaseNotes>
Expand Down
35 changes: 35 additions & 0 deletions src/Clients/TaskClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,5 +150,40 @@ public async Task<AstroResult<ChangeSetStatusDto[]>> CreateManyTasks(Guid projec
var url = $"/api/data/projects/{projectId}/tasks/bulk";
return await _client.Request<ChangeSetStatusDto[]>(HttpMethod.Post, url, null, body, null);
}

/// <summary>
/// Adds a task parent relationship
///
/// </summary>
/// <param name="taskId">The task that will become the child</param>
/// <param name="parentTaskId">The parent task</param>
public async Task<AstroResult<ChangeSetStatusDto>> AddParentTask(Guid taskId, Guid parentTaskId)
{
var url = $"/api/data/tasks/{taskId}/parent/{parentTaskId}";
return await _client.Request<ChangeSetStatusDto>(HttpMethod.Post, url, null, null, null);
}

/// <summary>
/// Updates a task parent relationship
///
/// </summary>
/// <param name="taskId">The task that will become the child</param>
/// <param name="parentTaskId">The parent task</param>
public async Task<AstroResult<ChangeSetStatusDto>> UpdateParentTask(Guid taskId, Guid parentTaskId)
{
var url = $"/api/data/tasks/{taskId}/parent/{parentTaskId}";
return await _client.Request<ChangeSetStatusDto>(HttpMethod.Put, url, null, null, null);
}

/// <summary>
/// Removes a task parent relationship completely
///
/// </summary>
/// <param name="taskId">The child task</param>
public async Task<AstroResult<ChangeSetStatusDto>> RemoveParentTask(Guid taskId)
{
var url = $"/api/data/tasks/{taskId}/parent";
return await _client.Request<ChangeSetStatusDto>(HttpMethod.Delete, url, null, null, null);
}
}
}
2 changes: 1 addition & 1 deletion src/IProjectManagerClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* @author ProjectManager.com <[email protected]>
*
* @copyright 2023-2023 ProjectManager.com, Inc.
* @version 96.0.2123
* @version 97.0.2178
* @link https://github.com/projectmgr/projectmanager-sdk-csharp
*/

Expand Down
23 changes: 23 additions & 0 deletions src/Interfaces/ITaskClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,28 @@ public interface ITaskClient
/// <param name="projectId">The unique identifier of the Project that will contain these Tasks</param>
/// <param name="body">The list of new Tasks to create</param>
Task<AstroResult<ChangeSetStatusDto[]>> CreateManyTasks(Guid projectId, TaskCreateDto[] body);

/// <summary>
/// Adds a task parent relationship
///
/// </summary>
/// <param name="taskId">The task that will become the child</param>
/// <param name="parentTaskId">The parent task</param>
Task<AstroResult<ChangeSetStatusDto>> AddParentTask(Guid taskId, Guid parentTaskId);

/// <summary>
/// Updates a task parent relationship
///
/// </summary>
/// <param name="taskId">The task that will become the child</param>
/// <param name="parentTaskId">The parent task</param>
Task<AstroResult<ChangeSetStatusDto>> UpdateParentTask(Guid taskId, Guid parentTaskId);

/// <summary>
/// Removes a task parent relationship completely
///
/// </summary>
/// <param name="taskId">The child task</param>
Task<AstroResult<ChangeSetStatusDto>> RemoveParentTask(Guid taskId);
}
}
13 changes: 9 additions & 4 deletions src/Models/ProjectCreateDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ namespace ProjectManager.SDK.Models
/// A Project is a collection of Tasks that contributes towards a goal. Within a Project, Tasks
/// represent individual items of work that team members must complete. The sum total of Tasks
/// within a Project represents the work to be completed for that Project.
///
/// Fields that cannot be selected during a CreateProject API call are not visible on this
/// data model.
/// </summary>
public class ProjectCreateDto : ApiModel
{
Expand Down Expand Up @@ -107,12 +110,14 @@ public class ProjectCreateDto : ApiModel
public bool? Template { get; set; }

/// <summary>
/// The Template that this project should be created from.
/// When creating a Project, you can optionally specify a Template to use to construct
/// the Project using a collection of pre-designed Tasks.
///
/// Specifying a TemplateId will copy default settings for Tasks.
/// Specifying a value in the TemplateId field will copy default settings for Tasks from
/// your template Project into the newly created Project.
///
/// NOTE: This does not support custom templates - TemplateId has to be a reference
/// to a static non-Custom template.
/// This field does not support custom templates. You must choose from a list of
/// ProjectManager-supplied templates.
/// </summary>
public Guid? TemplateId { get; set; }

Expand Down
35 changes: 34 additions & 1 deletion src/Models/ProjectDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ public class ProjectDto : ApiModel
{

/// <summary>
/// The unique identifier of the Project.
/// The unique identifier of the Project. This value is set by the system and cannot
/// be set with a CreateProject or changed with an UpdateProject call.
/// </summary>
public Guid? Id { get; set; }

Expand Down Expand Up @@ -97,6 +98,32 @@ public class ProjectDto : ApiModel
/// </summary>
public string TargetDate { get; set; }

/// <summary>
/// The planned start date for this Project. This is calculated based
/// off of the earliest task start date
/// </summary>
public DateTime? PlannedStartDate { get; set; }

/// <summary>
/// The planned start date for this Project. This is calculated based
/// off of the latest task finish date
/// </summary>
public DateTime? PlannedFinishDate { get; set; }

/// <summary>
/// The actual start date for this Project. This is calculated based
/// on the earliest task actual start date, or null if no projects have
/// been started
/// </summary>
public DateTime? ActualStartDate { get; set; }

/// <summary>
/// The actual finish date for this Project. This is calculated based
/// on the latest task actual finish date, or null if no projects have
/// been finished
/// </summary>
public DateTime? ActualFinishDate { get; set; }

/// <summary>
/// The ProjectPriority level of this Project, if defined.
/// </summary>
Expand Down Expand Up @@ -139,11 +166,17 @@ public class ProjectDto : ApiModel

/// <summary>
/// The timestamp in UTC when the Project was most recently modified.
///
/// This field is automatically determined by the system when this Project is modified
/// and cannot be directly changed by the user.
/// </summary>
public DateTime? ModifyDate { get; set; }

/// <summary>
/// The timestamp in UTC when the Project was created.
///
/// This field is automatically determined by the system when this Project is created
/// and cannot be changed by the user.
/// </summary>
public DateTime? CreateDate { get; set; }

Expand Down
3 changes: 3 additions & 0 deletions src/Models/ProjectUpdateDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ namespace ProjectManager.SDK.Models
/// A Project is a collection of Tasks that contributes towards a goal. Within a Project, Tasks
/// represent individual items of work that team members must complete. The sum total of Tasks
/// within a Project represents the work to be completed for that Project.
///
/// Fields that cannot be modified during an UpdateProject call are not visible on this data
/// model.
/// </summary>
public class ProjectUpdateDto : ApiModel
{
Expand Down
25 changes: 25 additions & 0 deletions src/Models/TaskDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ public class TaskDto : ApiModel
/// </summary>
public TaskProjectDto Project { get; set; }

/// <summary>
/// The TaskTags that apply to this Task.
/// </summary>
public TaskTagDto[] Tags { get; set; }

/// <summary>
/// The unique identifier of the Project to which this Task belongs.
/// </summary>
Expand All @@ -48,6 +53,11 @@ public class TaskDto : ApiModel
/// </summary>
public TaskAssigneeDto[] Assignees { get; set; }

/// <summary>
/// A list of TaskTodo items, which are sub-tasks within this Task.
/// </summary>
public TaskTodoDto[] Todos { get; set; }

/// <summary>
/// A short ID that can be used to refer to this Task. This short ID is
/// guaranteed to be unique within your Workspace.
Expand All @@ -64,6 +74,11 @@ public class TaskDto : ApiModel
/// </summary>
public string Description { get; set; }

/// <summary>
/// The TaskStatus assigned to this Task.
/// </summary>
public TaskStatusDto Status { get; set; }

/// <summary>
/// The date when work on this Task is planned to begin.
///
Expand Down Expand Up @@ -192,5 +207,15 @@ public class TaskDto : ApiModel
/// The planned cost for this Task. Cannot be negative.
/// </summary>
public decimal? PlannedCost { get; set; }

/// <summary>
/// The planned duration (in minutes) for this Task.
/// </summary>
public int? PlannedDuration { get; set; }

/// <summary>
/// The planned effort (in minutes) for this Task.
/// </summary>
public int? PlannedEffort { get; set; }
}
}
4 changes: 2 additions & 2 deletions src/ProjectManagerClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* @author ProjectManager.com <[email protected]>
*
* @copyright 2023-2023 ProjectManager.com, Inc.
* @version 96.0.2123
* @version 97.0.2178
* @link https://github.com/projectmgr/projectmanager-sdk-csharp
*/

Expand Down Expand Up @@ -39,7 +39,7 @@ public class ProjectManagerClient : IProjectManagerClient
/// <summary>
/// The version of the SDK
/// </summary>
public const string SdkVersion = "96.0.2123";
public const string SdkVersion = "97.0.2178";

private readonly string _apiUrl;
private readonly HttpClient _client;
Expand Down

0 comments on commit 2e2d984

Please sign in to comment.