Repository navigation
Bugfix Issue 2107 Authored Scope Chapter
Chapter 3 (Scope) of the Test Strategy was a read-only page.
gui/templates/strategy/scope.html had no textarea and no Save action, so teams
could not record the in-scope/out-of-scope boundary and exclusions their project
actually applies. Measured before the fix: grep -c '<textarea>' = 0, live DOM
textareas: 0, no api/strategychapter request in the page Network list, and an
authenticated BFF init call for chapter=scope returned 400 bad_chapter.
The page was still a static translated page. Unlike the already authored
chapters (intro, objectives, security, usability, accessibility, compatibility,
reliability, maintainability), it was never wired to
api/strategychapter/index.php: schapterCodes() at
api/strategychapter/index.php:81-83 had no scope entry, so both init (:275)
and save (:296) rejected it before any persistence. The report title map in
gui/templates/results/strategyReport.html:314-326 also lacked scope, so a
stored row would have been rendered with the raw code as its heading. The
chapter itself was published by api/strategy/index.php:60, and the storage
table (testproject_strategy_chapters) plus api/strategyreport/index.php:466-494
are generic over chapter_code — no schema change was needed. This is an
unfinished rollout of the #2101 mechanism, not a regression in report generation.
The fix extends the existing per-project chapter infrastructure rather than
introducing a parallel storage path. Adding scope to the BFF allowlist is
additive: every other chapter keeps the same rights checks, atomic upsert and
AUDIT event. The chapter page mirrors the verified #2125/#2126 Dashio editor,
and the report map gains one key so HTML, Markdown, PDF and print exports show
the localized ts.chapterScope title instead of the raw code. Two alternatives
were rejected: localStorage text (not project-scoped, no rights, absent from the
report/PDF) and a new BFF/table (duplicates working infrastructure). A live
console audit also showed the inherited pattern assigned the textarea id after
DOM parse; the textarea now carries a static id/maxlength so the <label for>
resolves immediately.
-
api/strategychapter/index.php: addedscopetoschapterCodes()and to the documented route contract, soinit,listandsaveuse the same per-project persistence and rights checks as every other authored chapter. -
gui/templates/strategy/scope.html: added the Dashio editor card with a textarea, author/timestamp metadata, Save button, localized status messages, project-context footer and the standard 401/403/400 error handling. Read-only project roles get a disabled textarea and Save button; the existing static in-scope/out-of-scope lists are unchanged. -
gui/templates/results/strategyReport.html: addedscope: 'ts.chapterScope'tochapterTitle()so report panel 11, Markdown and the PDF/print path use the localized chapter title. -
gui/templates/i18n/*.json: addedts.scopeNotesTitle,ts.scopeNotesHint,ts.scopeNotesLabelandts.scopeNotesSaveto all ten bundles, translated in the nine non-English bundles; the existing genericts.rel*keys provide status/metadata text. -
CHANGELOG: one 2.0.1 KEY BUGFIX line for #2107. -
tmp/TLU_Test_Cases.md: numbered regression suite with measured results.



-
php -l api/strategychapter/index.php: no syntax errors. - Extracted page JavaScript passed
node --check;grep -c '<textarea>'→ 1. -
python3 -m json.toolpassed for all ten bundles;bash ai/verify_i18n_coverage.sh: 9 bundles passed, 0 missing. - Admin UI: fixture project 1 (
I2107); savedScope note saved for #2107 verification: API integrations and legacy reports are in scope; third-party portals are excluded.and reloaded →Updated: 2026-11-30 03:49:58 by adminwith the text preserved verbatim and an empty browser console. - BFF:
initreturnedcode=scope, author/timestamps andcanModify=true;listreturnedcodes=["scope"]; unknown chapter → 400bad_chapter, unknown project → 404, unauthenticated → 401, PUT → 405. Absent Origin on a POST is still refused by the shared CSRF guard. - Read-only user
scope_readonly(role 5,mgt_view_tconly):initreturnedcan_view=true, can_modify=false, direct POST save → 403no_right. - Report: payload contained the scope row; panel showed
Scope · Last author: admin · Updated: 2026-11-30 03:49:58plus the note;buildMarkdown()contained### Scopeand#btnExportPdfexists. In German the re-rendered panel readUmfang · Letzter Autor: admin · Aktualisiert: .... - Event Viewer (
eventstable): 3 rows, alllog_level=16(two LOGIN + oneSTRATEGY_CHAPTER_SAVE scope (project 1)) → 0 Error/Warning entries. - Suite gate:
TLU_REQUIRE_SUITE="Issue #2107" bash ai/verify_test_suites.sh→ 34 PASS / 0 FAIL / 0 SKIP; 1038 → 1039 suites, no suite lost.
PASS — Fixes #2107. Refs #2101.