-
Notifications
You must be signed in to change notification settings - Fork 8
Bugfix/cmg 616 #713
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bugfix/cmg 616 #713
Conversation
…isting case it is getting mapped to title of existing content type
…into bugfix/cmg-616
…into bugfix/cmg-616
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request addresses the bugfix for CMG-616 by updating UI components, API service calls, and data mapping logic to ensure proper project creation, migration flow, and improved state management. Key changes include:
- Adding navigation and Redux dispatch calls in the Projects page to trigger project creation and start migration.
- Refactoring locale mapping and field mapping logic across multiple components (Modal, DestinationStack, ContentMapper, AdvancePropertise, etc.) to consistently use new identifiers such as backupFieldUid.
- Updating API service methods (WordPress and migration services) to properly handle asynchronous updates and log messaging.
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| ui/src/pages/Projects/index.tsx | Introduces new hooks (useNavigate, useDispatch) and calls to the createProject API with subsequent state updates and navigation. |
| ui/src/pages/Migration/index.tsx | Refines locale mapping logic using Object.entries and explicit label trimming. |
| ui/src/components/Modal/modal.interface.ts and index.tsx | Adds new interface definitions and simplifies the modal submit handler. |
| ui/src/components/DestinationStack & Actions/LoadLanguageMapper.tsx | Updates language mapper functionality for consistent handling of locales and renames parameters (e.g., uid, isStackChanged). |
| ui/src/components/ContentMapper/index.tsx | Refactors field mapping logic to use backupFieldUid and adjusts condition checks accordingly. |
| ui/src/components/AuditLogs/index.tsx | Replaces the table key with tableUid to clarify its purpose. |
| ui/src/components/AdvancePropertise | Updates function calls with an additional parameter to leverage contentstackFieldUid for enhanced mapping. |
| api/src/services/wordpress.service.ts and migration.service.ts | Implements asynchronous handling improvements and additional logging in project migration. |
| .talismanrc | Updates file ignore configuration for migration and audit log related files. |
Comments suppressed due to low confidence (3)
ui/src/components/DestinationStack/Actions/LoadLanguageMapper.tsx:277
- Consider renaming 'handleLanguageDeletaion' to 'handleLanguageDeletion' to correct the spelling and improve clarity.
const handleLanguageDeletaion = async (index: number, locale: { label: string; value: string }) => {
ui/src/components/ContentMapper/index.tsx:1481
- Verify that the use of 'backupFieldUid' accurately differentiates entries and ensure that it is consistently initialized throughout the data model.
if (!existingField[data?.backupFieldUid] && OptionsForRow?.[0]) {
ui/src/components/AuditLogs/index.tsx:146
- [nitpick] The change from 'tableKey' to 'tableUid' improves clarity; ensure this name consistently represents its purpose across the component.
setTableUid((prevUid) => prevUid + 1);
| .value(); | ||
| if (index > -1) { | ||
| ProjectModelLowdb.update((data: any) => { | ||
| await ProjectModelLowdb.update((data: any) => { |
Copilot
AI
Jun 25, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The addition of 'await' ensures that the project update completes before proceeding, which aligns with proper asynchronous handling practices.
| await ProjectModelLowdb.update((data: any) => { | |
| await await ProjectModelLowdb.update((data: any) => { |
No description provided.