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),existsandnot_existsare currently scoped withshowOn: ['string', 'enum']only—datetime is not included, so those operators never appear for datetime attributes. - On the API side,
attik-backend/src/routes/worklist.tsbuilds Mongo matches inbuildMongoCondition, includingexistsandnot_existsbranches that use the resolvedfieldPath;datetimemaps to the inspectiondatetimefield in the same helper.
Scope
Frontend
attik-frontend/src/components/conditions/Conditions.tsx— extendcomparisonOptionssoexists/not_existsapply todatetime(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— verifydatetime+exists/not_existsproduces the intended query (and does not conflict with special cases such asinspection-time).
References
attik-frontend/src/components/conditions/Conditions.tsxattik-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.