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

API - /rest/align/api/2/features filter by Parent ID with more than 20 entries in the result set not handled correctly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • 10.129.0
    • None
    • REST API
    • 1
    • Severity 3 - Minor
    • No

      Issue Summary

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

      Cannot get features. 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 anyway and does not retrieve the data

      Steps to Reproduce

      1. Go to your Rest API application and execute the following endpoint 
        1. GET /align/api/2/features + Filtered by Parent ID count more than 20
        2. Example: 
      https://<instance_name>.jiraalign.com/rest/align/api/2/Features?expand=true&filter=%20parentId%20eq%205847%20or%20parentId%20eq%205879%20or%20parentId%20eq%205933%20or%20parentId%20eq%206059%20or%20parentId%20eq%206085%20or%20parentId%20eq%206089%20or%20parentId%20eq%206091%20or%20parentId%20eq%206165%20or%20parentId%20eq%206176%20or%20parentId%20eq%206233%20or%20parentId%20eq%206245%20or%20parentId%20eq%206247%20or%20parentId%20eq%206254%20or%20parentId%20eq%206255%20or%20parentId%20eq%206293%20or%20parentId%20eq%206294%20or%20parentId%20eq%206295%20or%20parentId%20eq%206296%20or%20parentId%20eq%206297%20or%20parentId%20eq%206298%20or%20parentId%20eq%206299&top=100&skip=0 

      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 e.g.. 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.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 96
         at AgileCraft.Services.FeatureService.GetByUserAccess(BaseFilter filter, IDbTransaction transaction) in C:\projects\alignapi\AgileCraft.Services\FeatureService.cs:line 747
         at AgileCraft.Services.FeatureService.ExpandedGet(FeatureFilter filter, IDbTransaction transaction) in C:\projects\alignapi\AgileCraft.Services\FeatureService.cs:line 480
         at AgileCraft.Services.FeatureService.Get(FeatureFilter filter) in C:\projects\alignapi\AgileCraft.Services\FeatureService.cs:line 81
         at AgileCraft.Api.Controllers.BaseController`2.Get(String message, String errorMessage, TFilter filter) in C:\projects\alignapi\AgileCraft.Api\Controllers\BaseController.cs:line 131
         Level: Error
         MessageTemplate: User: {User}, Role: {Role}, Authentication type: {AuthenticationType}, Method: {Method}, Message: {Message}, QueryString: {QueryString}, HttpStatus: {HttpStatus}
         Properties: { [-]
           ActionId: 853e8112-9766-4230-80c4-6d12ef073c8c
           ActionName: AgileCraft.Api.Controllers.FeaturesController.Get (AgileCraft.Api)
           AuthenticationType: USERIDTOKEN
           Build: 10.123.3.21541
           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.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 96
         at AgileCraft.Services.FeatureService.GetByUserAccess(BaseFilter filter, IDbTransaction transaction) in C:\projects\alignapi\AgileCraft.Services\FeatureService.cs:line 747
         at AgileCraft.Services.FeatureService.ExpandedGet(FeatureFilter filter, IDbTransaction transaction) in C:\projects\alignapi\AgileCraft.Services\FeatureService.cs:line 480
         at AgileCraft.Services.FeatureService.Get(FeatureFilter filter) in C:\projects\alignapi\AgileCraft.Services\FeatureService.cs:line 81
         at AgileCraft.Api.Controllers.BaseController`2.Get(String message, String errorMessage, TFilter filter) in C:\projects\alignapi\AgileCraft.Api\Controllers\BaseController.cs:line 131
             Type: Microsoft.OData.ODataException
           }
           HttpStatus: 400
           Message: Cannot get features. 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: ?expand=true&$filter=parentId eq 5847 or parentId eq 5879 or parentId eq 5933or parentId eq 6059 or parentId eq 6085 or parentId eq 6089or parentId eq 6091 or parentId eq 6165 or parentId eq 6176 or parentId eq 6233 or parentId eq 6245 or parentId eq 6247 or parentId eq 6254 or parentId eq 6255 or parentId eq 6293 or parentId eq 6294 or parentId eq 6295 or parentId eq 6296 or parentId eq 6297 or parentId eq 6298 or parentId eq 6299&$top=100&$skip=0
           RequestId: 80015055-0002-ec00-b63f-84710c7967bb
           RequestPath: /rest/align/api/2/features
           Role: 3
           SourceContext: AgileCraft.Api.Controllers.FeaturesController
           User: 14257
         }
         RenderedMessage: User: "14257", Role: 3, Authentication type: USERIDTOKEN, Method: "GET", Message: "Cannot get features. The node count limit of '100' has been exceeded. To increase the limit, set the 'MaxNodeCount' property on EnableQueryAttribute or ODataValidationSettings.", QueryString: "?expand=true&$filter=parentId eq 5847 or parentId eq 5879 or parentId eq 5933or parentId eq 6059 or parentId eq 6085 or parentId eq 6089or parentId eq 6091 or parentId eq 6165 or parentId eq 6176 or parentId eq 6233 or parentId eq 6245 or parentId eq 6247 or parentId eq 6254 or parentId eq 6255 or parentId eq 6293 or parentId eq 6294 or parentId eq 6295 or parentId eq 6296 or parentId eq 6297 or parentId eq 6298 or parentId eq 6299&$top=100&$skip=0", HttpStatus: 400 

              fea1a6ef3355 Yannick Genin
              db6f196a263c Can Mutlugeldi
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: