Results by Test Suite - sebiboga/testlink-upgraded GitHub Wiki
The Results by Test Suite report (ASIDE → Reports → Metrics by Level 1 & Level 2 Test Suites) shows execution status metrics aggregated by Top-Level : Child (Level 1 : Level 2) test suites of the active test plan, one table per platform, with the First/Latest execution time span above each table. It replaces the legacy 1.9.20 lib/results/resultsByTSuite.php HTML view with a modern Dashio-styled page backed by a plain-PHP REST BFF.
Path: ASIDE menu → Reports → Metrics by Level 1 & Level 2 Test Suites
URL: gui/templates/results/resultsByTSuite.html?tproject_id=<id>&tplan_id=<id>
BFF API: api/reports/index.php — GET ?action=metrics_by_tsuite&tproject_id=&tplan_id=
Rights: testplan_metrics
Tracking issue: #671

The header carries the test plan context; the teal "Important Notice" banner appears only when the plan has platforms (legacy platform-relationship counting rule). Each platform gets its own card titled "Results on Platform: <name>" with the First/Latest execution span line and the classic table:
| Column | Content |
|---|---|
| Top : Child (Test Suites) | L1:L2 suite path, rows in natural case-insensitive NAME order (natcasesort) |
| Total | test cases linked for that platform |
| Not Run / Passed / Failed / Blocked | qty + [%] per status (server-localized labels) |
| Completed [%] | final completion percentage |
Depth-3 branches aggregate into their Level 2 parent row (a case under Top Gamma > G Mid > G Leaf is counted in the Top Gamma:G Mid row), exactly like the legacy depth-2 staircase logic.
-
Send by email to myself – POSTs to the legacy
resultsByTSuite.php?format=<MAIL_HTML>flow. -
Export data as spreadsheet – downloads
TestLink_GTMP_<proj>_<plan>.xlsfrom the legacy XLS generator. - Refresh – re-fetches the BFF metrics.

Plans without platforms render a single untitled section using the implicit key 0 (legacy fakePlatform contract); the notice banner is hidden.

A plan without linked test cases — or a flat specification whose cases sit directly under level 1 suites — shows a friendly empty message instead of tables (legacy report_tspec_has_no_tsuites contract).
GET /api/reports/index.php?action=metrics_by_tsuite&tproject_id=<id>&tplan_id=<id>
Key payload fields: hasData, show_platforms, platform_order (ordered [{id,name}]), columns (status label map), span (raw First/Latest timestamps formatted client-side — the server strftime path renders placeholders literally under PHP 8, see #563), suites[platform] = ordered row list (lists, not id-keyed maps, so JS cannot re-sort the name order), plus legacy send_mail_url / export_xls_url.
Permission handling mirrors legacy checkRights(): no session ⇒ 401; missing testplan_metrics on global role AND project context ⇒ 403 (users holding the right only via a per-project role pass, like hasRightOnProj()).
17 rbs.* keys in all 10 locale bundles (en de es fr it ja pt ro ru zh); rbs.header mirrors the legacy page title metrics_by_l1l2_testsuite.