Task Issue 964 issuetracker Used On Testproject - sebiboga/testlink-upgraded GitHub Wiki
Task 964 โ Implement 'used on test project' display in issuetrackerView edit (gap vs legacy)
Issue: #964 Status: IMPLEMENTED & VERIFIED (2026-09-24)
The gap
Legacy edit form gui/templates/dashio/issuetrackers/issueTrackerEdit.tpl:73-119
(displayUsedBy) draws an info icon (fa-info-circle, title
show_hide_linked_to_project) next to the Name field that toggles a hidden
usedByOuter/usedByEnvelope block showing:
- Used on Test Project (
used_on_testproject) followed by one line per test project linked to the tracker, or - Issue Tracker Not Used (Linked) (
issuetracker_not_used_linked) in italics when the tracker is linked to nothing.

The project set comes from lib/issuetrackers/issueTrackerEdit.php:140-153
(initializeGui โ issueTrackerMgr->getLinks($argsObj->id), which purges dead
links first then maps testproject_id โ testproject_name via
tlIssueTracker::getLinks() (class.php:516-543). Browser test (legacy):
editing tracker id=1 listed prj_its under "used on testproject".
The modern screen dropped it:
api/issuetracker/index.phpGET/{id}returned the tracker row throughtrackerToJSON(), which defaultslink_count => 0andlinks => []โ the single-item route was never enriched with the linked projects (only the LIST route attacheslinksviagetLinkSet()for the #963 delete tooltip).gui/templates/issuetracker/issuetrackerView.htmltrackerModal had only Name/Type/Configuration fields, no info icon, no way to see which projects use a tracker before editing/deleting it.
Investigation (measured)
- Fixture:
issuetrackersid=1Bugzilla Trackerlinked toProject Alpha(testproject id 1) +Project Beta(id 2); id=2GitLab CIunlinked. - BFF
GET /api/issuetracker/index.php/1โlink_count:0, links:[](measured BEFORE fix) despite twotestproject_issuetrackerrows. - Browser: edit modal on
Bugzilla Trackerโ DOM probehasUsedBy:false, no linked-project info anywhere (measured).
Fix
BFF api/issuetracker/index.php (single-item GET route):
- Calls
$mgr->getLinks($id)(the same map the legacyinitializeGuiuses), attacheslinks(linked test-project names) +link_countto the item payload beforetrackerToJSON().
HTML gui/templates/issuetracker/issuetrackerView.html:
- Modal:
fa-info-circleanchor (localized tooltipit.showHideLinkedToProjects) beside the Name label + hidden#usedByOuter/#usedByEnvelopeblock (mirrorsissueTrackerEdit.tpl:167-184). - JS
toggleUsedBy()โ port of legacydisplayUsedBy(): toggles collapse; rendersit.usedOnTestproject+ one line per linked project name (HTML- escaped) or italicit.notUsedLinkedwhen empty (create + unlinked states). editTracker()feedsusedByProjectsfromr.item.links;showCreateModal()resets to[](legacy create:$gui->testProjectSetnull โ not-used state);hidden.bs.modalcollapses the block on close.
i18n โ new keys it.usedOnTestproject, it.notUsedLinked,
it.showHideLinkedToProjects added to ALL 10 locale bundles
(en/ro/de/es/fr/it/ja/pt/ru/zh), each validated with python3 -m json.tool.
Locale switch verified (ro).
Verification
- Linked tracker (Bugzilla Tracker): toggle โ "Used on Test Project" + "Project Alpha" + "Project Beta"; second click collapses; reopen resets.
- Unlinked tracker (GitLab CI): toggle โ italic "Issue Tracker Not Used (Linked)".

- Create modal: toggle โ "Issue Tracker Not Used (Linked)" (create parity).
- BFF parity:
GET /{id}/1โlink_count:2, links:[Project Alpha, Project Beta];GET /{id}/2โlink_count:0, links:[]. - Locale RO: tooltip "Aratฤ/Ascunde (Legat de proiecte)"; linked envelope "Folosit รฎn proiectul de test / Project Alpha / Project Beta"; unlinked "Urmฤritor de probleme neutilizat (nelegat)".
- Event Viewer /
eventstable: no new Error/Warning; browser console clean.
Test cases
Appended to tmp/TLU_Test_Cases.md (Suite 964, 6/6 PASS); CHANGELOG updated.
Status: DONE โ closed in #964.