Skip to content

Conversation

@araj00
Copy link
Contributor

@araj00 araj00 commented Jan 20, 2026

This fixes the #15896. For problem statement. Please refer to the shared video mentioned in the issue.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 20, 2026

Greptile Summary

This PR adds default value handling for BOOLEAN type filters in the useGetInitialFilterValue hook. When creating a new boolean filter with the IS operand, the hook now returns 'false' as the default value.

Context: This fixes issue #15896 where automation iterators with "search for record" filters on boolean fields would return the same record repeatedly after it was updated. The issue occurred because the boolean filter didn't have an initial default value, causing incorrect filter behavior.

How it works: The fix adds a case for BOOLEAN filters that mirrors the pattern used for DATE and DATE_TIME filters - when the operand is IS (the only operand available for boolean filters), it returns a default value. The string 'false' is then converted to a boolean in the filter pipeline via turnRecordFilterIntoGqlOperationFilter which uses the comparison recordFilter.value === 'true' to determine the actual boolean value.

Confidence Score: 5/5

  • This PR is safe to merge - it's a minimal, focused fix that correctly adds missing default value handling for boolean filters without side effects.
  • This is a straightforward, low-risk fix. The change adds a missing case in a switch statement that handles default filter values. The implementation follows the existing pattern used for DATE/DATE_TIME filters. The fix is localized to filter initialization and the default value ('false') is correctly converted by the existing filter pipeline. No breaking changes, no new dependencies, and minimal code modifications. The fix directly addresses the reported issue where boolean filters lacked default values.
  • No files require special attention

Important Files Changed

Filename Overview
packages/twenty-front/src/modules/object-record/object-filter-dropdown/hooks/useGetInitialFilterValue.ts Added BOOLEAN case to return default filter value 'false' when operand is IS. This fixes the issue where boolean filters didn't have an initial default value, causing search records to not work correctly in automation iterators.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 20, 2026

Greptile's behavior is changing!

From now on, if a review finishes with no comments, we will not post an additional "statistics" comment to confirm that our review found nothing to comment on. However, you can confirm that we reviewed your changes in the status check section.

This feature can be toggled off in your Code Review Settings by deselecting "Create a status check for each PR".

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

@github-actions
Copy link
Contributor

github-actions bot commented Jan 20, 2026

🚀 Preview Environment Ready!

Your preview environment is available at: http://bore.pub:62738

This environment will automatically shut down when the PR is closed or after 5 hours.

@araj00 araj00 force-pushed the 15896/Fix-Search-Record-Issue branch from d293be7 to 63b65d7 Compare January 21, 2026 04:25
@lucasbordeau lucasbordeau self-requested a review January 21, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant