Skip to content

Commit

Permalink
Fixed that AddCheckListItemAsync did not use NamedPosition
Browse files Browse the repository at this point in the history
  • Loading branch information
rwjdk committed Nov 29, 2024
1 parent 2d5a71a commit baedd95
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Changelog
*Below is the version history of [TrelloDotNet](https://github.com/rwjdk/TrelloDotNet) (An wrapper of the Trello API)*

## 1.11.5 (29th of November 2024)
#### TrelloClient
- Fix that [AddChecklistItemAsync](https://github.com/rwjdk/TrelloDotNet/wiki/AddChecklistItemAsync) did not use the NamedPosition Property

<hr/>

## 1.11.4 (25th of November 2024)
#### TrelloClient
- Added [AddChecklistItemAsync](https://github.com/rwjdk/TrelloDotNet/wiki/AddChecklistItemAsync)
Expand Down
4 changes: 3 additions & 1 deletion src/TrelloDotNet/TrelloClient.Checklists.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ public async Task<Checklist> AddChecklistAsync(string cardId, Checklist checklis
/// <returns>The new Checklist Item</returns>
public async Task<ChecklistItem> AddChecklistItemAsync(string checklistId, ChecklistItem checkItemToAdd, CancellationToken cancellationToken = default)
{
return await _apiRequestController.Post<ChecklistItem>($"{UrlPaths.Checklists}/{checklistId}/{UrlPaths.CheckItems}", cancellationToken, _queryParametersBuilder.GetViaQueryParameterAttributes(checkItemToAdd));
var parameters = _queryParametersBuilder.GetViaQueryParameterAttributes(checkItemToAdd);
_queryParametersBuilder.AdjustForNamedPosition(parameters, checkItemToAdd.NamedPosition);
return await _apiRequestController.Post<ChecklistItem>($"{UrlPaths.Checklists}/{checklistId}/{UrlPaths.CheckItems}", cancellationToken, parameters);
}

internal async Task AddCheckItemsAsync(Checklist existingChecklist, params ChecklistItem[] checkItemsToAdd)
Expand Down
2 changes: 1 addition & 1 deletion src/TrelloDotNet/TrelloDotNet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<PackageProjectUrl>https://github.com/rwjdk/TrelloDotNet/wiki</PackageProjectUrl>
<PackageIcon>trello.png</PackageIcon>
<PackageTags>trello api rest .NET dotNet crud wrapper webhook automation</PackageTags>
<Version>1.11.4</Version>
<Version>1.11.5</Version>
<Company>RWJDK</Company>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
Expand Down

0 comments on commit baedd95

Please sign in to comment.