Add "Scheduled By" filter to inspection worklists

Objective

  • Add a Scheduled By filter to the worklist filter bar on inspection-type worklists so schedulers can narrow a worklist to jobs they personally booked.
  • Give office staff a self-service QC tool — replacing the "my orders" visibility they had in the Spectora widget — to review their own closed or open work without needing a separate worklist per person.
  • Mirror the existing "Created By" filter already available on quote worklists; the underlying field and lookup mechanism are the same.

Background

  • Catherine Lemoine (SE/Residential) requested this as a scheduler productivity and QC feature.
  • Schedulers previously used the Spectora widget to see "their own orders" — e.g. what they had closed that day — as a lightweight review step. That capability hasn't carried over into Attik worklists.
  • The "Created By" filter on quote worklists already implements this pattern: the createdBy field on the quote document stores the booking staff member's employee ID, and createEmployeeStagesWithKeyword('createdBy') populates the resolved name in the response pipeline.
  • The same createdBy field exists on inspection records; it is set at creation time in POST /worklist via res.locals.membership.employeeId || res.locals.membership._inspectorId || res.locals.membership._officeStaffId.
  • The backend GET /worklist/:id/data handler already accepts a wlCreatedBy query param but only applies it when worklist.type === 'quotes'. Inspections are excluded.
  • The frontend WorklistFiltersBar.tsx renders the "Created By" Autocomplete only inside the showQuoteFilters branch. The office staff list (useServer<OfficeStaff[]>({ url: 'office-staff' })) is also only fetched for quotes.

Product Decisions

Locked

  1. Filter label — Display as "Scheduled By" on inspection worklists (not "Created By"), to match the mental model schedulers use.
  2. Staff pool — All office staff (same unscoped list used for "Created By" on quotes); no role restriction.
  3. Scope — Inspection worklists only. Quote worklists already have "Created By." Event worklists are out of scope for this issue.

Scope

Backend — attik-backend/src/routes/worklist.ts

  • In the ephemeral view filter block, extend the wlCreatedBy condition to apply when worklist.type === 'inspections', not just 'quotes'. The field path is createdBy on the inspection document — same as quotes.

Frontend — attik-frontend/src/components/task-check/WorklistFiltersBar.tsx

  • The officeStaff fetch (useServer<OfficeStaff[]>({ url: 'office-staff' })) currently conditions on worklistType === 'quotes'. Extend to also fetch when worklistType === 'inspections'.
  • The "Created By" Autocomplete currently renders inside the showQuoteFilters block. Add a parallel "Scheduled By" Autocomplete inside the showInspectionFilters block, wired to the same createdBy / wlCreatedBy param but with the label "Scheduled By."
  • The FilterValues interface, buildParams, hasActiveFilters, activeFilterCount, and clearAll already handle createdBy — verify they extend cleanly to the inspections path or adjust as needed.

References

  • ATT-785 — Worklist Filtering (Done) — original filter bar implementation
  • attik-frontend/src/components/task-check/WorklistFiltersBar.tsx
  • attik-backend/src/routes/worklist.ts

Please authenticate to join the conversation.

Upvoters
Status

Planned

Board
🏠

Main App

Date

About 3 hours ago

Author

Linear

Subscribe to post

Get notified by email when there are changes.