Task Issue 915 TestSpec PerVersion Platform Assignment - sebiboga/testlink-upgraded GitHub Wiki
Task 915 — Per-testcase-version platform assignment in Test Specification (gap vs legacy)
Issue: #915 Status: IMPLEMENTED (2026-09-15)
The gap
The legacy editor (tcEdit.tpl + platforms.inc.tpl, backed by
lib/testcases/tcEdit.php addPlatform/removePlatform and
testcase.class.php addPlatforms/deletePlatforms/getPlatforms) lets a user
assign platforms to a specific test case version — a testcase_platforms row
per (testcase_id, tcversion_id, platform_id). Design-visible platforms
(enable_on_design = 1) are shown as a clickable picker: assigned ones become red
removable chips, unassigned ones are "add" links.
The modern testSpec.html editor, the tcEdit.html standalone editor and both
viewers dropped this: there was no platform UI and the modern BFF neither exposed
platform data nor persisted assignments.
Modern implementation (port)
BFF api/testcases/index.php
- Helpers
projectPlatforms(),versionPlatformAssignments(),platformFreeList(),canAssignPlatforms()(== legacyplatRW:mgt_modify_tc+ open version + not executed),resolveTcversionForPlatform(),versionHasExecutions(). getreturnsplatformsAssigned,platformsFree,platformsProject,platformsEditable;viewreturnsplatformsProject+ per-versionplatforms/canAssignPlatforms.- New POST routes
add_platform(addPlatforms, design-visible only, open + not executed) andremove_platform(deletePlatforms/deletePlatformsByLink). create/updatediff-sync aplatformsarray againsttestcase_platforms(shared$syncPlatformsclosure).
BFF api/testcasesedit/index.php
buildEditPayload()returnsplatformsAssigned,platformsFree,platformsProject,platformsEditableundertcase;updatepersists the platform set.
Frontend
testSpec.html:platformsEditorHtml()renders atspec.platformsblock (assigned chips + checkbox multi-select#platList, "no platforms / none assigned" notes); hidden in create mode;collectForm()sends the checked ids; read-onlyrenderTcView()shows the platform chips row;openEditTc()/switchEditVersion()thread theplatforms*payload.tcEdit.html: Platforms pills section,renderPlatforms()/collectPlatforms(), persisted viaupdate.tcView.html: read-onlytcview.platformschips row.
New-version copy — create_version goes through legacy core
create_new_version() which copies the source version's platforms to the new
version (copyPlatformsTo, delete:false) — verified live.
i18n — tcedit.platforms, tcedit.noPlatforms, tcview.platforms,
tspec.platforms, tspec.noProjPlatforms, tspec.noPlatformsAssigned added to
all 10 bundles (en/de/es/fr/it/ja/pt/ro/ru/zh).
Screenshots
Test Specification read-only view — PLATFORMS chips row:

Standalone TC editor (tcEdit.html) — Platforms pills:

Standalone TC viewer (tcView.html) — PLATFORMS chips:

Verification
- testSpec editor: uncheck iOS → Save →
testcase_platformsrow for platform 2 gone (only Android + Windows remain); check again → row recreated. - tcEdit editor: pills toggle + Save → new
testcase_platformslink row for iOS. - tcView + testSpec viewers show the version's platforms.
create_versioncloned the 3 platform rows to the new version.- No new
eventsError/Warning rows; browser consoles clean.
Related issue
- #1512 — bug found
during testing:
delete_versionleaves orphanedtestcase_platformsrows (pre-existing legacy_blind_deletebehavior), minor.
Files changed
api/testcases/index.phpapi/testcasesedit/index.phpgui/templates/testcases/testSpec.htmlgui/templates/testcases/tcEdit.htmlgui/templates/testcases/tcView.htmlgui/templates/i18n/{en,de,es,fr,it,ja,pt,ro,ru,zh}.jsondocs/Task-Issue-915-TestSpec-PerVersion-Platform-Assignment.mdCHANGELOG