Commit Graph
28 Commits
Author SHA1 Message Date
63e28dc964 feat(tracker): Gantt chart for the issue tracker (#10992)
* feat(tracker): Gantt chart for the issue tracker

Builds on the merged search/filter rework (#10998). Introduces @hcengineering/gantt, a dependency-free scheduling/zoom/drag/viewport engine package (with a neutral GanttDependency contract), and wires the tracker-specific adapter, Svelte UI, model schema, dependency-shift notifications and sanity coverage in tracker-resources.

Signed-off-by: Michael Uray <michaeluray@users.noreply.github.com>

* fix(tracker): source Gantt holidays from HR and scope confirm-gate per view

Follow-up to review feedback on #10992:

- Confirm-gate: the module-global flag is replaced by a createConfirmGate()
  factory - one instance per mounted GanttView, so two Gantt views mounted at
  once in the same JS context no longer block each other's pointer input. A
  two-instance independence test guards the regression.

- Sidebar sorting: the stale deadline cast is dropped and issue.deadline is
  read directly (the field was added to the Issue model in this PR).

- HR holidays: the per-project WorkingDaysConfig.holidays field duplicated the
  workspace-wide hr.class.PublicHoliday concept and could drift from the real
  HR calendar. It is removed. WorkingDaysConfig now carries only the weekday
  mask and an optional holidayDepartment. The tracker adapter resolves holidays
  for the selected department plus all ancestors up to hr.ids.Head, matching
  HR's existing inheritance semantics (hr-resources ScheduleView). A missing or
  invalid reference falls back to company-wide (root) holidays; unrelated
  departments are never included. The ancestor walk is cycle/missing-parent
  safe.

  A small WorkingDaysEditor in the existing project create/edit dialog lets
  users with the existing project permission enable the mode, choose weekdays,
  and select an HR department (default: Company-wide). It persists through the
  existing project create/update transaction paths (createDoc on create,
  client.update on edit) and uses $unset when the mode is disabled. At least
  one working day must stay active.

  Calendar loading is explicit via a CalendarStateMachine: project-scoped drag,
  resize, cascade, keyboard-shift and auto-schedule mutations stay disabled
  until both the project config and the holiday data have loaded. A monotonic
  generation ticket (bumped synchronously on project switch) is re-checked
  immediately before every calendar-dependent date commit, so work started in
  one project can never persist after a switch to another. The all-projects
  view has no single project calendar, so calendar-dependent edits are
  read-only there; display, selection, the context menu and the manual
  date-picker (which does no calendar arithmetic and takes no mutation ticket)
  stay available.

  This depends on the lightweight @hcengineering/hr model package, but not on
  hr-resources; the tracker adapter uses hr.class.* and hr.ids.Head at runtime,
  and actual HR model presence is checked through the hierarchy - without the
  HR model, holidays resolve to an empty set. The @hcengineering/gantt engine
  package stays domain-neutral (no @hcengineering imports, no runtime deps).

Signed-off-by: Michael Uray <michaeluray@users.noreply.github.com>

* fix(gantt): measure FS gap-preservation floor in working days

The finish-to-start gap-preservation floor in the cascade scheduler mixed
two time measures: the FS snap anchor is working-calendar aware, but the
floor added a raw calendar-millisecond start-side delta. With an active
working calendar the two diverge, so dragging a predecessor over a weekend
over-shifted the successor across non-working days (a Fri->Mon body drag is
3 calendar days but only 1 working day, and could even land a successor on
a Saturday).

Measure the floor on the DUE side in working days instead: translate the
predecessor's shift via the new workingDayDelta helper and advance the
floor base with addWorkingDays over the calendar. A day-granular resize
gate (utcMidnight comparison, not a raw === 0 test) arms the floor only on
a start-DAY move, so a pure due-resize stays a pure snap even when the
stored issue carries a time-of-day on the cascade-commit path. The floor
base is normalized via utcMidnight(targetAnchor). The legacy path
(cfg === undefined) stays byte-identical to today's raw-ms floor. A
left-resize in working-days mode now correctly no-ops the floor (the due,
and thus the FS gap, did not move) instead of shifting on the raw start
delta.

Engine: add workingDayDelta (signed, half-open from-exclusive/to-inclusive
working-day step count) and export the previously-private utcMidnight from
packages/gantt/src/working-days.ts. The engine stays domain-neutral (no
@hcengineering imports, empty dependencies).

Adds engine and adapter test coverage: workingDayDelta cases and the full
FS floor matrix (right-resize no-push, weekend-spanner body drag, floor
wins over snap, holiday in the floor path, floor-dominant multi-hop chain,
negative delta, legacy no-cfg, SS pure-snap, raw time-of-day right-resize,
direct left-resize).

Signed-off-by: Michael Uray <michaeluray@users.noreply.github.com>

---------

Signed-off-by: Michael Uray <michaeluray@users.noreply.github.com>
Co-authored-by: Michael Uray <michaeluray@users.noreply.github.com>
2026-08-27 20:24:38 +07:00
1be6047c8a feat(tracker): field-prefixed search, inline filter chips and zero-hit empty state (#10998)
* feat(tracker): field-prefixed search, inline filter chips and zero-hit empty state

Adds SearchInputAdvanced (field:value prefixes routed to Elasticsearch query_string), match highlighting, inline filter chips with overflow popover, a reusable zero-hit empty state in view-resources, and search-scope/highlight view options for List and Kanban.

Signed-off-by: Michael Uray <michaeluray@users.noreply.github.com>

* refactor(tracker-search): address review follow-ups on search/filter rework

Shared, non-storage-specific field list, test-folder conventions, locale
coverage, single regex source and an owner-token gate for the result count.

- core: add shared `fullTextSearchFields` constant next to
  FullTextSearchContext as the single source of truth for the full-text
  fields exposed to `field:value` targeting. The client encoder derives
  ES_NATIVE_FIELDS from it and the elastic adapter derives KNOWN_FIELD_RE
  from it, replacing the two "KEEP IN SYNC" copies. Per-field boost weights
  stay a local adapter detail.
- tests: move the five co-located tests into each package's existing test
  folder convention (ui `__test__`, view-resources `__tests__`) and fix the
  relative imports.
- i18n: translate the new tracker search/filter strings in the remaining
  locales (zh, ja, ko, cs, es, fr, it, pt, pt-br, tr), reusing each file's
  existing terminology; ICU placeholders left unchanged.
- encoder: hoist the reserved-character class into one constant and build two
  RegExp instances from it (non-global for `.test()`, global for `.replace()`)
  to avoid the shared-lastIndex trap.
- view-resources: guard `resultIssueCountStore` writes with an owner-token
  gate so a superseded viewlet can no longer clobber the active viewlet's
  count; List/KanbanView claim and release, IssuesView resets through the
  current owner. Assumes a single active IssuesView surface.
- view-resources: make result-count reporting opt-in via a new
  `reportResultCount` prop on List (default true). Embedded, non-primary List
  instances (sub-issues / related issues in the issue edit panel, routed
  through SubIssueList) pass false and never claim the owner token, so opening
  and closing an issue can no longer strand the primary Issues viewlet with a
  dead token — the zero-hit SearchEmptyState card renders again afterwards. Add
  a regression test covering the opted-out embedded consumer.
- elastic: escape every regex metacharacter (not just `.`) when building
  KNOWN_FIELD_RE from `fullTextSearchFields`, so a future field name carrying
  another metacharacter cannot silently corrupt the alternation. Behaviour for
  the current fields is unchanged.

Signed-off-by: Michael Uray <michaeluray@users.noreply.github.com>

* refactor(tracker-search): centralize regex escaping and lock down result-count store

- Share escapeRegExp from @hcengineering/core so the client encoder and the server elastic adapter escape the fulltext field list identically, not just dots on the client.

- Export resultIssueCountStore as a read-only Readable; the owner-token gate functions (setResultCount / resetResultCount / releaseResultCountOwner) are now the only write path.

Signed-off-by: Michael Uray <michaeluray@users.noreply.github.com>

---------

Signed-off-by: Michael Uray <michaeluray@users.noreply.github.com>
Co-authored-by: Michael Uray <michaeluray@users.noreply.github.com>
Co-authored-by: Artyom Savchenko <armisav@gmail.com>
2026-08-11 19:09:33 +07:00
Andrey SobolevandGitHub 331aa7f78f UBERF-9264: Fix set/unset parent issue (#7799)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
2025-01-27 15:14:54 +05:00
Alexander PlatovandGitHub dd8ba84a9b UI and icons fixes (#7177) 2024-11-17 22:43:12 +07:00
Andrey SobolevandGitHub f4a86e1b1c Upgrade Typescript to 5.2.0 (#3810)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
2023-10-08 03:14:00 +07:00
Andrey SobolevandGitHub e809a67451 UBER-430: Remove old migrations (#3398)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
2023-06-12 17:40:04 +07:00
Ruslan BayandinovandGitHub 2f4cb2c2a7 [UBER-82] Update components (#3227)
Signed-off-by: Ruslan Bayandinov <wazsone@ya.ru>
2023-05-22 18:03:22 +07:00
Alexander PlatovandGitHub 074fa7dbc4 UBER-87, TSK-1324: update icons and popups. (#3209) 2023-05-19 09:13:35 +07:00
Denis BunakalyaandGitHub f39514ee73 UBER-60 Rename sprints to milestones (#3192)
Signed-off-by: Denis Bunakalya <denis.bunakalya@xored.com>
2023-05-16 18:56:29 +07:00
Denis BykhovandGitHub be23c96c5a Replace "you and" (#2921) 2023-04-07 21:46:30 +07:00
Alexander PlatovandGitHub 17c9846720 TSK-1021. Update Navigator layout. (#2886)
Signed-off-by: Alexander Platov <sas_lord@mail.ru>
2023-04-05 14:14:32 +07:00
Denis BykhovandGitHub 0f24fe80d6 TSK-810 Rename Team -> Project, Project -> Component (#2756)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
2023-03-17 12:17:53 +06:00
mrsadman99andGitHub b0b1089369 TSK-413: Implement scrum recording (#2550)
Signed-off-by: Anton Brechka <anton.brechka@xored.com>
2023-02-03 12:47:25 +07:00
Alexander PlatovandGitHub 8a5b84802c Add Timeline component (#2535)
Signed-off-by: Alexander Platov <sas_lord@mail.ru>
2023-01-24 20:43:06 +07:00
Timur MukhamedishinandGitHub 2cd894e7ad Allow to create new team (#2375)
Signed-off-by: muhtimur <timur.mukhamedishin@xored.com>
2022-11-17 11:31:42 +07:00
AlexandGitHub d74fcb45a3 Add lang UT (#2297)
Signed-off-by: Dvinyanin Alexandr <dvinyanin.alexandr@gmail.com>
2022-10-13 14:16:39 +06:00
Denis BunakalyaandGitHub ca6e5edcf8 tsk-187 Duplicate issue from context menu (#2292)
Signed-off-by: Denis Bunakalya <denis.bunakalya@xored.com>
2022-10-11 13:39:26 +07:00
Andrey SobolevandGitHub 5b6ef778f3 Migrate to hcengineering and publish to github packages (#2273)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
2022-09-21 14:08:25 +06:00
Andrey SobolevandGitHub 681d83a5d3 Initial Estimations support. (#2251)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
2022-08-16 17:19:33 +07:00
Andrey SobolevandGitHub 00131ed0a3 Initial Sprints support (#2246)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
2022-08-03 14:05:19 +07:00
Alexander PlatovandGitHub ba7d308d34 Update icons. (#2064)
Signed-off-by: Alexander Platov <sas_lord@mail.ru>
2022-06-14 10:03:41 +07:00
Sergei OgorelkovandGitHub 06254e720f Update context menu in the "CreateIssue" dialog (#1799)
Signed-off-by: Sergei Ogorelkov <sergei.ogorelkov@xored.com>
2022-05-19 17:37:14 +07:00
Artyom GrigorovichandGitHub 4824d911e5 Tracker: Project - Project status buttons (#1793)
Signed-off-by: Artyom Grigorovich <grigorovichartyom@gmail.com>
2022-05-18 22:57:11 +07:00
Artyom GrigorovichandGitHub ae13a1ff2f Tracker: Project - Editors (#1779)
Signed-off-by: Artyom Grigorovich <grigorovichartyom@gmail.com>
2022-05-18 12:35:34 +07:00
Sergei OgorelkovandGitHub d663e383e6 Tracker: move "IssueStatus" enum into model (#1449)
Signed-off-by: Sergei Ogorelkov <sergei.ogorelkov@xored.com>
2022-04-23 23:59:57 +07:00
Sergei OgorelkovandGitHub 207bcf73bb Update new issue dialog (#1310)
Signed-off-by: Sergei Ogorelkov <sergei.ogorelkov@xored.com>
2022-04-08 13:27:02 +07:00
Alexander PlatovandGitHub b6de3da74a New style (#1253)
Signed-off-by: Alexander Platov <sas_lord@mail.ru>
2022-04-02 11:06:48 +07:00
Andrey SobolevandGitHub 8cd1797696 Tracker Issue tracking system (#1243)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
2022-03-31 15:32:42 +07:00