America/New_York) instead of silently defaulting to Denver (America/Denver).checkCondition in conditionsResolver.ts calls evalInspectionTimeCondition(condition, actualValue, undefined) — timezone is never passed, so inspectionTimeMatch.ts falls back to INSPECTION_TIME_TZ_FALLBACK (America/Denver).res.locals.company?.timezone into buildInspectionTimeMongoMatch in worklist.ts. Action flow send windows in flowEventTriggerer.ts and handleFlowStart.ts already load company timezone for delay/window math — only inspection-time conditionals are out of sync.ValueConditionInput.tsx uses session useTimezone() (company tz from tools/layout.tsx); admins configure times in local company time, but BullMQ execution path handleEventTriggerdByBull.ts → evaluateConditions does not.America/Denver (companySchema.ts) when unset — separate from this bug, but Eastern companies must have timezone saved correctly for any path that reads it.attik-backend/src/util/functions/actionFlows/conditionsResolver.ts — inspection-time branch passes undefined timezone into evalInspectionTimeCondition; all callers of evaluateConditions / checkCondition for flows (e.g. handleEventTriggerdByBull.ts, handleActionFlowTrigger.ts, flowOnJob.ts, email/SMS render paths) need company IANA tz available when evaluating time-of-day rules.attik-backend/src/util/functions/worklist/inspectionTimeMatch.ts — shared evalInspectionTimeCondition, parseBetweenHhMm, overnight time_between logic; worklist path already accepts timezone.attik-backend/src/util/functions/actionFlows/FullPopulatedDataForFlow.ts — inspection payload for flow actions includes _companyId; timezone likely resolved via Company (same pattern as flowEventTriggerer.ts company lookup).attik-backend/src/models/companySchema.ts — timezone field (default America/Denver).attik-backend/tests/unit/worklist.inspectionTimeMatch.test.ts — existing tests for time_between and timezone; extend or add action-flow integration coverage.attik-frontend/src/components/conditions/ValueConditionInput.tsx — time pickers already labeled with company timezone via useTimezone() / INSPECTION_TZ_FALLBACK.attik-frontend/src/components/conditions/templatingData.ts — inspection-time condition key (conditionType: 'timeOfDay').attik-frontend/src/app/tools/action-flow/[flow_id]/ActionDrawer.tsx — action-level Conditionals for events like confirmed_job._companyId, inspection _companyId, or thread explicit tz through evaluateConditions — follow existing worklist / send-window patterns.inspection.property.timeZone when present vs company setting only (inspection-time today uses inspection.datetime only).America/Denver schema default on Company; fixing unrelated datetime condition types that may not pass tz today.time_between overnight) evaluate using the company’s configured timezone.America/New_York): inspection at 8:00 PM local matches “after 7:00 PM” / overnight window; same job does not match when evaluated in Denver-only fallback.attik-backend/src/util/functions/actionFlows/conditionsResolver.tsattik-backend/src/util/functions/worklist/inspectionTimeMatch.tsattik-backend/src/routes/worklist.tsattik-backend/src/util/functions/actionFlows/handleEventTriggerdByBull.tsattik-backend/src/util/functions/actionFlows/flowEventTriggerer.tsattik-frontend/src/components/conditions/ValueConditionInput.tsxattik-backend/tests/unit/worklist.inspectionTimeMatch.test.tsPlease authenticate to join the conversation.
Planned
Main App
1 day ago
Linear
Get notified by email when there are changes.
Planned
Main App
1 day ago
Linear
Get notified by email when there are changes.