-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[FIX] Add asignee and relation on task #8284
[FIX] Add asignee and relation on task #8284
Conversation
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.
PR Summary
This PR modifies the FieldsCard component to fix the display and editing of the Assignee field on Task show pages by correcting the relation field filtering logic.
- Fixed logical operator in
boxedRelationFieldMetadataItems
filter from&&
to||
in/packages/twenty-front/src/modules/object-record/record-show/components/FieldsCard.tsx
- Removed unnecessary condition check for
noteTargets
when object is not a Note - Removed unnecessary condition check for
taskTargets
when object is not a Task - Contains a commented out debug
console.log
statement that should be removed
1 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings | Greptile
objectNameSingular !== CoreObjectNameSingular.Note && | ||
fieldMetadataItem.name !== 'noteTargets' && | ||
fieldMetadataItem.name !== 'noteTargets' || | ||
objectNameSingular !== CoreObjectNameSingular.Task && | ||
fieldMetadataItem.name !== 'taskTargets', |
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.
logic: This condition has a logical error. Using || instead of && here will cause incorrect filtering of relation fields. The current logic will show all fields when either condition is false.
@@ -55,6 +55,8 @@ export const FieldsCard = ({ | |||
fieldMetadataItemA.name.localeCompare(fieldMetadataItemB.name), | |||
); | |||
|
|||
// console.log(JSON.st(availableFieldMetadataItems)) |
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.
style: Remove commented out console.log statement
Oh I'm sorry I didn't see @charlesBochet had raised an issue, I had already fixed it right before you raised the PR here: #8280 Glad we came to the same conclusion :). Thanks a lot for the effort |
No problem @FelixMalfait. Also, if you've got some time two more of my PR's are awaiting review. 🙃 |
FIX #8248
There was a minor logical error in the
boxedRelationFieldMetadataItems
. (see files changed)