Skip to content

Dashboard Assigned Test Cases

github-actions[bot] edited this page Sep 13, 2026 · 2 revisions

My Assigned Test Cases — Dashboard Widget

Modernized in 2.0.1 as a new Dashboard widget (Refs #895). The TestLink dashboard (gui/templates/mainpage/mainPage.html) now shows a "My Assigned Test Cases" card: every test case whose execution is assigned to the logged-in user, scoped to the selected test project (all its active test plans from the session context, or a single plan when one is selected), on open builds of active test plans.

This ports the legacy 1.9.20 personal view lib/testcases/tcAssignedToUser.php onto the Dashboard so a tester can see at a glance "what do I work on today".

Screenshots

Normal state (2 assigned test cases, 1 passed / 1 overdue not-run):

Widget normal state

After clicking the quick "Mark as Failed" action (toast "Result saved", summary chips refresh, status badge turns Failed):

Widget after quick-exec

BFF API

api/mainpage/index.php — new route GET /assigned plus the shared getAssignedToMeData() helper:

  • Calls testcase::get_assigned_to_user($userId, $tprojectID, $tplan_param, ['mode' => 'full_path'], ['tplan_status' => 'active', 'build_status' => 'open']) — the same legacy function that drives tcAssignedToUser.php and the Reports "Assigned Test Case Overview" (Refs #684).
  • Per row it resolves the last execution status on the row's build+platform (get_last_execution()) and derives status_key (passed|failed|blocked|not_run).
  • Payload: { user_id, tproject_id, has_data, total, executed, pending, plans: [ { id, name, show_platforms, priority_enabled, has_exec_right, rows: [ { build_id, build_name, suite_path, tc_id, tcversion_id, prefix, tc_external_id, name, version, tplan_id, tplan_name, status, status_key, creation_ts_epoch, assigned_on_epoch, age_days, deadline_epoch, deadline_overdue, can_exec, platform_id, platform_name, priority, priority_level } ] } ] }.
  • Parity fix: platform_id/platform_name are emitted on every row, not only when the plan has platforms — the legacy exec/quick-exec links key unconditionally on platform_id. Refinement over legacy: show_platforms is true only when the plan actually has platforms, so the Platform column hides when the project defines none.

HTML screen

gui/templates/mainpage/mainPage.html — new #secAssigned card below the execution-status widget:

  • Header "My Assigned Test Cases" + summary chips assigned / pending / executed / overdue.
  • DataTable columns: Test case (A895-3: Name (v.1) + full suite path), Build, Platform (hidden if unused), Test Plan, Priority (hidden when the project disables priority), Assigned on, Due (red + overdue badge when past deadline), Status (palette badges), Actions.
  • Actions cell (gated by can_exec): quick Passed/Failed/Blocked icons (POST /api/reports/index.php?action=quick_exec), Execute link to execSetResults.html (build/platform pre-set), History link, and the TC name linking to tcView.html.
  • Deep links use the resolved project id (g_proj_id) even though the mainframe URL keeps tproject_id=0 when the session context drives the dashboard.
  • Rows are de-duplicated across plans by (tc_id, tcversion_id, tplan_id, build_id, platform_id).
  • Empty state: the card hides entirely, like the other dashboard widgets.

i18n

29 new keys in all 10 locale bundles (gui/templates/i18n/*.json): dash.assignedTitle/Hint/Tc/Build/Platform/Priority/AssignedOn/Due/Actions, dash.assignedTotal/Pending/Executed/Overdue/OverdueShort, dash.assignedPriorityHigh/Medium/Low, dash.statusPassed/Failed/Blocked/NotRun, dash.assignedQuickPassed/Failed/Blocked, dash.assignedExecTitle, dash.assignedHistoryTitle, dash.assignedConfirm, dash.assignedQuickOk, dash.assignedNoPerm. Romanian carries real translations; others follow the existing dash.* convention.

Test cases

See tmp/TLU_Test_Cases.md — Task — Issue #895 suite (12/12 PASS).

Clone this wiki locally