Repository navigation
Bugfix Issue 2106 Authored Quality Objectives Chapter



Chapter 2 (Quality Objectives) of the modern Test Strategy was a read-only reference
page. With a freshly imported 2.0.1 database and fixture project 1
(Strategy Objectives Repro, prefix SOBJ), opening
gui/templates/strategy/objectives.html?tproject_id=1 returned HTTP 200 but its a11y
snapshot had only the two static columns (Quality objectives, Service levels) and
the footer: the live DOM contained 0 textareas and 0 buttons, and there was no
Save action for project-specific prose. An authenticated
GET /api/strategychapter/index.php?action=init&tproject_id=1&chapter=objectives
returned HTTP 400 bad_chapter, and api/strategyreport/index.php?action=init exposed
no chapter-note text for this chapter. Evidence screenshots:
docs/screenshots/issue-2106-objectives-before.png,
docs/screenshots/issue-2106-objectives-after.png,
docs/screenshots/issue-2106-report-after.png.
-
gui/templates/strategy/objectives.html:40-57rendered only two translated static cards; the original script (:61-70) loaded jQuery andTLi18nbut never called the chapter BFF. Unlike the fixed siblings (intro,compatibility,reliability,maintainability), it had no editor card, no textarea, no Save button and noloadNotes()/saveNotes()wiring. -
api/strategychapter/index.php:80-82—schapterCodes()allowed onlyintro,compatibility,reliabilityandmaintainability. Both the read gate (:274) and the write gate (:295) rejectedobjectiveswith HTTP 400bad_chapter(measured live before the fix), although the atomic upsert (:307-312) and payload mapper (:193-202) are code-agnostic. -
api/strategyreport/index.php:462-494already aggregates every row oftestproject_strategy_chaptersfor the addressed project behind the strategy-document read right, so the report BFF needed no change. The only missing reporting hop waschapterTitle()ingui/templates/results/strategyReport.html:314-322, which lacked anobjectivesentry even thoughts.chapterObjectivesalready existed in every locale bundle. - No
ts.objectivesNotes*labels existed: the editor needed four new keys in each of the ten bundles plus entries inai/required_i18n_keys.txt(the #2131 reference-level guard against silent key removal).
This is not a regression from a recent commit: 1.9.20 shipped all strategy chapter pages as static guidance, and the 2.0.1 authored-chapter series (#2130, #2129, #2104, #2128) simply never included chapter 2.
-
Extend the existing allowlist, not the schema. Adding
objectivestoschapterCodes()reuses the session/same-origin BFF, project-scoped rights (mgt_view_tcto read,mgt_modify_tcto write), 20 000-character cap, lazy schema, atomicUNIQUE (testproject_id, chapter_code)upsert andSTRATEGY_CHAPTER_SAVEAUDIT event. No new table, endpoint or migration was needed. -
Mirror the established Dashio editor in the existing chapter page. The page now
has a teal-topped
.editorcard with a labeled#objectivesTexttextarea (maxlength=20000),#objectivesMetaauthor/update line,#btnSaveand a localized#objectivesStatusregion.GET initfills the stored text, resolves the project from?tproject_id=/?tprojectId=and rewrites the back link accordingly, and disables the textarea/button whencontext.can_modifyis false.POST savepersists and reloads; 401 redirects to login, 403 shows the shared read-only message, 400 shows the no-project message, and other failures show a localized load/save error. Four newts.objectivesNotes*keys were added to all ten bundles; the status/meta labels reuse the sharedts.rel*keys and all four new keys are pinned inai/required_i18n_keys.txt. -
Add only the missing report title mapping.
chapterTitle()mapsobjectivesto the pre-existingts.chapterObjectiveskey. That map is shared by report panel 11 and bybuildMarkdown()used by the Markdown/HTML export; the rendered page printed via the existingExport PDF/Printpath shows the same content. No strategy-report BFF change was required.
- Adding a tenth section to
testproject_strategy_docswould break the fixed nine-section #2101 document contract and require one newsdoc.sec_*key in each of the ten bundles, while hiding the chapter-code dimension the report already understands. - An objectives-only table/API would duplicate auth, rights, upsert, audit and report
aggregation already provided by
api/strategychapter. - A client-only textarea using
localStoragewould not be project-scoped, rights-guarded, audited or exported into the report/PDF.
-
api/strategychapter/index.php—objectivesadded toschapterCodes()and route docs. -
gui/templates/strategy/objectives.html— Dashio editor markup + load/save wiring. -
gui/templates/results/strategyReport.html—objectiveschapter title mapping. -
gui/templates/i18n/{de,en,es,fr,it,ja,pt,ro,ru,zh}.json— fourts.objectivesNotes*keys per locale. -
ai/required_i18n_keys.txt— four new keys pinned against the #2131 clobber pattern. -
CHANGELOG—[KEY BUGFIX] - #2106entry. -
tmp/TLU_Test_Cases.md— suiteRegression — Issue #2106. -
docs/screenshots/issue-2106-{objectives-before,objectives-after,report-after}.png— browser evidence (wiki page only, no image lines in this mirror).
- Pre-fix: 0 textareas, 0 Save buttons, no chapter-BFF requests; API 400
bad_chapter; reportchapters.length = 0. - Post-fix:
GET init200 (can_modify:true), UIPOST save200, reload restored the exact two-line UTF-8 text (Objetivo: .../Mācība: glyphs äöü — 日本語) with authoradminand timestamp2026-11-29 21:59:57; DB rowtestproject_id=1, chapter_code=objectives, author_id=1held the verbatim text and oneSTRATEGY_CHAPTER_SAVEAUDIT event was logged. - Report panel 11 showed
Quality Objectives · Last author: admin · Updated: 2026-11-29 21:59:57plus both text lines;buildMarkdown()contained### Quality Objectivesand the same text, so Markdown/HTML export and the PDF print path carry it as well. - Rights/error matrix: no
tproject_id→ 400no_testproject; role-3 no-rights user → BFF init/save 403no_rightand, in a second browser context, a disabled editor with localized permission/read-only messages;intro,compatibility,reliabilityandmaintainabilitysiblings still returned 200 with unchanged text. - Gates:
php -l api/strategychapter/index.phpOK; inline JS compile for both changed pages OK;python3 -m json.toolOK for all ten bundles;bash ai/verify_i18n_coverage.shPASS (9/9, 0 missing, 14242 keys, 32 pinned keys);TLU_REQUIRE_SUITE="Issue #2106" bash ai/verify_test_suites.shPASS (34/0/0). - Event Viewer: after the run the
eventstable held only AUDIT rows (log_level=16: two logins, project create, chapter save, user create) — 0 Error/Warning entries. - Code review: subagent verdict APPROVE with no confirmed findings before the fix commit.