Repository navigation
Test Plan Defect Verification Gap Modernized
Modernized screen for issue #2044 in TestLink 2.0.1.
- Screen:
gui/templates/results/defectVerification.html - BFF:
api/defectverification/index.php - Rights:
testplan_metricson the owning test project (read-only) - API:
GET|HEAD ?action=init&tplan_id=N[&tproject_id=P],GET|HEAD ?action=projects,GET|HEAD ?action=report&tplan_id=N[&tproject_id=P][&build_id=B][&platform_id=PL][&verdict=V][&bug_id=BUG],GET|HEAD ?action=detail&tplan_id=N&bug_id=BUG[...],GET|HEAD ?action=csv&tplan_id=N[...] - Fixture:
tmp/fixtures_2044.php - Test suite:
Issue #2044intmp/TLU_Test_Cases.md
TestLink 1.9.20 recorded bug links on individual executions, but only exposed them in per-execution popups. There was no plan-level answer to the release question: which linked defects still lack verification evidence, which were linked to executions that already passed (escaped defects), and which were later confirmed by a passing execution of the same test-case version? This 2.0.1 report turns those execution links into an auditable defect-verification gap list.
- Toolbar: test plan / project context, Build, Platform, Verdict and Defect ID pickers, Refresh (reloads the report with the current controls, not stale URL defaults), Export CSV, Close.
- 10 KPI cards: linked defects, bug links, escaped, unverified, verified, verification rate, affected cases, builds in scope, platforms in scope and builds with links.
- Plan verdict banner (
no_data/clear/watch/at_risk) and localized empty/error state cards including the 403no_rightstate. - Searchable/sortable DataTable with defect ID (opens the evidence modal), defect verdict, links, passed links, verified/unverified/escaped counts, verification rate, affected cases, builds, platforms and latest linked result.
- Per-defect evidence modal with every link, normalized link status, per-link verification badge, execution time, build, platform, tester, later-pass evidence and notes.
- CSV export with UTF-8 BOM,
;separator, RFC-style quoting and formula-injection guard; disabled when there are no defects. - Localized 400/401/403/404/405 states and a
TLi18nlocale switcher; all labels, KPIs, DataTables strings and messages come from all 10 client bundles.
- The unit is one literal
execution_bugs.bug_idreferenced by an execution in the selected plan. An execution counts only when itstcversion_idis assigned to the plan throughtestplan_tcversions(aplatform_id=0assignment applies to every platform). - Build and Platform filters re-scope both the links and the follow-up evidence. Defect ID is an exact case-sensitive filter. Verdict filters operate on the aggregated defect verdict.
- Link statuses are normalized as
p→ passed,f→ failed,b→ blocked and anything else → not run. A link made on a passing execution isescaped. A link made on a non-passing execution isverifiedwhen a strictly later passing execution of the sametcversion_idand platform exists inside the scoped plan (ordered byexecution_ts, then execution ID); otherwise it isunverified. - Defect verdict precedence is
escaped>unverified>verified. Verification rate isverified / (links - escaped) * 100, rounded to one decimal; escaped links are excluded from the denominator. - KPIs describe the current BFF scope, including Build, Platform and exact Defect ID re-scoping; the Verdict filter only narrows the DataTable, detail rows and CSV. Affected cases are unique external case IDs that occur in the defect evidence.
builds with linkscounts distinct link build names. - Plan verdict is
no_datawithout defects,at_riskwhen any escaped defect exists,watchwhen any unverified defect exists, otherwiseclear. -
tproject_idis asserted against the plan's owning project only after the plan is resolved andtestplan_metricsis checked on that owner, so foreign-project probes cannot enumerate plans. Denials are written to AUDIT.
| Case | HTTP | Code |
|---|---|---|
GET|HEAD success |
200 | ok |
| Unknown action, invalid plan/build/platform/verdict/bug_id or missing detail defect | 400 | invalid_request |
| Anonymous / expired session | 401 |
not_authenticated / session_expired
|
Missing testplan_metrics right |
403 |
no_right (AUDIT) |
| Unknown plan / wrong project / defect outside plan | 404 |
tplan_not_found / project_mismatch / defect_not_found
|
| Non GET/HEAD | 405 |
method_not_allowed (Allow: GET, HEAD) |
POST without Origin/Referer
|
403 | same-origin guard denial |
Security: bffSameOriginGuard() + bffEnforceSession(); responses carry nosniff and Cache-Control: no-store. CSV cells starting with =, +, - or @ are prefixed with an apostrophe.
-
cfg/reports.cfg.php—defect_verification -
api/aside/index.php— Reports entry fordefectVerification.html -
api/resultsnav/index.php—defect_verificationmap row -
lib/functions/common.php—$actions->defectVerification -
gui/templates/i18n/*.json— 84dvg.*+ footer keys in all 10 bundles (ai/verify_i18n_coverage.sh: 9/9 PASS, 12922 keys) -
locale/*/strings.txt—$TLS_link_report_defect_verification(19 locales)
Fixture tmp/fixtures_2044.php creates project DVG2044 (plan 2, empty plan 3, two builds, two platforms, four cases, six executions and five bug links) and a role-3 user dvg2044norights.
Suite Issue #2044 has 32 executed checks (2044.1–2044.32) covering the BFF contract, security, filters, deep links, modal, CSV, RO locale, empty plan, no-right state, Event Viewer and gate checks; the repository suite gate reports 34/34 with no suite lost. Bug #2045 (build/platform names rendered as booleans) and bug #2046 (deep-link filters ignored) were filed with the bug label and fixed in separate commits. Event Viewer after the browser pass contained only AUDIT rows (project creation, logins and the expected no-right denial), with no new Error or Warning entries.





gui/templates/results/defectVerification.htmlapi/defectverification/index.phpgui/templates/i18n/{de,en,es,fr,it,ja,pt,ro,ru,zh}.jsonlocale/*/strings.txt-
cfg/reports.cfg.php,api/aside/index.php,api/resultsnav/index.php,lib/functions/common.php -
tmp/fixtures_2044.php,tmp/TLU_Test_Cases.md