Skip to content
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 viewFilter operand for dateTime fields #7306

Merged
merged 5 commits into from
Sep 27, 2024

Conversation

Weiko
Copy link
Member

@Weiko Weiko commented Sep 27, 2024

No description provided.

@Weiko Weiko changed the title fix-view-filter-operand-for-date-time Fix viewFilter operand for dateTime fields Sep 27, 2024
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This pull request introduces a new command to fix view filter operands for date-time fields, updating 'lessThan' to 'before' and 'moreThan' to 'after' across all active workspaces.

  • Added FixViewFilterOperandForDateTimeCommand in packages/twenty-server/src/database/commands/upgrade-version/0-30/0-30-fix-view-filter-operand-for-date-time.command.ts
  • Included FixViewFilterOperandForDateTimeCommand in UpgradeTo0_30Command constructor but not executed in executeActiveWorkspacesCommand
  • Added FixViewFilterOperandForDateTimeCommand to UpgradeTo0_30CommandModule providers
  • Consider executing fixViewFilterOperandForDateTimeCommand in executeActiveWorkspacesCommand to apply the fix during upgrades

3 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings

Comment on lines +43 to +46
const dataSourceMetadata =
await this.dataSourceService.getLastDataSourceMetadataFromWorkspaceId(
workspaceId,
);
Copy link
Contributor

Choose a reason for hiding this comment

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

style: dataSourceMetadata is fetched but not used. Consider removing if unnecessary.

@@ -28,6 +29,7 @@ export class UpgradeTo0_30Command extends ActiveWorkspacesCommandRunner {
private readonly setStaleMessageSyncBackToPendingCommand: SetStaleMessageSyncBackToPendingCommand,
private readonly fixEmailFieldsToEmailsCommand: FixEmailFieldsToEmailsCommand,
private readonly migratePhoneFieldsToPhones: MigratePhoneFieldsToPhonesCommand,
private readonly fixViewFilterOperandForDateTimeCommand: FixViewFilterOperandForDateTimeCommand,
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: New command injected but not used in executeActiveWorkspacesCommand

@charlesBochet charlesBochet merged commit ae6777f into main Sep 27, 2024
6 checks passed
@charlesBochet charlesBochet deleted the c--fix-view-filter-operand-for-date-time-command branch September 27, 2024 17:10
harshit078 pushed a commit to harshit078/twenty that referenced this pull request Oct 14, 2024
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.

2 participants