Repository navigation
Remove All Tester Assignments Modernized
Modernization of Remove all tester assignments from a Build — legacy
lib/plan/tc_exec_unassign_all.php (with its doUnassignAll()
confirmed-round-trip and baseActions->doUnassignAll JS hook in the legacy
Dashio filter panel). Tracked in
issue #1434.
The legacy controller, which the ASIDE execute area always routed through,
counted the execution assignments of a Build (assignment_mgr ::get_count_of_assignments_for_build_id()), showed either an
"assignments exist" warning or an "empty" info, and (on an explicit
confirmed=yes round trip) deleted all rows of the Build
(assignment_mgr::delete_by_build_id()). Our modernization keeps all of that:
the new Dashio standalone page is the ASIDE execute → Remove all tester assignments entry point and is also reachable per-Build from the modernized
Assign Test Case Execution toolbar.
Path: Execute → Assign Test Cases to Execution (Build) → [Unassign all testers] button
URL: gui/templates/execute/tcUnassignAll.html?tproject_id=<id>&tplan_id=<id>&build_id=<id>
BFF API: api/tcunassignall/index.php
-
?action=info&build_id=<id>&tproject_id=<id>(GET) → JSON{status, build_id, build_name, tproject_id, tproject_name, count, can_remove} -
?action=unassign&build_id=<id>&tproject_id=<id>(POST) → JSON{status, removed_count, ...}
Rights: testplan_planning on the owning test project (same gate the
legacy page used via its rightsAnd pageAccessCheck). The BFF enforces it on
every route server-side (401 unauthenticated / 403 without the right).

- Resolves the Build by
build_idand its owning test project (the build lookup is project-scoped, honoring the legacybuild->get_by_id()signature). -
inforeturns the assignment count for the Build and whether removal is possible (can_remove= count > 0). Zero-count shows the legacy "There are no testers assigned to Test Cases in the Build X." state and disables the red button; positive count shows the "There are N execution assignments for Build X" warning and enables it. -
unassign(POST, same-origin-guarded) re-checks rights and callsassignment_mgr::delete_by_build_id()→ success toast with removed count. - Browser confirm modal: legacy-style warning (
$TLS_unassign_all_tcs_warning_msg) with Yes/No, wired to the BFF on Yes.
Keys tua.* (15) + footers.tcUnassignAll added to all 10 locale bundles
(gui/templates/i18n/en|ro|de|es|fr|it|ja|pt|ru|zh.json), validated with
python3 -m json.tool.
- Same-origin guard (
api/_guard.php) on every route; 401/403/404 JSON. - Rights enforced server-side on every route (
testplan_planning) — the modern screen never relies on client-side authorisation for the destructive action (same guarantee as the legacy controller'shasRightcheck). - Legacy
lib/plan/tc_exec_unassign_all.phpuntouched and still served for backward compatibility with bookmarks/older Permissions.
$actions->tcUnassignAll = "/gui/templates/execute/tcUnassignAll.html?{$ctx}";
added in lib/functions/common.php (initUserEnv(), guarded by
testplan_planning — same as the legacy launcher). The modernized
tcExecAssignment.html toolbar gained an Unassign all testers from selected
Build button that deep-links per selected build.
Suite 1434.1–1434.16 appended to tmp/TLU_Test_Cases.md (16/16 PASS).