Add Exists/Does not exist to datetime conditions

Objective

  • Make Exists and Does not exist available as comparison operators when the condition attribute is a datetime field (worklists and any other surfaces that reuse the same condition builder).
  • End users should be able to express “inspection datetime is set / unset” (and similar) without workarounds.

Background

  • Product feedback (Slack): teams expect the same null-check style operators for datetimes that already exist for strings/enums.
  • In the shared condition UI (attik-frontend/src/components/conditions/Conditions.tsx), exists and not_exists are currently scoped with showOn: ['string', 'enum'] only—datetime is not included, so those operators never appear for datetime attributes.
  • On the API side, attik-backend/src/routes/worklist.ts builds Mongo matches in buildMongoCondition, including exists and not_exists branches that use the resolved fieldPath; datetime maps to the inspection datetime field in the same helper.

Scope

Frontend

  • attik-frontend/src/components/conditions/Conditions.tsx — extend comparisonOptions so exists / not_exists apply to datetime (and confirm any attribute-meta / typing for conditions stays consistent).
  • Related types if needed: attik-frontend/src/util/types/serverTypeCollection/conditions.ts.

Backend

  • attik-backend/src/routes/worklist.ts — verify datetime + exists / not_exists produces the intended query (and does not conflict with special cases such as inspection-time).

References

  • attik-frontend/src/components/conditions/Conditions.tsx
  • attik-backend/src/routes/worklist.ts (buildMongoCondition)

Additional request

  • Extend this to cover date fields generally, not just datetime, so end users can express “date exists” / “date does not exist” for any supported date-based field in the condition builder.

Please authenticate to join the conversation.

Upvoters
Status

Completed

Board
🏠

Main App

Date

30 days ago

Author

Linear

Subscribe to post

Get notified by email when there are changes.