Uploaded image for project: 'Jira Align'
  1. Jira Align
  2. JIRAALIGN-5164

Jira Align API call - GET /align/api/2/Teams by Program with more than 20 entries in the resultset not treated

XMLWordPrintable

    • 1
    • Severity 3 - Minor
    • No

      Issue Summary

       

      Executing the endpoint GET /align/api/2/Teams filtered by a Program with more than 20 teams in the resultset is breaking and throwing an error without being treated and not returning the values.

      Cannot get teams. The node count limit of '100' has been exceeded. To increase the limit, set the 'MaxNodeCount' property on EnableQueryAttribute or ODataValidationSettings. 

      Details:

      • This is reproducible: (yes) 
      • Even using $skip or $top not working it throws the error anyways and not retrieve the data

      Steps to Reproduce

      1. Have a Program A with 21 teams linked to it
      2. Go to your Rest API application and execute the following endpoint 
        1. GET /align/api/2/Teams + Filtered by Program A
        2. Example: https://alignsupport.jiraalign.com/rest/align/api/2/Teams?programIds=405&programIds=447&orderBy=name
        3. Now try to add $skip or $top to decrease the value on the result set, note that the error still occurs

      Expected Results

      If the default limit is 20, the result set for the execution should be the first 20  entry values instead of an error, and treat the other values ex. pagination, capability to use $skip or $top

      Actual Results

      Not returning any value/entry on the API Result set only the error:
      Cannot get teams. The node count limit of '100' has been exceeded. To increase the limit, set the 'MaxNodeCount' property on EnableQueryAttribute or ODataValidationSettings.
       

      { Exception: Microsoft.OData.ODataException: The node count limit of '100' has been exceeded. To increase the limit, set the 'MaxNodeCount' property on EnableQueryAttribute or ODataValidationSettings. at Community.OData.Linq.Builder.Validators.FilterQueryValidator.IncrementNodeCount(ODataValidationSettings validationSettings) at Community.OData.Linq.Builder.Validators.FilterQueryValidator.ValidateQueryNode(QueryNode node, ODataValidationSettings settings) at Community.OData.Linq.Builder.Validators.FilterQueryValidator.Validate(FilterClause filterClause, ODataValidationSettings settings, IEdmModel model) at Community.OData.Linq.ODataLinqExtensions.Filter[T](ODataQuery`1 query, String filterText, String entitySetName) at AgileCraft.Repositories.Models.Filters.RepositoryBaseFilter.AddOData[TEntity](IQueryable`1 queryable) in C:\projects\alignapi\AgileCraft.Repositories\Models\Filters\RepositoryBaseFilter.cs:line 26 at AgileCraft.Repositories.CrudBase`1.GetQueryable(RepositoryBaseFilter filter, IDbTransaction transaction) in C:\projects\alignapi\AgileCraft.Repositories\CrudBase.cs:line 95 at AgileCraft.Services.ServiceBase`2.GetQueryable(BaseFilter filter, IDbTransaction transaction) in C:\projects\alignapi\AgileCraft.Services\ServiceBase.cs:line 65 at AgileCraft.Services.ServiceBase`2.GetByUserAccess(BaseFilter filter, IDbTransaction transaction) in C:\projects\alignapi\AgileCraft.Services\ServiceBase.cs:line 60 at AgileCraft.Services.TeamService.GetByUserAccess(BaseFilter filter, IDbTransaction transaction) in C:\projects\alignapi\AgileCraft.Services\TeamService.cs:line 257 at AgileCraft.Services.TeamService.SimpleGet(TeamFilter filter, IDbTransaction transaction) in C:\projects\alignapi\AgileCraft.Services\TeamService.cs:line 278 at AgileCraft.Services.TeamService.Get(TeamFilter filter) in C:\projects\alignapi\AgileCraft.Services\TeamService.cs:line 86 at AgileCraft.Api.Controllers.BaseController`2.Get(String message, String errorMessage, TFilter filter) in C:\projects\alignapi\AgileCraft.Api\Controllers\BaseController.cs:line 106 Level: Error MessageTemplate: User: {User}, Role: {Role}, Authentication type: {AuthenticationType}, Method: {Method}, Message: {Message}, QueryString: {QueryString}, HttpStatus: {HttpStatus} Properties: { ActionId: a3cfaaec-0dd9-4f3e-8727-5eb61714ca41 ActionName: AgileCraft.Api.Controllers.TeamsController.Get (AgileCraft.Api) AuthenticationType: USERIDTOKEN Build: 10.121.3.21073 ExceptionDetail: { HResult: -2146233079 Message: The node count limit of '100' has been exceeded. To increase the limit, set the 'MaxNodeCount' property on EnableQueryAttribute or ODataValidationSettings. Source: Community.OData.Linq StackTrace: at Community.OData.Linq.Builder.Validators.FilterQueryValidator.IncrementNodeCount(ODataValidationSettings validationSettings) at Community.OData.Linq.Builder.Validators.FilterQueryValidator.ValidateQueryNode(QueryNode node, ODataValidationSettings settings) at Community.OData.Linq.Builder.Validators.FilterQueryValidator.Validate(FilterClause filterClause, ODataValidationSettings settings, IEdmModel model) at Community.OData.Linq.ODataLinqExtensions.Filter[T](ODataQuery`1 query, String filterText, String entitySetName) at AgileCraft.Repositories.Models.Filters.RepositoryBaseFilter.AddOData[TEntity](IQueryable`1 queryable) in C:\projects\alignapi\AgileCraft.Repositories\Models\Filters\RepositoryBaseFilter.cs:line 26 at AgileCraft.Repositories.CrudBase`1.GetQueryable(RepositoryBaseFilter filter, IDbTransaction transaction) in C:\projects\alignapi\AgileCraft.Repositories\CrudBase.cs:line 95 at AgileCraft.Services.ServiceBase`2.GetQueryable(BaseFilter filter, IDbTransaction transaction) in C:\projects\alignapi\AgileCraft.Services\ServiceBase.cs:line 65 at AgileCraft.Services.ServiceBase`2.GetByUserAccess(BaseFilter filter, IDbTransaction transaction) in C:\projects\alignapi\AgileCraft.Services\ServiceBase.cs:line 60 at AgileCraft.Services.TeamService.GetByUserAccess(BaseFilter filter, IDbTransaction transaction) in C:\projects\alignapi\AgileCraft.Services\TeamService.cs:line 257 at AgileCraft.Services.TeamService.SimpleGet(TeamFilter filter, IDbTransaction transaction) in C:\projects\alignapi\AgileCraft.Services\TeamService.cs:line 278 at AgileCraft.Services.TeamService.Get(TeamFilter filter) in C:\projects\alignapi\AgileCraft.Services\TeamService.cs:line 86 at AgileCraft.Api.Controllers.BaseController`2.Get(String message, String errorMessage, TFilter filter) in C:\projects\alignapi\AgileCraft.Api\Controllers\BaseController.cs:line 106 Type: Microsoft.OData.ODataException } HttpStatus: 400 Message: Cannot get teams. The node count limit of '100' has been exceeded. To increase the limit, set the 'MaxNodeCount' property on EnableQueryAttribute or ODataValidationSettings. Method: GET Product: AgileCraft.Api QueryString: ?orderBy=name&programIds=196 RequestId: 800081f9-0000-dc00-b63f-84710c7967bb RequestPath: /rest/align/api/2/Teams Role: 9 SourceContext: AgileCraft.Api.Controllers.TeamsController User: 661727 } RenderedMessage: User: "661727", Role: 9, Authentication type: USERIDTOKEN, Method: "GET", Message: "Cannot get teams. The node count limit of '100' has been exceeded. To increase the limit, set the 'MaxNodeCount' property on EnableQueryAttribute or ODataValidationSettings.", QueryString: "?orderBy=name&programIds=196", HttpStatus: 400 Timestamp: 2023-07-12T10:55:16.6419176-04:00} 

      Workaround

      Currently there is no known workaround for this behavior. 

              csmith1@atlassian.com Cap Smith
              f58471712ff6 Victor Fragoso
              Votes:
              3 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: