tegon
tegon copied to clipboard
fix: dueDate and labelids issues
Errors:
- Type mismatch error:
- The dueDate field in the Issue model was expecting a string or null, but it was receiving a Date object.
- MobX-State-Tree conversion error:
- Even when passing an ISO string, MobX-State-Tree was unable to assign the value to the dueDate field.
- State tree conflict with labelIds:
- When updating the issue, there was an attempt to add an object to the state tree that was already part of another state tree, specifically with the labelIds field.
Fixes:
- Updated the Issue model definition to explicitly handle dueDate as a nullable string.
- Modified the dueDateChange function to convert Date objects to ISO strings before updating the issue.
- Updated the update function in update-issue.tsx to properly handle both dueDate and labelIds when preparing update data.
- Adjusted the updateIssue action in the store to create a new labelIds array, preventing state tree conflicts.
- Implemented additional error handling and logging throughout the update process for better debugging.
- Ensured that null values for dueDate are properly handled when clearing the date.
- Addressed potential issues with existing labelIds to prevent conflicts when updating an issue.
- These changes collectively resolve type mismatches, state tree conflicts, and improve the overall robustness of the due date update functionality.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| tegon | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Oct 11, 2024 11:18am |