Repository navigation
Task Issue 1004 Delete Legacy CfieldsTprojectAssign
Status: implemented on task/issue-1004, 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 #950–#956 and #1003 are all
CLOSED/COMPLETED. Investigation + TODO checkpoint posted on the issue before
any edit (issuecomment-7254021683).
Issue #1004 named cfieldsAssignView.html + api/cfields/index.php as the
modern twin and asked to delete:
| Target | State before #1004 |
|---|---|
lib/cfields/cfieldsTprojectAssign.php |
91-line session-guarded shim from #1816/#1883/#1949 — refused the 4 legacy write actions with HTTP 405 and 302'd to cfieldsTprojectAssign.html
|
gui/templates/dashio/cfields/cfieldsTprojectAssign.tpl |
197-line legacy Smarty form, zero {include} sites |
gui/templates/tl-classic/cfields/cfieldsTprojectAssign.tpl |
165-line dead-theme twin, zero {include} sites |
There are two modern assignment screens in the tree, both retained:
cfieldsAssignView.html (nav action cfAssignment in common.php) and
cfieldsTprojectAssign.html (toolbar button in cfieldsView.html, backed by
api/cfieldstproject). Both are BFF-driven and enforce cfield_management on
the addressed test project. The issue's statement that the nav already targets
the modern screen was confirmed; the remaining work was the deletions plus the
last stale link in the unused tl-classic theme.
- DELETED
lib/cfields/cfieldsTprojectAssign.php— the legacy shim is no longer needed once the screen is retired; legacy deep links now return 404. - DELETED
gui/templates/dashio/cfields/cfieldsTprojectAssign.tpl. - DELETED
gui/templates/tl-classic/cfields/cfieldsTprojectAssign.tpl(precedent: #984/#966/#992/#999 retire both theme copies). -
gui/templates/tl-classic/mainPageLeft.tpl— the last live reference to the legacy controller retargeted togui/templates/cfields/cfieldsAssignView.html?tproject_id=<id>. - Comments describing the shim as still present updated in
lib/functions/common.php,gui/templates/cfields/cfieldsView.html,api/cfieldstproject/index.php,api/cfieldsedit/index.phpandapi/cfields/index.php;docs/WIKI-CUSTOM-FIELDS.mdmarks the legacy row retired.
Deliberately kept: both modern screens and their BFFs, $tlCfg->gui->cfieldsTprojectAssign
in config.inc.php and [cfieldsTprojectAssign] in input_dimensions.conf
(consumed by cfieldsTprojectAssign.html:326), all nine
footers.cfieldsTprojectAssign i18n keys (consumed by the modern screen),
lib/cfields/cfieldsEdit.php, cfieldsView.tpl, cfieldsExport.php,
cfieldsImport.php (out of scope per the issue, retained for #950–#956).
-
php -lclean onlib/functions/common.php,api/cfields/index.php,api/cfieldsedit/index.php,api/cfieldstproject/index.php. - HTTP with an authenticated admin session: all three deleted paths → 404;
cfieldsAssignView.html?tproject_id=1→ 200 (28,691 bytes),cfieldsTprojectAssign.html?tproject_id=1→ 200 (25,546 bytes),api/cfields/index.php?action=assignment&tproject_id=1→ 200 JSON,api/cfieldstproject/index.php?action=init&tproject_id=1→ 200 JSON. -
grep -rnfor the deleted controller/templates: no runtime reference left; only historical docs/API comments that explicitly say "deleted in #1004". - Browser (headless Chromium via chrome-devtools MCP): the modern Assign Custom
Fields screen renders; console shows only the pre-existing generic
No label associated with a form field (count: 6)warning, no errors. Screenshot:docs/screenshots/issue-1004-cfieldsassignview-after-cleanup.png. - Event Viewer: 16 rows in the test window, all
log_level=16(AUDIT); 0 Error, 0 Warning. - i18n gate 9/9 bundles; suite gate: own
Issue #1004heading present and zero lines removed fromtmp/TLU_Test_Cases.md.
cd /home/sebi/testlink
git checkout task/issue-1004
php -S 127.0.0.1:8083 -t . &
# login admin/admin, then:
curl -s -o /dev/null -w '%{http_code}\n' \
'http://127.0.0.1:8083/lib/cfields/cfieldsTprojectAssign.php?tproject_id=1'
# 404
curl -s -o /dev/null -w '%{http_code}\n' \
'http://127.0.0.1:8083/gui/templates/cfields/cfieldsAssignView.html?tproject_id=1'
# 200