Repository navigation
Bugfix Issue 828 Builds Project Scope i18n
Sub-task of enhancement
#503 — "builds
should be scoped to the Test Project, not to a single Test Plan". The core
build.class.php move to project scope was implemented and verified in commit
29a10a8f1 (feat(builds): scope build manager to test project ..., Refs #828).
This fix addresses a residual UI wording bug: the modernized Builds screen
still told the user that build names must be unique "within the test plan",
even though uniqueness is now enforced per test project.
After #828 the build manager operates project-wide:
-
lib/functions/build.class.php—checkNameExistence()filters ontestproject_id(:676-677), andcreate()/createFromObject()use it (:144). -
lib/functions/testplan.class.php—check_build_name_existence()resolves the plan to its project (:2478-2505) andget_builds()lists all builds in the plan's project (:2291).
Consequently a build name can be rejected even though no build of that name
exists on the current test plan — it exists on a different plan of the same
project. Two user-facing strings in the modernized Builds screen
(gui/templates/plans/buildsView.html) were not re-worded for this:
- inline hint: i18n key
bv.nameHint— "must be unique within the test plan" (buildsView.html:106) - duplicate toast: i18n key
bv.msg.duplicateName— "A build with that name already exists in this test plan" (buildsView.html:243,254-255)
Both describe the wrong (plan) scope and mislead the user should a name be rejected because of a build on another plan.
Note: milestone messages (
ms.*keys,planMilestones.html) were intentionally not changed — milestones remain plan-scoped.
Chosen method: wording-only i18n update. The machine error code
(warning_duplicate_build, api/builds/index.php:268,470) and the backend
exception text in build.class.php were already correct from 29a10a8f1;
only the front-end localized strings were stale.
- Changed the two keys from "test plan" to "test project" in all 10
locale bundles under
gui/templates/i18n/:-
bv.msg.duplicateName→ "…already exists in this test project" -
bv.nameHint→ "must be unique within the test project" (and equivalent translations in de, es, fr, it, ja, pt, ro, ru, zh).
-
- Updated the HTML fallback text at
buildsView.html:106for consistency (data-i18noverwrites it at runtime anyway). - Left
ms.*(milestone) keys untouched — milestones stay plan-scoped.
-
Changing the server message — rejected:
api/builds/index.phpreturns the machine codewarning_duplicate_buildwhich the screen maps to a localized key; the server text is internal, not user-facing. - Rewording the milestone strings too — rejected: not in scope, milestones are genuinely plan-scoped.
Before (misleading "test plan" toast):

After (correct "test project" toast + hint):

-
gui/templates/i18n/{de,en,es,fr,it,ja,pt,ro,ru,zh}.json— line 163bv.msg.duplicateName, line 168bv.nameHint: "test plan" → "test project". -
gui/templates/plans/buildsView.html:106— HTML fallback forbv.nameHint. -
docs/screenshots/issue-828-*.png— before/after screenshots.
Commit: 1cb4ad533 (fix(builds): re-word project-scoped duplicate/hint i18n from 'test plan' to 'test project' (Refs #828)).
Ran against the running app (admin/admin, project M828 id 2100, plans
P-A 2101 / P-B 2102, builds v2.0/v2.1 in project 2100):
- Create-Build modal hint reads "must be unique within the test project".
- Attempting create of
v2.0on plan P-B (name exists on the OTHER plan P-A) → rejected with toast "…already exists in this test project: v2.0". - Unique name
unique-build-828→ created then deleted cleanly. -
buildstable unchanged (no phantom rows);eventsclean (only INFO-level audit rows, no Error/Warning); browser console only the expected409 Conflictfrom the intentional duplicate attempt. -
python3 -m json.toolvalid for all 10 bundles. - Code-review subagent: minimal, correct, safe.
- (a) cross-plan duplicate rejected + wording = "test project" → PASS.
- (b) unique-name creation works → PASS.
- (c) milestone
ms.*messages unchanged ("test plan") → unchanged. - (d) all 10 bundles valid JSON → PASS.
- (e) Event Viewer /
events— no new Error/Warning → PASS.
Test suite recorded in tmp/TLU_Test_Cases.md — Regression — Issue #828
(TC-828.1–828.8), 8/8 PASS.