Repository navigation
Requirements Based Report
Refs: #1966 (tracking) · Reports area · legacy controller retired
Screen: gui/templates/results/resultsRequirements.html
BFF: api/reports/index.php → action=metrics_results_reqs
Legacy entry: lib/results/resultsReqs.php (now a GET/HEAD-only 302 shim)
The report itself was modernized earlier (#691 / #1233 / #1234): the Dashio
screen and the metrics_results_reqs BFF action already carried the full
legacy behaviour. What was still missing was the retirement of the legacy
Smarty controller — a stale bookmark to lib/results/resultsReqs.php still
rendered the 1.9.20 page (ExtJS tables, legacy layout) instead of the modern
screen. #1966 closes that gap and finishes the screen's verification cycle.
- Plan-scoped Requirements Coverage report for the addressed test project.
- Optional Platform and Build filters; changing the build re-evaluates the latest execution of every linked test-case version.
- Evaluation Summary badges (Passed / Failed / Blocked / Not Run, plus the
_nfcand partially-passed / uncovered verdicts) and a localized total. - DataTable with Req Spec path, doc-id/title, version, coverage
(
current/expected), evaluation, type, status, per-status counters, progress bar and the linked-test-case badge. - Footer list filters for Evaluation / Type / Status (fed by the BFF
*_filter_optionsarrays — the legacyfilterOptionslabel catalogues) — they narrow the table only. - Clicking the linked-TC badge expands an inline detail table (external id and name, platform, localized execution status).
- Empty states mirroring legacy
resultsReqs.php:no_srs_definedwhen the project has no requirements specification in force andno_matching_reqswhen requirements exist but none is covered by a TC in this plan. -
TLi18nclient i18n (reqcov.*keys) with the shared locale switcher; the page title and the two count labels are localized too.
File: api/reports/index.php, action metrics_results_reqs.
| Method | Route | Purpose |
|---|---|---|
GET/HEAD
|
?action=metrics_results_reqs&tproject_id=N&tplan_id=M[&platform=P][&build=B] |
Context, filter option sets, summary counts and per-requirement rows |
- Session auth; the global gate requires
testplan_metrics(global or on the request's own project/plan context), then the action re-checkstestplan_metricson the owning project before returning data. - The plan's project is resolved server-side from
tplan_id;tproject_idis only a context hint, so a mismatched URL cannot read another project. - Responses:
200JSON payload;400missing/invalid plan;401no session;403no right; the screen renders these as a localized error toast.
lib/results/resultsReqs.php:
- accepts
GET/HEADonly (other verbs →405 Allow: GET, HEAD); - anonymous →
login.php?note=expired&destination=<legacy path>so a stale bookmark is not silently rendered; - otherwise answers
302 Location:to the modern screen, forwardingtproject_id/tplan_id(falling back to the session project/plan just like legacyinit_args()did); - builds the target from a CRLF-stripped, same-origin
basehref(the #1947/#1948 hardening) so subdirectory installs work and a poisoned session cannot turn the shim into an open redirect.
- Removed the DataTables search-input initializer that had been copy-pasted
10 times in one
loadData()callback; a singleensureSearchInputId()now runs once per table draw. - Replaced hardcoded English count labels with
reqcov.countRequirements("{n} requirements") andreqcov.tcCount("{n} TCs"), added to all 10 client bundles with real translations. -
document.titleis now localized fromreqcov.header.
- Suite
Issue #1966= 12/12 PASS intmp/TLU_Test_Cases.md(render, build filter, column filters, expand, EN/RO, empty states, invalid plan, 401/403, legacy shim, wiring/i18n gate, Event Viewer). -
bash ai/verify_i18n_coverage.sh: 9/9 bundles, 0 missing (9991 keys). - Event Viewer: no new Error/Warning rows (INFO/AUDIT only).
- Fixture:
tmp/fixtures_1065.php(project RTM1065, plan R6 Plan, 4 requirements, 6 test cases, 2 builds, executions, role-3 user).
English, plan scope with all three verdicts and the localized count labels:

Română — title, header and count labels localized:
