Skip to content

Task Issue 999 Delete Legacy ArchiveData TestProject

sebiboga edited this page Nov 29, 2026 · 1 revision

Task Issue #999 — Delete legacy archiveData testproject viewer (Refs #994)

Status: implemented on task/issue-999, verified locally against the repo's MariaDB fixture (127.0.0.1:3307) and PHP 8.4.28 built-in server (http://127.0.0.1:8083). Prerequisites #994–#998 are all CLOSED/COMPLETED.

Why the issue text was stale

Issue #999 still described lib/testcases/archiveData.php as a 1.9.20 controller with a case testproject: branch at lines 41–57. That code no longer exists: commits 36783cb57 / 66b9d0b8f (issue #1536, CLOSED) replaced the entire controller with a 20-line redirect stub. The PHP half of this cleanup was therefore already done — but the stub sent every deep link to testcases/tcEdit.html, including edit=testproject, which is the wrong modern twin.

What survived was the legacy Smarty viewer:

Artifact State before #999
gui/templates/dashio/testcases/include/testprojectView.inc.tpl 79-line testproject-only operations panel + name/notes table; zero {include} sites anywhere in PHP/TPL/JS
gui/templates/dashio/testcases/containerView.tpl level == 'testproject' block (operations panel, name/notes table, lib/project/projectView.php link) still rendered by testproject::show()
gui/templates/tl-classic/testcases/containerView.tpl dead-theme twin of the same block (precedent #984/#966/#992 retires both theme copies)
lib/functions/testproject.class.php::show() still built the full legacy GUI object and displayed containerView.tpl for 4 remaining call sites in lib/testcases/containerEdit.php (file upload, file delete, suite reorder, suite move)

Changes (293 lines deleted, 36 inserted)

  • lib/testcases/archiveData.php — edit=testproject deep links now go to gui/templates/projects/projectInfoView.html?tproject_id=<id>; test-case deep links still go to tcEdit.html unchanged.
  • lib/functions/testproject.class.php::show() — converted from the legacy Smarty renderer to a documented compatibility shim that redirects the 4 surviving callers to projectInfoView.html. No caller edits were needed.
  • gui/templates/dashio/testcases/containerView.tpl — removed the level == 'testproject' branch and the project-only URL assignments (importToTProjectAction, testSpecFullDocAction, testSpecFullWordDocAction). The testsuite branch and shared attachments include are untouched.
  • gui/templates/dashio/testcases/include/testprojectView.inc.tpl — DELETED.
  • gui/templates/tl-classic/testcases/containerView.tpl — same testproject block and project-only URLs removed in the unused classic theme.
  • Docs/CHANGELOG/SCREEN-COMPARE-STATUS.md row 66, screenshot and test suite updated below.

Deliberately kept: archiveData.php itself (still the #1536 redirect stub for test-case deep links), testsuite.class.php::show(), the testsuite branch of both containerView.tpl files, attachments.inc.tpl, and all modern BFF routes. No locale/config section becomes orphaned by this cleanup.

Verification (measured)

  • php -l clean on lib/testcases/archiveData.php and lib/functions/testproject.class.php.
  • Smarty compile harness (real TLSmarty + lang_get plugin): dashio testcases/containerView.tpl compiles OK after the edit. The classic twin compiles up to its pre-existing attachments.inc.tpl:102 syntax error, which is unrelated to this change and already present on the base branch.
  • grep -rn 'testprojectView.inc.tpl' → only the deletion record in Git/docs; zero runtime inclusion. importToTProjectAction / testSpecFull* no longer exist in either containerView.tpl (only parity comments in the modern screen remain).
  • HTTP with an authenticated admin session:
    • archiveData.php?edit=testproject&id=1 → 302 to projectInfoView.html?tproject_id=1 (previously → tcEdit.html?tcase_id=1).
    • archiveData.php?edit=testcase&id=4&tproject_id=1 → 302 to tcEdit.html?doAction=edit&tcase_id=4&tproject_id=1&tplan_id=0 (unchanged).
    • Legacy containerEdit.php?doAction=reorder_testproject_testsuites_alpha&containerID=<fixture> → 200 with location.href='.../projectInfoView.html?tproject_id=<fixture>' and no Smarty fatal.
    • Temporary BFF fixture ZZ999CleanupProbe (id 1901) and suite fixture ZZ999SuiteProbe (id 1902) were deleted afterwards; 0 rows remain.
  • Browser (headless Chromium via chrome-devtools MCP): projectInfoView.html renders the modern Test Project Information screen with the #994–#998 toolbar (New Test Suite / Reorder A-Z / Export all / Import / Generate Test Spec HTML + Word), Overview, Description, Integrations and Test Suites table. Console shows only the pre-existing generic label/for warning. Screenshot: docs/screenshots/issue-999-projectinfo-after-cleanup.png.
  • Event Viewer: all rows created during the test window are log_level=16 (AUDIT); 0 Error, 0 Warning.

Resume

cd /home/sebi/testlink
git checkout task/issue-999
php -S 127.0.0.1:8083 -t . &
# login admin/admin, then:
curl -s -o /dev/null -w '%{http_code} %{redirect_url}\n' \
  'http://127.0.0.1:8083/lib/testcases/archiveData.php?edit=testproject&id=1'
# 302 -> /gui/templates/projects/projectInfoView.html?tproject_id=1

Screenshot

projectInfoView.html after the #999 cleanup

Clone this wiki locally