Skip to content
This repository was archived by the owner on May 8, 2020. It is now read-only.

Commit 1c49e45

Browse files
committed
Fix to Search method, did not work before
1 parent e1223ae commit 1c49e45

4 files changed

Lines changed: 28 additions & 9 deletions

File tree

LeanKit.API.Client.Library/LeanKit.API.Client.Library.csproj

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,11 @@
3636
<Prefer32Bit>false</Prefer32Bit>
3737
</PropertyGroup>
3838
<ItemGroup>
39-
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
40-
<SpecificVersion>False</SpecificVersion>
41-
<HintPath>..\..\LeanKit.IntegrationService\packages\Newtonsoft.Json.6.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>
39+
<Reference Include="Newtonsoft.Json">
40+
<HintPath>..\packages\Newtonsoft.Json.6.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>
4241
</Reference>
43-
<Reference Include="RestSharp, Version=104.4.0.0, Culture=neutral, processorArchitecture=MSIL">
44-
<SpecificVersion>False</SpecificVersion>
45-
<HintPath>..\..\LeanKit.IntegrationService\packages\RestSharp.104.4.0\lib\net4\RestSharp.dll</HintPath>
42+
<Reference Include="RestSharp">
43+
<HintPath>..\packages\RestSharp.104.4.0\lib\net4\RestSharp.dll</HintPath>
4644
</Reference>
4745
<Reference Include="System" />
4846
<Reference Include="System.ComponentModel.DataAnnotations" />
@@ -101,6 +99,7 @@
10199
<Compile Include="TransferObjects\ClassOfService.cs" />
102100
<Compile Include="TransferObjects\Comment.cs" />
103101
<Compile Include="TransferObjects\CreateTaskboardCommand.cs" />
102+
<Compile Include="TransferObjects\PaginationResult.cs" />
104103
<Compile Include="TransferObjects\Taskboard.cs" />
105104
<Compile Include="TransferObjects\TaskboardCreateResult.cs" />
106105
<Compile Include="TransferObjects\HierarchicalLane.cs" />

LeanKit.API.Client.Library/LeanKitClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ public IEnumerable<CardEvent> GetCardHistory(long boardId, long cardId)
293293
public IEnumerable<CardView> SearchCards(long boardId, SearchOptions options)
294294
{
295295
var resource = "/Kanban/Api/Board/" + boardId + "/SearchCards";
296-
return _restCommandProcessor.Get<List<CardView>>(_accountAuth, resource, options);
296+
return _restCommandProcessor.Post<PaginationResult<CardView>>(_accountAuth, resource, options).Results;
297297
}
298298

299299
public IEnumerable<CardList> ListNewCards(long boardId)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using System.Collections.Generic;
2+
3+
namespace LeanKit.API.Client.Library.TransferObjects
4+
{
5+
public class PaginationResult<T>
6+
{
7+
public IEnumerable<T> Results { get; set; }
8+
public int TotalResults { get; set; }
9+
10+
public int Page { get; set; }
11+
public int MaxResults { get; set; }
12+
}
13+
}

LeanKit.API.Client.Library/TransferObjects/SearchOptions.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public SearchOptions()
1313
IncludeArchiveOnly = false;
1414
IncludeBacklogOnly = false;
1515
IncludeComments = false;
16-
IncludeDescription = false;
16+
UseFuzzySearch = false;
1717
IncludeExternalId = false;
1818
IncludeTags = false;
1919
AddedAfter = null;
@@ -24,25 +24,32 @@ public SearchOptions()
2424
MaxResults = 20;
2525
OrderBy = "CreatedOn";
2626
SortOrder = SortOrder.Ascending;
27+
AssignedUserIds = new long[0];
2728
}
2829

2930
public string SearchTerm { get; set; }
3031
public bool ExcludeArchiveAndBacklog { get; set; }
3132
public bool IncludeArchiveOnly { get; set; }
3233
public bool IncludeBacklogOnly { get; set; }
33-
public bool IncludeDescription { get; set; }
3434
public bool IncludeComments { get; set; }
3535
public bool IncludeExternalId { get; set; }
36+
public bool IncludeTaskBoards { get; set; }
3637
public string LaneId { get; set; }
3738
public string AddedBefore { get; set; }
3839
public string AddedAfter { get; set; }
3940
public bool IncludeTags { get; set; }
4041
public long[] CardTypeIds { get; set; }
4142
public long[] ClassOfServiceIds { get; set; }
43+
public bool UseFuzzySearch { get; set; }
4244
public int Page { get; set; }
4345
public int MaxResults { get; set; }
4446
public string OrderBy { get; set; }
4547
public SortOrder SortOrder { get; set; }
48+
public long[] AssignedUserIds { get; set; }
49+
public bool SearchInBoard { get; set; }
50+
public bool SearchInBacklog { get; set; }
51+
public bool SearchInRecentArchive { get; set; }
52+
public bool SearchInOldArchive { get; set; }
4653
}
4754

4855
public enum SortOrder

0 commit comments

Comments
 (0)