fix(content-import-job) fix key fields #30843
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request focuses on updating the content import functionality to use field IDs instead of field names.
Key changes include:
Validation and Schema Updates:
dotCMS/src/main/java/com/dotcms/jobs/business/processor/impl/ImportContentletsProcessor.java
: Updated the field validation logic to usefield.id()
instead offield.variable()
.dotCMS/src/main/java/com/dotcms/rest/api/v1/content/dotimport/ContentImportParamsSchema.java
: Modified the example JSON to use a field ID instead of a field name.Test Case Adjustments:
dotcms-integration/src/test/java/com/dotcms/rest/api/v1/content/dotimport/ContentImportResourceIntegrationTest.java
:fieldId
to store the ID of the first field in the content type. [1] [2]fieldId
instead of the field name "title". [1] [2] [3] [4]Postman Collection Update:
dotcms-postman/src/main/resources/postman/ContentImportResource.postman_collection.json
:fields
variable to be empty initially, to be populated by the script.This PR fixes: #30669