Canvas update fails with API-1002 when repositioning 100+ elements
search cancel

Canvas update fails with API-1002 when repositioning 100+ elements

book

Article ID: 428408

calendar_today

Updated On:

Products

Clarity PPM SaaS Clarity PPM On Premise

Issue/Introduction

The Project Canvas fails to save and throws a validation error when a user attempts to reposition or add elements to a column that already contains 100 or more fields. This occurs because the PUT call to the canvasElements endpoint attempts to process all affected elements in a single batch, exceeding the hard-coded API limit of 100 records.

Steps to Reproduce: 

  1. Navigate to a Project Canvas and enter Configure mode.
  2. Populate a single column with 100 status report fields/elements.
  3. Save the current view to establish the baseline.
  4. Insert a new column or a new element at the top of the existing list to force a repositioning/re-indexing of the 100 existing fields.

Expected Results: 

The canvas UI should successfully re-index the elements and display the 101st field

Actual Results:

The canvas fails to update and displays the error: "API-1002 : Can only process 100 records at a time"



App-ca.logs:

ERROR ... [http-nio-8080-exec-131] ppm.rest (clarity:user:16135990__82251F24-1D88-4C4F-99A2-2E95C01D1575:PPM_REST_API) (f35e2340-cec2-4714-b5d3-043f10392cc6) com.ca.ppm.rest.exception.BadRequestException: API-1002 : Can only process 100 records at a time. at com.ca.platform.osf.object.rest.provider.ODFResourceProvider.validateMaxProcessingLimit(ODFResourceProvider.java:4072) at com.ca.platform.osf.object.rest.provider.ODFResourceProvider.updateEntity(ODFResourceProvider.java:1482) at com.ca.ppm.rest.resource.BaseResourceHandler.updateResource(BaseResourceHandler.java:638) at 

API PUT call fails 

http://localhost:3000/ppm/rest/v1/private/canvases/5007016/canvasElements

Response:

{
    "resourceId": null,
    "httpStatus": "400",
    "errorMessage": "API-1002 : Can only process 100 records at a time.",
    "errorCode": "api.maxRecordsProcessError"
}

Cause

DE182303

Resolution

DE182303, in review by engineering.