-
Notifications
You must be signed in to change notification settings - Fork 467
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(content-import-job) fix key fields (#30843)
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`](diffhunk://#diff-f5dc237cd813ef4bac45f0d238379d561192b07c9c1dd7e03619cde2ee3566adL232-R232): Updated the field validation logic to use `field.id()` instead of `field.variable()`. * [`dotCMS/src/main/java/com/dotcms/rest/api/v1/content/dotimport/ContentImportParamsSchema.java`](diffhunk://#diff-ac814b1da2510effe84f7fbd1a316ce69ca5146951885d5d4a325fbfef2ab8e4L31-R31): 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`: * Added `fieldId` to store the ID of the first field in the content type. [[1]](diffhunk://#diff-038e819a6c662a05544ffc5a4c261de236b8dad56f380b9c4623d35c7a89e99bR60) [[2]](diffhunk://#diff-038e819a6c662a05544ffc5a4c261de236b8dad56f380b9c4623d35c7a89e99bR77-R78) * Updated test cases to use `fieldId` instead of the field name "title". [[1]](diffhunk://#diff-038e819a6c662a05544ffc5a4c261de236b8dad56f380b9c4623d35c7a89e99bL104-R111) [[2]](diffhunk://#diff-038e819a6c662a05544ffc5a4c261de236b8dad56f380b9c4623d35c7a89e99bL122-R129) [[3]](diffhunk://#diff-038e819a6c662a05544ffc5a4c261de236b8dad56f380b9c4623d35c7a89e99bL139-R146) [[4]](diffhunk://#diff-038e819a6c662a05544ffc5a4c261de236b8dad56f380b9c4623d35c7a89e99bL157-R164) ### Postman Collection Update: * `dotcms-postman/src/main/resources/postman/ContentImportResource.postman_collection.json`: * Added a script to set the field ID in the collection variables after creating the content type. * Updated the `fields` variable to be empty initially, to be populated by the script.
- Loading branch information
1 parent
7a64a00
commit 9a5d196
Showing
4 changed files
with
43 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters