Bugfix Issue 1507 BFF APIs Restored Back - sebiboga/testlink-upgraded GitHub Wiki

Bugfix Issue #1507: 5 BFF APIs deleted, 4 gutted by commit 8ef9694d3 — restored

Symptom

The bug-fix commit 8ef9694d3 (Bugfix Issue 1487: header-subtitle repaint) accidentally deleted or gutted multiple unrelated modernized BFF APIs and their docs:

File (API endpoint) Base lines State
api/execdashboard/index.php 398 deleted
api/notifications/index.php 407 deleted
api/reqfromissues/index.php 441 deleted
api/reqreorder/index.php 230 deleted
api/staticpage/index.php 152 deleted
api/execsetresults/index.php 3057 gutted to 1582 (−1475)
api/testcases/index.php 1446 gutted to 1051 (−395)
api/roles/index.php 502 gutted to 346 (−156)
api/reqedit/index.php 417 gutted to 334 (−83)
api/planexport/index.php 264 gutted to 225 (−39)

Repro: GET /api/execdashboard/index.php?action=… → 404 File not found. The 5 corresponding GUI templates (execDashboard.html, notifications.html, reqFromIssues.html, reqReorder.html, staticPage.html), the docs/*.md mirrors and the i18n locale bundles were also deleted/gutted by the same commit.

Root cause

8ef9694d3 was crafted as a small CSS/color fix but committed a huge deletion diff (CHANGELOG −329 lines, dozens of docs, 5 whole APIs). The default branch carried a commit that deleted unrelated screens.

Fix

Restored every affected file to its pre-deletion state:

  1. Deleted APIs restored from the last clean tree 59d69150f: execdashboard, notifications, staticpage.
  2. Deleted APIs that were created after the baseline (so restored from the deletion's parent 8ef9694d3^): reqfromissues, reqreorder.
  3. Gutted APIs restored from 59d69150f: execsetresults, roles, reqedit, planexport.
  4. api/testcases/index.php restored from 8ef9694d3^ because the parent state is a superset of the baseline — it also contains the legit post-baseline feature d9e6dfd8c (edit-mode filter panel, Refs #909).
  5. Post-regression fixes re-applied on top of the restored files, so no feature work that landed after the regression is lost:
    • 8d60a5846 (Refs #912): tprojectOpt() array/object tolerance in api/testcases.
    • 78b2d6f68 (Refs #1379): last_doc_id insert helper in api/reqedit + reqe.insertLastDocId i18n.
  6. GUI templates restored: gui/templates/execute/execDashboard.html, gui/templates/notifications/notifications.html, gui/templates/requirements/reqFromIssues.html, gui/templates/requirements/reqReorder.html, gui/templates/documentation/staticPage.html.
  7. i18n bundles (all 10 locales): only the missing keys were re-added (en +279, others +273) using a merge-add so concurrent CI agents' keys are never clobbered. python3 -m json.tool validates all 10 bundles.
  8. Docs mirrors + screenshots restored (Execution-Dashboard-Modernized.md, WIKI-NOTIFICATIONS.md, Create-Requirements-from-Issues-Modernized.md, Reorder-Requirements-Modernized.md, Help-Instructions-Modernized.md, Set-Results-Modernized.md, test-spec docs, execdashboard images, etc.)

Verification

  • php -l passes on all 10 restored API files.
  • All restored endpoints respond over HTTP (200 OK or meaningful validation error — no more 404 File not found).
  • Execution Dashboard browser run renders correctly: test plan "Demo Plan", build "Build 1.0", platform "Linux", REST params testPlanID=2&buildID=4&platformID=1; zero console errors.
  • Notifications browser run: i18n labels translate ("Notifications", "Recent activity"); zero console errors.
  • events table (log_level 3/4) for the last hour: 0 Error/Warning entries.
  • Regression suite Regression — Issue #1507 in tmp/TLU_Test_Cases.md: 20/20 PASS.

Screenshot — Execution Dashboard after restore

Execution Dashboard restored

Files changed

  • api/execdashboard/index.php, api/notifications/index.php, api/reqfromissues/index.php, api/reqreorder/index.php, api/staticpage/index.php (restored)
  • api/execsetresults/index.php, api/testcases/index.php, api/roles/index.php, api/reqedit/index.php, api/planexport/index.php (restored + post-fixes reapplied)
  • 5 GUI templates restored; 10 i18n bundles patched; 8 docs restored; screenshots.

Refs #1507