Commit Graph
7 Commits
Author SHA1 Message Date
Lauri Ojansivu 56cc45a6e0 Follow the custom URL-scheme allowlist in two source guards.
The viewer now passes urlSchemes beside stripLinks, and the URL-scheme
field's hint sits between its label and the external-link keys.

Thanks to xet7 !
2026-09-29 16:28:37 +03:00
Lauri Ojansivu 4ff3a2c91d Fix code faults the source guards caught: RTL offsets, font scale, time-view titles.
The archive-chart tooltip and the menu-column popup used physical left/right
offsets, which do not mirror in right-to-left languages; they now use
inset-inline-start/end. A board-settings column label used a fixed 12px
font size that ignored the interface font scale. The Time view's
adjustments table printed card titles directly instead of through the
sanitized Markdown viewer the rest of the view uses; a negative test now
requires every rendered title to be inside the viewer. The card-copy
override refusal logs in the catch shape the security guard requires.

The REST login and impersonation guards now pin insertActiveLoginToken,
which replaced Accounts._insertLoginToken so a disabled account cannot get
a token, with new negative checks that no REST path mints a token without
that check.

Thanks to xet7 !
2026-09-29 14:49:16 +03:00
Lauri Ojansivu a7b333dad7 Cover Time view plain-link security setting in both modes
Verify the shared viewer passes the existing renderLinksAsPlainText setting to the sanitizer. Register browser tests retaining Markdown and emojis while changing link clickability; restore global settings after each test.

Thanks to xet7 !
2026-09-14 02:38:26 +03:00
Lauri Ojansivu dc08557113 Render Time view card titles with the security-aware viewer
Reuse the shared Markdown and emoji viewer, including Admin Panel plain-text security mode. Keep overtime status outside user-authored Markdown. Add normal and plain-text browser regressions.

Thanks to xet7 !
2026-09-14 02:35:45 +03:00
Lauri Ojansivu 364903fd8e One translated "Export" popup for every chart view; translate Frappe Gantt's chrome.
Reported directly: the Frappe Gantt view (and the DHTMLX Gantt, WeKan Gantt,
Time and the ten report-chart views) each showed two untranslated
"Export to PDF" / "Export to Excel" links. They now share one translated
"Export" button that opens a new exportChartPopup - the same pop-over list
of formats the board/swimlane/list/card export popup uses, offering PDF
and Excel with the same icons and labels. The URL is built in exactly one
place, client/components/boards/charts/exportChart.js's chartExportUrl();
the five per-view copies of that helper (gantt.js, frappeGantt.js,
dhtmlxGantt.js, timeView.js, boardCharts.js) are gone. One delegated click
handler opens the popup with the view's data-chart-key as its data context.
The popup's title, exportChartPopup-title, is added to every locale from
that locale's existing "export" translation - no new words to translate.

Also from the same report: Frappe Gantt's own chrome was English in every
language. Its view-mode dropdown prints each mode's `name` and looks modes
up by it, so it now receives translated copies of Frappe's default modes
(GanttLib.VIEW_MODE) - Day/Week/Month from the existing keys, and four new
keys (gantt-view-hour, -quarter-day, -half-day, -year) added to every
locale as English placeholders to be filled next. Its hardcoded "Today"
button and "Mode" placeholder are rebuilt on every view change, so a
MutationObserver re-translates them (existing "today" key; new
gantt-view-mode), disconnected in onDestroyed.

tests/chartExportPopup.test.cjs pins all of it; boardViewMenu,
reportChartLibraries and timeViewReportAndExport updated from the old
per-view links to the shared button/builder.

Thanks to xet7 !
2026-09-11 10:26:47 +03:00
Lauri Ojansivu 8955837844 Fix an overly-strict CHART_KEYS regex in the Time export regression test.
Auditing every export format (board JSON/CSV/iCal/HTML/dependency graph/
Kanboard/Trello/Jira/Deck/OpenProject/GitHub/GitLab/Gitea/Forgejo/Asana/
Zenkit/Markdown, and PDF/Excel for all 13 chart/report views) against its
server route, its builder function and the UI entry that offers it found
every one genuinely wired end-to-end - except this test, which asserted
'time' was the LAST entry of models/exportCharts.js's CHART_KEYS Set.
That stopped being true once 'pulse' was appended after it, so the test
failed even though the export itself works correctly. Loosened the regex
to match 'time' anywhere in the Set literal.

Thanks to xet7 !
2026-09-10 21:14:07 +03:00
Lauri Ojansivu 070a1ad10b Add hours-by-assignee/card breakdown and PDF/Excel export to Time view
#812's 39-comment thread repeatedly asked for external timesheet
integrations (Kimai, Harvest, Titra) that were never resourced - the
maintainer's own 2021 comment quotes a ~1000 EUR / 4-month estimate for a
Kimai sync, shelved shortly after. What the thread DID converge on that
fits inside WeKan itself: "reporting total hours by resource and task
type" (the issue's own words), and export - both added here without any
external service.

server/lib/boardChartData.js answers a new 'time' chartKey with
computeTimeByGroup (models/lib/chartCalculations.js: sums each card's
spentTime per assignee, not a card count - the same shape as
computeDashboardGroups but summing a value instead of counting cards) and
computeTimeByCard (one row per card with logged time, largest first),
scoped to non-archived cards like the Time view's existing summary. 'time'
is registered as a real chartKey in models/exportCharts.js and
models/lib/chartExportRows.js, so it reuses the exact same
/api/boards/:boardId/charts/:chartKey/export* PDF/Excel routes and
ExporterChartPDF/ExporterChartExcel every other board report chart already
uses - one export pipeline, not a second one just for Time. The Time board
view calls the same boardChartData method (chartKey 'time') the 10 report
charts already use and shows the same two breakdowns alongside its
existing 3-row summary, kept exactly as it was.

Thanks to xet7 !

Closes #812,
2026-09-10 19:00:20 +03:00